Browse Source

更新

master
yibo 7 years ago
parent
commit
eecbfd9b9d
30 changed files with 2490 additions and 1047 deletions
  1. +3
    -0
      ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs
  2. +37
    -0
      ButcherFactory.BO/Bill/SegmentProduction.cs
  3. +3
    -1
      ButcherFactory.BO/ButcherFactory.BO.csproj
  4. +2
    -0
      ButcherFactory.BO/Enums/DriveType.cs
  5. +10
    -1
      ButcherFactory.BO/LocalBL/BaseInfoBL.cs
  6. +23
    -100
      ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs
  7. +0
    -324
      ButcherFactory.BO/LocalBL/CarcassInStoreBLOld.cs
  8. +137
    -0
      ButcherFactory.BO/LocalBL/FormClientGoodsSetBL.cs
  9. +120
    -0
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  10. +9
    -0
      ButcherFactory.BO/Utils/Extensions.cs
  11. +28
    -1
      ButcherFactory.Form/ButcherFactory.Form.csproj
  12. +84
    -80
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs
  13. +66
    -92
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs
  14. +8
    -0
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx
  15. +1
    -1
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreFormConfig.cs
  16. +0
    -329
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreFormOld.cs
  17. +101
    -0
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs
  18. +68
    -0
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs
  19. +129
    -0
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.resx
  20. +713
    -0
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs
  21. +283
    -0
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs
  22. +199
    -0
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.resx
  23. +13
    -0
      ButcherFactory.Form/SegmentProduction_/SegmentProductionFormConfig.cs
  24. +152
    -0
      ButcherFactory.Form/SegmentProduction_/TrunOutDialog.Designer.cs
  25. +46
    -0
      ButcherFactory.Form/SegmentProduction_/TrunOutDialog.cs
  26. +138
    -0
      ButcherFactory.Form/SegmentProduction_/TrunOutDialog.resx
  27. +2
    -2
      ButcherFactory.Form/Utils/ControlsUtil.cs
  28. +6
    -11
      ButcherFactory.Login/App.xaml.cs
  29. +1
    -1
      ButcherFactory.Login/Login.xaml.cs
  30. +108
    -104
      ButcherFactorySolution/ButcherFactorySolution.vdproj

+ 3
- 0
ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs View File

@ -40,5 +40,8 @@ namespace ButcherFactory.BO
public decimal? StandardWeightUp { get; set; }
public decimal? StandardWeightLow { get; set; }
[NonDmoProperty]
public bool Selected { get; set; }
}
}

+ 37
- 0
ButcherFactory.BO/Bill/SegmentProduction.cs View File

@ -0,0 +1,37 @@
using Forks.EnterpriseServices.DataDictionary;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO
{
[MapToTable("Butcher_SegmentProduction")]
[DBIndex("IDX_Butcher_SegmentProduction_Clustered", "GroupID", false, 0)]
[DBIndexType("IDX_Butcher_SegmentProduction_Clustered", IndexType.Clustered)]
public class SegmentProduction : SyncBill
{
public string BarCode { get; set; }
public long? WorkUnit_ID { get; set; }
public long ProductBatch_ID { get; set; }
public long Goods_ID { get; set; }
public decimal Weight { get; set; }
[ReferenceTo(typeof(Goods), "Name")]
[Join("Goods_ID", "ID")]
public string Goods_Name { get; set; }
public long? GroupID { get; set; }
public bool Submited { get; set; }
//挂起状态
public bool TrunOut { get; set; }
}
}

+ 3
- 1
ButcherFactory.BO/ButcherFactory.BO.csproj View File

@ -63,6 +63,7 @@
<Compile Include="Base\ExtensionObj.cs" />
<Compile Include="Bill\CarcassTakeOut.cs" />
<Compile Include="Bill\CarcassTakeOutWeightTemp.cs" />
<Compile Include="Bill\SegmentProduction.cs" />
<Compile Include="Enums\ApplyClient.cs" />
<Compile Include="Enums\DriveType.cs" />
<Compile Include="Base\SyncBill.cs" />
@ -72,8 +73,9 @@
<Compile Include="Bill\CarcassInStore.cs" />
<Compile Include="LocalBL\BaseInfoBL.cs" />
<Compile Include="LocalBL\CarcassInStoreBL.cs" />
<Compile Include="LocalBL\CarcassInStoreBLOld.cs" />
<Compile Include="LocalBL\CarcassTakeOutBL.cs" />
<Compile Include="LocalBL\FormClientGoodsSetBL.cs" />
<Compile Include="LocalBL\SegmentProductionBL.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rpcs\BaseInfoSyncRpc.cs" />
<Compile Include="Utils\AppContext.cs" />


+ 2
- 0
ButcherFactory.BO/Enums/DriveType.cs View File

@ -10,5 +10,7 @@ namespace ButcherFactory.BO
{
= 0,
= 1,
= 2,
= 3,
}
}

+ 10
- 1
ButcherFactory.BO/LocalBL/BaseInfoBL.cs View File

@ -11,14 +11,17 @@ namespace ButcherFactory.BO.LocalBL
{
public static class BaseInfoBL
{
public static List<T> GetList<T>(int? range = null)
public static List<T> GetList<T>(int range = 10, params string[] extendFields)
where T : BaseInfo, new()
{
var query = new DQueryDom(new JoinAlias(typeof(T)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("Name"));
foreach (var field in extendFields)
query.Columns.Add(DQSelectColumn.Field(field));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
var result = new List<T>();
var type = typeof(T);
using (var session = DmoSession.New())
{
using (var reader = session.ExecuteReader(query))
@ -29,6 +32,12 @@ namespace ButcherFactory.BO.LocalBL
result.Add(entity);
entity.ID = (long)reader[0];
entity.Name = (string)reader[1];
var idx = 2;
foreach (var field in extendFields)
{
type.GetProperty(field).SetValue(entity, reader[idx]);
idx++;
}
}
}
}


+ 23
- 100
ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs View File

@ -17,66 +17,26 @@ namespace ButcherFactory.BO.LocalBL
public static class CarcassInStoreBL
{
const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/CarcassInStoreRpc/";
static Dictionary<long, string> _goodsNames = new Dictionary<long, string>();
public static void DoWithPadData(IEnumerable<CarcassInStore> list)
{
try
{
var json = RpcFacade.Call<string>(RpcPath + "GetUnSyncPadData");
var data = JsonConvert.DeserializeObject<List<PadCarcassInStore>>(json);
if (data.Count == 0)
return;
var back = new List<Tuple<long, int>>();
using (var session = DmoSession.New())
{
foreach (var item in list)
{
var first = data.FirstOrDefault();
if (first == null)
break;
if (CheckExist(first.BarCode, session))
continue;
back.Add(new Tuple<long, int>(first.ID, first.RowVersion));
Update(item.ID, session, new Tuple<string, object>("Goods_ID", first.Goods_ID), new Tuple<string, object>("BarCode", first.BarCode), new Tuple<string, object>("FromPad", true));
item.Goods_ID = first.Goods_ID;
item.Goods_Name = GetGoodsName(item.Goods_ID.Value, session);
item.BarCode = first.BarCode;
}
session.Commit();
}
if (back.Count == 0)
return;
var backInfo = back.Select(x => new ExtensionObj { LongExt1 = x.Item1, DecimalExt1 = x.Item2 });
RpcFacade.Call<int>(RpcPath + "SetPadDataSync", JsonConvert.SerializeObject(backInfo));
}
catch
{
#if DEBUG
throw;
#endif
}
}
public static CarcassInStore Insert(long? workUnit, long? productBatch, decimal weight)
public static CarcassInStore Insert(long? workUnitID, long batchID, long goodsID, string barCode)
{
using (var session = DmoSession.New())
{
var exist = CheckExist(barCode, session);
if (exist)
throw new Exception("条码已使用过");
var entity = new CarcassInStore();
entity.WorkUnit_ID = workUnit;
if (productBatch.HasValue)
{
entity.ProductBatch_ID = productBatch;
entity.RowIndex = GenerateRowIndex(session, productBatch.Value);
}
entity.WorkUnit_ID = workUnitID;
entity.ProductBatch_ID = batchID;
entity.UserID = AppContext.Worker.ID;
entity.Weight = weight;
entity.Goods_ID = goodsID;
entity.BarCode = barCode;
entity.RowIndex = GenerateRowIndex(session, batchID);
session.Insert(entity);
session.Commit();
return entity;
}
}
}
static bool CheckExist(string barCode, IDmoSession session)
{
@ -88,18 +48,6 @@ namespace ButcherFactory.BO.LocalBL
return query.EExecuteScalar(session) != null;
}
public static void Update(long id, long goodsID, string barCode)
{
using (var session = DmoSession.New())
{
var exist = CheckExist(barCode, session);
if (exist)
throw new Exception("条码已使用过");
Update(id, session, new Tuple<string, object>("Goods_ID", goodsID), new Tuple<string, object>("BarCode", barCode));
session.Commit();
}
}
static int GenerateRowIndex(IDmoSession session, long batchID)
{
var query = new DQueryDom(new JoinAlias(typeof(CarcassInStore)));
@ -108,27 +56,18 @@ namespace ButcherFactory.BO.LocalBL
return (query.EExecuteScalar<int?>(session) ?? 0) + 1;
}
static string GetGoodsName(long id, IDmoSession session)
public static void FillWeight(long id, decimal weight)
{
if (!_goodsNames.ContainsKey(id))
using (var session = DmoSession.New())
{
var query = new DQueryDom(new JoinAlias(typeof(Goods)));
query.Columns.Add(DQSelectColumn.Field("Name"));
query.Where.Conditions.Add(DQCondition.EQ("ID", id));
_goodsNames.Add(id, query.EExecuteScalar<string>(session));
var update = new DQUpdateDom(typeof(CarcassInStore));
update.Where.Conditions.Add(DQCondition.EQ("ID", id));
update.Columns.Add(new DQUpdateColumn("Weight", weight));
update.Columns.Add(new DQUpdateColumn("Sync", false));
update.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1))));
session.ExecuteNonQuery(update);
session.Commit();
}
return _goodsNames[id];
}
static void Update(long id, IDmoSession session, params Tuple<string, object>[] values)
{
var update = new DQUpdateDom(typeof(CarcassInStore));
update.Where.Conditions.Add(DQCondition.EQ("ID", id));
foreach (var item in values)
update.Columns.Add(new DQUpdateColumn(item.Item1, item.Item2));
update.Columns.Add(new DQUpdateColumn("Sync", false));
update.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1))));
session.ExecuteNonQuery(update);
}
public static BindingList<CarcassInStore> GetLocalDataWithState(bool history)
@ -142,11 +81,11 @@ namespace ButcherFactory.BO.LocalBL
{
query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("BeforeWeight"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field("Goods_ID")), DQCondition.IsNotNull(DQExpression.Field("Weight"))));
query.Where.Conditions.Add(DQCondition.IsNotNull(DQExpression.Field("Weight")));
query.Range = SelectRange.Top(30);
}
else
query.Where.Conditions.Add(DQCondition.Or(DQCondition.IsNull(DQExpression.Field("Goods_ID")), DQCondition.IsNull(DQExpression.Field("Weight"))));
query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("Weight")));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
var result = new BindingList<CarcassInStore>();
using (var session = DmoSession.New())
@ -172,19 +111,6 @@ namespace ButcherFactory.BO.LocalBL
return result;
}
public static IEnumerable<ClientGoodsSet_Detail> GetGoodsList()
{
var main = new JoinAlias(typeof(ClientGoodsSet));
var detail = new JoinAlias(typeof(ClientGoodsSet_Detail));
var query = new DQueryDom(main);
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "ClientGoodsSet_ID"));
query.Columns.Add(DQSelectColumn.Field("Goods_ID", detail));
query.Columns.Add(DQSelectColumn.Field("Goods_Name", detail));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "Goods_ID"));
var list = query.EExecuteList<long, string>();
return list.Select(x => new ClientGoodsSet_Detail { Goods_ID = x.Item1, Goods_Name = x.Item2 });
}
public static List<ExtensionObj> GetBeforeWeight(IEnumerable<string> codeList)
{
try
@ -256,10 +182,7 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("Goods_ID"));
query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("CreateTime"));
query.Where.Conditions.Add(DQCondition.And(
//DQExpression.Snippet("[_main].[BarCode] != ''"),
DQCondition.IsNotNull(DQExpression.Field("Goods_ID")),
DQCondition.IsNotNull(DQExpression.Field("Weight")), DQCondition.EQ("Sync", false)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field("Weight")), DQCondition.EQ("Sync", false)));
query.Range = SelectRange.Top(10);
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID"));
@ -289,7 +212,7 @@ namespace ButcherFactory.BO.LocalBL
var update = new DQUpdateDom(typeof(CarcassInStore));
update.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("ID", obj.ID), DQCondition.EQ("RowVersion", obj.RowVersion)));
update.Columns.Add(new DQUpdateColumn("Sync", true));
session.ExecuteNonQuery(update);
update.EExecute();
}
}


+ 0
- 324
ButcherFactory.BO/LocalBL/CarcassInStoreBLOld.cs View File

@ -1,324 +0,0 @@
using ButcherFactory.BO.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.JsonRpc.Client;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TSingSoft.WebPluginFramework;
namespace ButcherFactory.BO.LocalBL
{
public static class CarcassInStoreBLOld
{
const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/CarcassInStoreRpc/";
static Dictionary<long, string> _goodsNames = new Dictionary<long, string>();
public static List<CarcassInStore> DoWithPadData(long? workUnitID, long? batchID)
{
try
{
var json = RpcFacade.Call<string>(RpcPath + "GetUnSyncPadData");
var data = JsonConvert.DeserializeObject<List<PadCarcassInStore>>(json);
var list = new List<CarcassInStore>();
if (data.Count == 0)
return list;
var goodsBarCode = data.Select(x => new Tuple<long, string>(x.Goods_ID, x.BarCode));
list = InsertOrUpdate(workUnitID, batchID, goodsBarCode, true);
var backInfo = data.Select(x => new ExtensionObj { LongExt1 = x.ID, DecimalExt1 = x.RowVersion });
RpcFacade.Call<int>(RpcPath + "SetPadDataSync", JsonConvert.SerializeObject(backInfo));
return list;
}
catch
{
#if DEBUG
throw;
#endif
return new List<CarcassInStore>();
}
}
public static List<CarcassInStore> InsertOrUpdate(long? workUnitID, long? batchID, long goodsID, string barCode)
{
var list = new List<Tuple<long, string>> { new Tuple<long, string>(goodsID, barCode) };
return InsertOrUpdate(workUnitID, batchID, list, false);
}
static List<CarcassInStore> InsertOrUpdate(long? workUnitID, long? batchID, IEnumerable<Tuple<long, string>> data, bool fromPad)
{
var list = new List<CarcassInStore>();
using (var session = DmoSession.New())
{
foreach (var item in data)
{
var idWeight = GetExistWithUpdate(item, session);
if (idWeight != null)
{
var exist = new CarcassInStore();
list.Add(exist);
exist.ID = idWeight.Item1;
exist.Goods_ID = item.Item1;
exist.Goods_Name = GetGoodsName(item.Item1, session);
exist.Weight = idWeight.Item2;
}
else
{
var entity = CreateCarcassInStore(workUnitID, batchID, item, fromPad);
entity.Goods_Name = GetGoodsName(item.Item1, session);
if (batchID.HasValue)
entity.RowIndex = GetRowIndex(session, batchID.Value) + 1;
session.Insert(entity);
list.Add(entity);
}
}
session.Commit();
}
return list;
}
static int GetRowIndex(IDmoSession session, long batchID)
{
var query = new DQueryDom(new JoinAlias(typeof(CarcassInStore)));
query.Columns.Add(DQSelectColumn.Max("RowIndex"));
query.Where.Conditions.Add(DQCondition.EQ("ProductBatch_ID", batchID));
return query.EExecuteScalar<int?>(session) ?? 0;
}
static CarcassInStore CreateCarcassInStore(long? workUnitID, long? batchID, Tuple<long, string> goodsCode, bool fromPad)
{
var entity = new CarcassInStore();
entity.FromPad = fromPad;
entity.WorkUnit_ID = workUnitID;
entity.ProductBatch_ID = batchID;
entity.UserID = AppContext.Worker.ID;
entity.BarCode = goodsCode.Item2;
entity.Goods_ID = goodsCode.Item1;
return entity;
}
static string GetGoodsName(long id, IDmoSession session)
{
if (!_goodsNames.ContainsKey(id))
{
var query = new DQueryDom(new JoinAlias(typeof(Goods)));
query.Columns.Add(DQSelectColumn.Field("Name"));
query.Where.Conditions.Add(DQCondition.EQ("ID", id));
_goodsNames.Add(id, query.EExecuteScalar<string>(session));
}
return _goodsNames[id];
}
static Tuple<long, decimal?> GetExistWithUpdate(Tuple<long, string> goodsCode, IDmoSession session)
{
if (string.IsNullOrEmpty(goodsCode.Item2))
return null;
var query = new DQueryDom(new JoinAlias(typeof(CarcassInStore)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Where.Conditions.Add(DQCondition.EQ("BarCode", goodsCode.Item2));
var result = query.EExecuteScalar<long, decimal?>();
if (result == null)
return null;
Update(result.Item1, "Goods_ID", goodsCode.Item1, session);
return result;
}
static void Update(long id, string fileName, object value, IDmoSession session)
{
var update = new DQUpdateDom(typeof(CarcassInStore));
update.Where.Conditions.Add(DQCondition.EQ("ID", id));
update.Columns.Add(new DQUpdateColumn(fileName, value));
update.Columns.Add(new DQUpdateColumn("Sync", false));
update.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1))));
session.ExecuteNonQuery(update);
}
public static void Update(long id, string fileName, object value)
{
using (var session = DmoSession.New())
{
Update(id, fileName, value, session);
session.Commit();
}
}
public static BindingList<CarcassInStore> GetLocalDataWithState(bool history)
{
var query = new DQueryDom(new JoinAlias(typeof(CarcassInStore)));
query.Columns.Add(DQSelectColumn.Field("RowIndex"));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("BarCode"));
query.Columns.Add(DQSelectColumn.Field("Goods_Name"));
if (history)
{
query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("BeforeWeight"));
query.Where.Conditions.Add(DQCondition.IsNotNull(DQExpression.Field("Weight")));
query.Range = SelectRange.Top(30);
}
else
query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("Weight")));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
var result = new BindingList<CarcassInStore>();
using (var session = DmoSession.New())
{
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
{
var entity = new CarcassInStore();
result.Add(entity);
entity.RowIndex = (int?)reader[0];
entity.ID = (long)reader[1];
entity.BarCode = (string)reader[2];
entity.Goods_Name = (string)reader[3];
if (history)
{
entity.Weight = (decimal)reader[4];
entity.BeforeWeight = (decimal?)reader[5];
}
}
}
}
return result;
}
public static IEnumerable<ClientGoodsSet_Detail> GetGoodsList()
{
var main = new JoinAlias(typeof(ClientGoodsSet));
var detail = new JoinAlias(typeof(ClientGoodsSet_Detail));
var query = new DQueryDom(main);
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "ClientGoodsSet_ID"));
query.Columns.Add(DQSelectColumn.Field("Goods_ID", detail));
query.Columns.Add(DQSelectColumn.Field("Goods_Name", detail));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "Goods_ID"));
var list = query.EExecuteList<long, string>();
return list.Select(x => new ClientGoodsSet_Detail { Goods_ID = x.Item1, Goods_Name = x.Item2 });
}
public static List<ExtensionObj> GetBeforeWeight(IEnumerable<string> codeList)
{
try
{
var json = RpcFacade.Call<string>(RpcPath + "GetWeightInfo", codeList);
var list = JsonConvert.DeserializeObject<List<ExtensionObj>>(json);
if (list.Any())
{
using (var session = DmoSession.New())
{
foreach (var item in list)
SaveWeightInDB(item, session);
session.Commit();
}
}
return list;
}
catch
{
#if DEBUG
throw;
#endif
return new List<ExtensionObj>();
}
}
static void SaveWeightInDB(ExtensionObj obj, IDmoSession session)
{
var update = new DQUpdateDom(typeof(CarcassInStore));
update.Where.Conditions.Add(DQCondition.EQ("BarCode", obj.StringExt1));
update.Columns.Add(new DQUpdateColumn("BeforeWeight", obj.DecimalExt1));
session.ExecuteNonQuery(update);
}
public static void UploadCarcassInfo()
{
try
{
using (var session = DmoSession.New())
{
var needUpload = GetUnSyncData(session);
if (needUpload.Count == 0)
return;
var json = JsonConvert.SerializeObject(needUpload);
RpcFacade.Call<int>(RpcPath + "UploadCarcassInfo", json);
foreach (var item in needUpload)
SetLocalAsSyncd(item, session);
session.Commit();
}
}
catch
{
#if DEBUG
throw;
#endif
}
}
static List<CarcassInStoreObj> GetUnSyncData(IDmoSession session)
{
var query = new DQueryDom(new JoinAlias("_main", typeof(CarcassInStore)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("RowVersion"));
query.Columns.Add(DQSelectColumn.Field("BarCode"));
query.Columns.Add(DQSelectColumn.Field("UserID"));
query.Columns.Add(DQSelectColumn.Field("WorkUnit_ID"));
query.Columns.Add(DQSelectColumn.Field("ProductBatch_ID"));
query.Columns.Add(DQSelectColumn.Field("Goods_ID"));
query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("CreateTime"));
query.Where.Conditions.Add(DQCondition.And(
//DQExpression.Snippet("[_main].[BarCode] != ''"),
DQCondition.IsNotNull(DQExpression.Field("Weight")), DQCondition.EQ("Sync", false)));
query.Range = SelectRange.Top(10);
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID"));
var upload = new List<CarcassInStoreObj>();
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
{
var obj = new CarcassInStoreObj();
obj.ID = (long)reader[0];
obj.RowVersion = (int)reader[1];
obj.BarCode = (string)reader[2];
obj.InStoreWorker_ID = (long)reader[3];
obj.WorkUnit_ID = (long?)reader[4];
obj.ProductBatch_ID = (long?)reader[5];
obj.InStoreGoods_ID = (long)reader[6];
obj.InStoreWeight = (decimal)reader[7];
obj.InStoreTime = (DateTime)reader[8];
upload.Add(obj);
}
}
return upload;
}
static void SetLocalAsSyncd(CarcassInStoreObj obj, IDmoSession session)
{
var update = new DQUpdateDom(typeof(CarcassInStore));
update.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("ID", obj.ID), DQCondition.EQ("RowVersion", obj.RowVersion)));
update.Columns.Add(new DQUpdateColumn("Sync", true));
update.EExecute();
}
}
//class CarcassInStoreObj
//{
// public long ID { get; set; }
// public int RowVersion { get; set; }
// public string BarCode { get; set; }
// public long? InStoreWorker_ID { get; set; }
// public long? WorkUnit_ID { get; set; }
// public long? ProductBatch_ID { get; set; }
// public long? InStoreGoods_ID { get; set; }
// public decimal? InStoreWeight { get; set; }
// public DateTime? InStoreTime { get; set; }
//}
}

+ 137
- 0
ButcherFactory.BO/LocalBL/FormClientGoodsSetBL.cs View File

@ -0,0 +1,137 @@
using ButcherFactory.BO.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO.LocalBL
{
public static class FormClientGoodsSetBL
{
public static IEnumerable<ClientGoodsSet_Detail> GetGoodsList()
{
var main = new JoinAlias(typeof(ClientGoodsSet));
var detail = new JoinAlias(typeof(ClientGoodsSet_Detail));
var query = new DQueryDom(main);
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "ClientGoodsSet_ID"));
query.Columns.Add(DQSelectColumn.Field("Goods_ID", detail));
query.Columns.Add(DQSelectColumn.Field("Goods_Name", detail));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "Goods_ID"));
var list = query.EExecuteList<long, string>();
return list.Select(x => new ClientGoodsSet_Detail { Goods_ID = x.Item1, Goods_Name = x.Item2 });
}
public static Dictionary<string, IEnumerable<ClientGoodsSet_Detail>> GetGoodsSetDic()
{
var main = new JoinAlias(typeof(ClientGoodsSet));
var detail = new JoinAlias(typeof(ClientGoodsSet_Detail));
var set = new JoinAlias(typeof(GoodsSetTemp));
var query = new DQueryDom(main);
query.RegisterQueryTable(typeof(GoodsSetTemp), new string[] { "DetailID" }, GoodsSetTemp.GetQueryDom());
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "ClientGoodsSet_ID"));
query.From.AddJoin(JoinType.Left, new DQDmoSource(set), DQCondition.EQ(detail, "ID", set, "DetailID"));
query.Columns.Add(DQSelectColumn.Field("Name", main));
query.Columns.Add(DQSelectColumn.Field("Goods_Name", detail));
query.Columns.Add(DQSelectColumn.Field("ID", detail));
query.Columns.Add(DQSelectColumn.Field("DetailID", set));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(main, "ID"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "ID"));
var list = query.EExecuteList<string, string, long, long?>();
var result = new Dictionary<string, IEnumerable<ClientGoodsSet_Detail>>();
foreach (var item in list.GroupBy(x => x.Item1))
{
var arr = item.Select(x => new ClientGoodsSet_Detail { Goods_Name = x.Item2, ID = x.Item3, Selected = x.Item4.HasValue });
result.Add(item.Key, arr);
}
return result;
}
public static Dictionary<string, List<ClientGoodsSet_Detail>> GetSelectedDetail()
{
var main = new JoinAlias(typeof(ClientGoodsSet));
var detail = new JoinAlias(typeof(ClientGoodsSet_Detail));
var set = new JoinAlias(typeof(GoodsSetTemp));
var query = new DQueryDom(main);
query.RegisterQueryTable(typeof(GoodsSetTemp), new string[] { "DetailID" }, GoodsSetTemp.GetQueryDom());
query.From.AddJoin(JoinType.Inner, new DQDmoSource(detail), DQCondition.EQ(main, "ID", detail, "ClientGoodsSet_ID"));
query.From.AddJoin(JoinType.Inner, new DQDmoSource(set), DQCondition.EQ(detail, "ID", set, "DetailID"));
query.Columns.Add(DQSelectColumn.Field("Name", main));
query.Columns.Add(DQSelectColumn.Field("Goods_ID", detail));
query.Columns.Add(DQSelectColumn.Field("Goods_Name", detail));
query.Columns.Add(DQSelectColumn.Field("StandardWeight", detail));
query.Columns.Add(DQSelectColumn.Field("StandardWeightUp", detail));
query.Columns.Add(DQSelectColumn.Field("StandardWeightLow", detail));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(main, "ID"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "ID"));
var result = new Dictionary<string, List<ClientGoodsSet_Detail>>();
using (var session = DmoSession.New())
{
using (var reader = session.ExecuteReader(query))
{
var key = string.Empty;
while (reader.Read())
{
key = (string)reader[0];
var entity = new ClientGoodsSet_Detail();
entity.Goods_ID = (long)reader[1];
entity.Goods_Name = (string)reader[2];
entity.StandardWeight = (decimal?)reader[3];
entity.StandardWeightUp = (decimal?)reader[4];
entity.StandardWeightLow = (decimal?)reader[5];
if (result.ContainsKey(key))
result[key].Add(entity);
else
result.Add(key, new List<ClientGoodsSet_Detail> { entity });
}
}
}
return result;
}
public static void InsertWorkerGoodsSet(long detailID)
{
using (var session = DmoSession.New())
{
if (!ExistSet(detailID, session))
{
var entity = new WorkerGoodsSetProfile { Worker_ID = AppContext.Worker.ID, ClientGoodsSet_Detail_ID = detailID };
session.Insert(entity);
session.Commit();
}
}
}
static bool ExistSet(long detailID, IDmoSession session)
{
var query = new DQueryDom(new JoinAlias(typeof(WorkerGoodsSetProfile)));
query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(1), "c"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Worker_ID", AppContext.Worker.ID), DQCondition.EQ("ClientGoodsSet_Detail_ID", detailID)));
return query.EExecuteScalar(session) != null;
}
public static void DeleteWorkGoodsSet(long detailID)
{
var delete = new DQDeleteDom(typeof(WorkerGoodsSetProfile));
delete.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Worker_ID", AppContext.Worker.ID), DQCondition.EQ("ClientGoodsSet_Detail_ID", detailID)));
delete.EExecute();
}
}
class GoodsSetTemp
{
public long DetailID { get; set; }
public static DQueryDom GetQueryDom()
{
var query = new DQueryDom(new JoinAlias(typeof(WorkerGoodsSetProfile)));
query.Columns.Add(DQSelectColumn.Field("ClientGoodsSet_Detail_ID"));
query.Where.Conditions.Add(DQCondition.EQ("Worker_ID", AppContext.Worker.ID));
return query;
}
}
}

+ 120
- 0
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -0,0 +1,120 @@
using ButcherFactory.BO.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO.LocalBL
{
public static class SegmentProductionBL
{
const string RpcPath = @"/MainSystem/B3ClientService/Rpcs/SegmentProductionRpc/";
public static BindingList<SegmentProduction> GetListByState(bool submited)
{
var query = new DQueryDom(new JoinAlias(typeof(SegmentProduction)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("RowIndex"));
query.Columns.Add(DQSelectColumn.Field("BarCode"));
query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("Goods_Name"));
query.Columns.Add(DQSelectColumn.Field("GroupID"));
query.Columns.Add(DQSelectColumn.Field("TrunOut"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited)));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
if (submited)
query.Range = SelectRange.Top(20);
var list = new BindingList<SegmentProduction>();
using (var session = DmoSession.New())
{
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
{
var entity = new SegmentProduction();
entity.ID = (long)reader[0];
entity.RowIndex = (int?)reader[1];
entity.BarCode = (string)reader[2];
entity.Weight = (decimal)reader[3];
entity.Goods_Name = (string)reader[4];
entity.GroupID = (long?)reader[5];
entity.TrunOut = (bool)reader[6];
entity.Submited = submited;
list.Add(entity);
}
}
}
return list;
}
public static SegmentProduction Insert(long goodsID, decimal weight, long? workUnitID, long productBatchID, DateTime batchDate)
{
using (var session = DmoSession.New())
{
var entity = new SegmentProduction();
entity.Goods_ID = goodsID;
entity.Weight = weight;
entity.UserID = AppContext.Worker.ID;
entity.WorkUnit_ID = workUnitID;
entity.ProductBatch_ID = productBatchID;
entity.RowIndex = GenerateRowIndex(productBatchID, session);
entity.BarCode = string.Format("A26091201{0:yyyyMMdd}{1:00000}", batchDate, entity.RowIndex);
session.Insert(entity);
session.Commit();
return entity;
}
}
static int GenerateRowIndex(long productBatchID, IDmoSession session)
{
var query = new DQueryDom(new JoinAlias("_main", typeof(SegmentProduction)));
query.Columns.Add(DQSelectColumn.Max("RowIndex"));
query.Where.Conditions.Add(DQCondition.EQ("ProductBatch_ID", productBatchID));
return (query.EExecuteScalar<int?>(session) ?? 0) + 1;
}
public static long SetListGroupID(IEnumerable<long> ids)
{
using (var session = DmoSession.New())
{
var groupID = GenerateGroupID(session);
BatchUpdate(ids, session, new Tuple<string, object>("GroupID", groupID));
session.Commit();
return groupID;
}
}
static long GenerateGroupID(IDmoSession session)
{
var query = new DQueryDom(new JoinAlias("_main", typeof(SegmentProduction)));
query.Columns.Add(DQSelectColumn.Max("GroupID"));
return (query.EExecuteScalar<int?>(session) ?? 0) + 1;
}
static void BatchUpdate(IEnumerable<long> ids, IDmoSession session, params Tuple<string, object>[] keyValues)
{
var update = new DQUpdateDom(typeof(SegmentProduction));
update.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("ID"), ids.Select(x => DQExpression.Value(x)).ToArray()));
foreach (var item in keyValues)
update.Columns.Add(new DQUpdateColumn(item.Item1, item.Item2));
update.Columns.Add(new DQUpdateColumn("Sync", false));
update.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1))));
session.ExecuteNonQuery(update);
}
public static void BatchUpdate(IEnumerable<long> ids, params Tuple<string, object>[] keyValues)
{
using (var session = DmoSession.New())
{
BatchUpdate(ids, session, keyValues);
session.Commit();
}
}
}
}

+ 9
- 0
ButcherFactory.BO/Utils/Extensions.cs View File

@ -307,5 +307,14 @@ namespace ButcherFactory.BO
session.Commit();
}
}
public static void EExecute(this DQDeleteDom delete)
{
using (var session = DmoSession.New())
{
session.ExecuteNonQuery(delete);
session.Commit();
}
}
}
}

+ 28
- 1
ButcherFactory.Form/ButcherFactory.Form.csproj View File

@ -58,8 +58,13 @@
<DependentUpon>CarcassInStoreForm.cs</DependentUpon>
</Compile>
<Compile Include="CarcassInStore_\CarcassInStoreFormConfig.cs" />
<Compile Include="CarcassInStore_\CarcassInStoreFormOld.cs" />
<Compile Include="CarcassTakeOut_\CarcassTakeOutFormConfig.cs" />
<Compile Include="Dialogs\ClientGoodsSetDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Dialogs\ClientGoodsSetDialog.Designer.cs">
<DependentUpon>ClientGoodsSetDialog.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="CarcassTakeOut_\CarcassTakeOutForm.cs">
<SubType>Form</SubType>
@ -67,6 +72,19 @@
<Compile Include="CarcassTakeOut_\CarcassTakeOutForm.Designer.cs">
<DependentUpon>CarcassTakeOutForm.cs</DependentUpon>
</Compile>
<Compile Include="SegmentProduction_\SegmentProductionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SegmentProduction_\SegmentProductionForm.Designer.cs">
<DependentUpon>SegmentProductionForm.cs</DependentUpon>
</Compile>
<Compile Include="SegmentProduction_\SegmentProductionFormConfig.cs" />
<Compile Include="SegmentProduction_\TrunOutDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SegmentProduction_\TrunOutDialog.Designer.cs">
<DependentUpon>TrunOutDialog.cs</DependentUpon>
</Compile>
<Compile Include="Utils\ControlsUtil.cs" />
</ItemGroup>
<ItemGroup>
@ -82,6 +100,15 @@
<EmbeddedResource Include="CarcassTakeOut_\CarcassTakeOutForm.resx">
<DependentUpon>CarcassTakeOutForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Dialogs\ClientGoodsSetDialog.resx">
<DependentUpon>ClientGoodsSetDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SegmentProduction_\SegmentProductionForm.resx">
<DependentUpon>SegmentProductionForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SegmentProduction_\TrunOutDialog.resx">
<DependentUpon>TrunOutDialog.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.


+ 84
- 80
ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs View File

@ -29,18 +29,18 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassInStoreForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.lowWeight = new WinFormControl.UTextBoxWithPad();
this.noCodeBtn = new WinFormControl.UButton();
this.noWeightBtn = new WinFormControl.UButton();
this.closeBtn = new WinFormControl.UButton();
this.uTimerLabel1 = new WinFormControl.UTimerLabel();
@ -51,7 +51,6 @@
this.uWeightControl1 = new WinFormControl.UWeightControl();
this.uLabel1 = new WinFormControl.ULabel();
this.uLabel2 = new WinFormControl.ULabel();
this.uLabel5 = new WinFormControl.ULabel();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.historyDataGrid = new WinFormControl.UDataGridView();
@ -99,7 +98,7 @@
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.BackColor = System.Drawing.Color.Transparent;
this.splitContainer1.Panel1.Controls.Add(this.lowWeight);
this.splitContainer1.Panel1.Controls.Add(this.noCodeBtn);
this.splitContainer1.Panel1.Controls.Add(this.noWeightBtn);
this.splitContainer1.Panel1.Controls.Add(this.closeBtn);
this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1);
@ -110,28 +109,42 @@
this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1);
this.splitContainer1.Panel1.Controls.Add(this.uLabel1);
this.splitContainer1.Panel1.Controls.Add(this.uLabel2);
this.splitContainer1.Panel1.Controls.Add(this.uLabel5);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1228, 611);
this.splitContainer1.Size = new System.Drawing.Size(1305, 611);
this.splitContainer1.SplitterDistance = 86;
this.splitContainer1.TabIndex = 0;
//
// lowWeight
//
this.lowWeight.Font = new System.Drawing.Font("宋体", 15F);
this.lowWeight.Location = new System.Drawing.Point(512, 47);
this.lowWeight.Name = "lowWeight";
this.lowWeight.Size = new System.Drawing.Size(49, 30);
this.lowWeight.TabIndex = 13;
this.lowWeight.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
// noCodeBtn
//
this.noCodeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.noCodeBtn.AsClicked = false;
this.noCodeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("noCodeBtn.BackgroundImage")));
this.noCodeBtn.EnableGroup = false;
this.noCodeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.noCodeBtn.FlatAppearance.BorderSize = 0;
this.noCodeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.noCodeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.noCodeBtn.ForeColor = System.Drawing.Color.Black;
this.noCodeBtn.Location = new System.Drawing.Point(646, 44);
this.noCodeBtn.Name = "noCodeBtn";
this.noCodeBtn.PlaySound = false;
this.noCodeBtn.SelfControlEnable = false;
this.noCodeBtn.Size = new System.Drawing.Size(111, 34);
this.noCodeBtn.SoundType = WinFormControl.SoundType.Click;
this.noCodeBtn.TabIndex = 12;
this.noCodeBtn.Text = "无 码";
this.noCodeBtn.UseVisualStyleBackColor = true;
this.noCodeBtn.WithStataHode = true;
this.noCodeBtn.Click += new System.EventHandler(this.noCodeBtn_Click);
//
// noWeightBtn
//
this.noWeightBtn.AsClicked = false;
this.noWeightBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("noWeightBtn.BackgroundImage")));
this.noWeightBtn.EnableGroup = false;
this.noWeightBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.noWeightBtn.FlatAppearance.BorderSize = 0;
this.noWeightBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@ -140,6 +153,7 @@
this.noWeightBtn.Location = new System.Drawing.Point(358, 44);
this.noWeightBtn.Name = "noWeightBtn";
this.noWeightBtn.PlaySound = false;
this.noWeightBtn.SelfControlEnable = false;
this.noWeightBtn.Size = new System.Drawing.Size(111, 34);
this.noWeightBtn.SoundType = WinFormControl.SoundType.Click;
this.noWeightBtn.TabIndex = 11;
@ -153,14 +167,16 @@
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.AsClicked = false;
this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage")));
this.closeBtn.EnableGroup = false;
this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.closeBtn.FlatAppearance.BorderSize = 0;
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(1110, 7);
this.closeBtn.Location = new System.Drawing.Point(1187, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 9;
@ -176,7 +192,7 @@
this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent;
this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F);
this.uTimerLabel1.Format = "M月d日 H:mm:ss";
this.uTimerLabel1.Location = new System.Drawing.Point(1088, 53);
this.uTimerLabel1.Location = new System.Drawing.Point(1165, 53);
this.uTimerLabel1.Name = "uTimerLabel1";
this.uTimerLabel1.Size = new System.Drawing.Size(128, 16);
this.uTimerLabel1.TabIndex = 8;
@ -187,7 +203,7 @@
this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F);
this.productBatchSelect.FormattingEnabled = true;
this.productBatchSelect.Location = new System.Drawing.Point(907, 47);
this.productBatchSelect.Location = new System.Drawing.Point(984, 47);
this.productBatchSelect.Name = "productBatchSelect";
this.productBatchSelect.Size = new System.Drawing.Size(170, 28);
this.productBatchSelect.TabIndex = 4;
@ -197,7 +213,7 @@
this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F);
this.workUnitSelect.FormattingEnabled = true;
this.workUnitSelect.Location = new System.Drawing.Point(907, 11);
this.workUnitSelect.Location = new System.Drawing.Point(984, 11);
this.workUnitSelect.Name = "workUnitSelect";
this.workUnitSelect.Size = new System.Drawing.Size(170, 28);
this.workUnitSelect.TabIndex = 3;
@ -206,7 +222,7 @@
//
this.uScanPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uScanPanel1.BackColor = System.Drawing.Color.Transparent;
this.uScanPanel1.Location = new System.Drawing.Point(503, 9);
this.uScanPanel1.Location = new System.Drawing.Point(580, 9);
this.uScanPanel1.Name = "uScanPanel1";
this.uScanPanel1.Size = new System.Drawing.Size(303, 32);
this.uScanPanel1.TabIndex = 2;
@ -234,7 +250,7 @@
this.uLabel1.AutoSize = true;
this.uLabel1.BackColor = System.Drawing.Color.Transparent;
this.uLabel1.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel1.Location = new System.Drawing.Point(806, 14);
this.uLabel1.Location = new System.Drawing.Point(883, 14);
this.uLabel1.Name = "uLabel1";
this.uLabel1.Size = new System.Drawing.Size(109, 20);
this.uLabel1.TabIndex = 5;
@ -246,23 +262,12 @@
this.uLabel2.AutoSize = true;
this.uLabel2.BackColor = System.Drawing.Color.Transparent;
this.uLabel2.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel2.Location = new System.Drawing.Point(806, 50);
this.uLabel2.Location = new System.Drawing.Point(883, 50);
this.uLabel2.Name = "uLabel2";
this.uLabel2.Size = new System.Drawing.Size(109, 20);
this.uLabel2.TabIndex = 6;
this.uLabel2.Text = "生产批次:";
//
// uLabel5
//
this.uLabel5.AutoSize = true;
this.uLabel5.BackColor = System.Drawing.Color.Transparent;
this.uLabel5.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel5.Location = new System.Drawing.Point(468, 53);
this.uLabel5.Name = "uLabel5";
this.uLabel5.Size = new System.Drawing.Size(49, 20);
this.uLabel5.TabIndex = 12;
this.uLabel5.Text = "低重";
//
// splitContainer2
//
this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@ -282,8 +287,8 @@
//
this.splitContainer2.Panel2.BackColor = System.Drawing.Color.Transparent;
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel1);
this.splitContainer2.Size = new System.Drawing.Size(1228, 521);
this.splitContainer2.SplitterDistance = 673;
this.splitContainer2.Size = new System.Drawing.Size(1305, 521);
this.splitContainer2.SplitterDistance = 639;
this.splitContainer2.TabIndex = 0;
//
// groupBox2
@ -296,7 +301,7 @@
this.groupBox2.Location = new System.Drawing.Point(11, 254);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(5);
this.groupBox2.Size = new System.Drawing.Size(648, 254);
this.groupBox2.Size = new System.Drawing.Size(614, 254);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
//
@ -306,15 +311,15 @@
this.historyDataGrid.AllowUserToDeleteRows = false;
this.historyDataGrid.AllowUserToResizeColumns = false;
this.historyDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
this.historyDataGrid.BackgroundColor = System.Drawing.Color.White;
this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle22.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_ID,
@ -330,12 +335,12 @@
this.historyDataGrid.Name = "historyDataGrid";
this.historyDataGrid.ReadOnly = true;
this.historyDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle26;
this.historyDataGrid.RowTemplate.Height = 23;
this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyDataGrid.Size = new System.Drawing.Size(638, 230);
this.historyDataGrid.Size = new System.Drawing.Size(604, 230);
this.historyDataGrid.TabIndex = 2;
//
// H_ID
@ -373,8 +378,8 @@
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle23.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle23;
this.H_Weight.HeaderText = "入库重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
@ -382,8 +387,8 @@
// H_BeforeWeight
//
this.H_BeforeWeight.DataPropertyName = "BeforeWeight";
dataGridViewCellStyle4.Format = "#0.######";
this.H_BeforeWeight.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle24.Format = "#0.######";
this.H_BeforeWeight.DefaultCellStyle = dataGridViewCellStyle24;
this.H_BeforeWeight.HeaderText = "胴体重量";
this.H_BeforeWeight.Name = "H_BeforeWeight";
this.H_BeforeWeight.ReadOnly = true;
@ -391,8 +396,8 @@
// H_Discont
//
this.H_Discont.DataPropertyName = "Discont";
dataGridViewCellStyle5.Format = "#0.######";
this.H_Discont.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle25.Format = "#0.######";
this.H_Discont.DefaultCellStyle = dataGridViewCellStyle25;
this.H_Discont.HeaderText = "损耗";
this.H_Discont.Name = "H_Discont";
this.H_Discont.ReadOnly = true;
@ -417,7 +422,7 @@
this.groupBox1.Location = new System.Drawing.Point(11, 15);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(648, 226);
this.groupBox1.Size = new System.Drawing.Size(614, 226);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//
@ -427,15 +432,15 @@
this.needSubmitGrid.AllowUserToDeleteRows = false;
this.needSubmitGrid.AllowUserToResizeColumns = false;
this.needSubmitGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.needSubmitGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.needSubmitGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27;
this.needSubmitGrid.BackgroundColor = System.Drawing.Color.White;
this.needSubmitGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.needSubmitGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle28.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.needSubmitGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
this.needSubmitGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.needSubmitGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.U_ID,
@ -448,12 +453,12 @@
this.needSubmitGrid.Name = "needSubmitGrid";
this.needSubmitGrid.ReadOnly = true;
this.needSubmitGrid.RowHeadersVisible = false;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.needSubmitGrid.RowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.needSubmitGrid.RowsDefaultCellStyle = dataGridViewCellStyle30;
this.needSubmitGrid.RowTemplate.Height = 23;
this.needSubmitGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.needSubmitGrid.Size = new System.Drawing.Size(638, 202);
this.needSubmitGrid.Size = new System.Drawing.Size(604, 202);
this.needSubmitGrid.TabIndex = 1;
//
// U_ID
@ -483,8 +488,8 @@
// U_Weight
//
this.U_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle9.Format = "#0.######";
this.U_Weight.DefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle29.Format = "#0.######";
this.U_Weight.DefaultCellStyle = dataGridViewCellStyle29;
this.U_Weight.HeaderText = "重量";
this.U_Weight.Name = "U_Weight";
this.U_Weight.ReadOnly = true;
@ -506,7 +511,7 @@
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(549, 519);
this.flowLayoutPanel1.Size = new System.Drawing.Size(660, 519);
this.flowLayoutPanel1.TabIndex = 0;
//
// CarcassInStoreForm
@ -514,10 +519,10 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1228, 611);
this.ClientSize = new System.Drawing.Size(1305, 611);
this.Controls.Add(this.splitContainer1);
this.KeyPreview = true;
this.MinimumSize = new System.Drawing.Size(1244, 650);
this.MinimumSize = new System.Drawing.Size(1321, 650);
this.Name = "CarcassInStoreForm";
this.Text = "白条入库";
this.splitContainer1.Panel1.ResumeLayout(false);
@ -564,8 +569,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn U_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn U_Weight;
private WinFormControl.UButton noWeightBtn;
private WinFormControl.ULabel uLabel5;
private WinFormControl.UTextBoxWithPad lowWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode;
@ -573,6 +576,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_BeforeWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Discont;
private WinFormControl.UButton noCodeBtn;
}

+ 66
- 92
ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs View File

@ -33,26 +33,27 @@ namespace ButcherFactory.CarcassInStore_
#endregion
Thread syncPadTask;
Thread syncBeforeWeight;
Thread uploadData;
Thread checkWeight;
BindingList<CarcassInStore> needSubmitedList;
BindingList<CarcassInStore> historyList;
long? workUnitID;
long? batchID;
decimal? errorWeight = null;
List<int> errorWeight = new List<int>();
string strErrorWeight = "";
public CarcassInStoreForm()
{
InitializeComponent();
netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500);
this.FormClosing += delegate
{
if (syncPadTask != null && syncPadTask.IsAlive)
syncPadTask.Abort();
if (syncBeforeWeight != null && syncBeforeWeight.IsAlive)
syncBeforeWeight.Abort();
if (uploadData != null && uploadData.IsAlive)
uploadData.Abort();
if (checkWeight != null && checkWeight.IsAlive)
checkWeight.Abort();
};
workUnitSelect.SelectedIndexChanged += delegate
{
@ -60,7 +61,7 @@ namespace ButcherFactory.CarcassInStore_
workUnitID = null;
else
workUnitID = (long)workUnitSelect.SelectedValue;
SaveConfig(workUnitSelect, EventArgs.Empty);
XmlUtil.SerializerObjToFile(new CarcassInStoreFormConfig { Weight = strErrorWeight, WorkUnitID = workUnitID });
};
productBatchSelect.SelectedIndexChanged += delegate
{
@ -69,24 +70,6 @@ namespace ButcherFactory.CarcassInStore_
else
batchID = (long)productBatchSelect.SelectedValue;
};
lowWeight.LostFocus += SaveConfig;
}
void SaveConfig(object sender, EventArgs e)
{
var txt = lowWeight.Text.Trim();
if (string.IsNullOrEmpty(txt))
errorWeight = null;
else
{
decimal v;
if (decimal.TryParse(lowWeight.Text.Trim(), out v))
errorWeight = v;
else
lowWeight.Text = string.Format("{0:#0.######}", errorWeight);
}
XmlUtil.SerializerObjToFile(new CarcassInStoreFormConfig { Weight = errorWeight, WorkUnitID = workUnitID });
}
protected override void OnLoad(EventArgs e)
@ -95,9 +78,6 @@ namespace ButcherFactory.CarcassInStore_
var initTask = new Thread(LoadBind);
initTask.Start();
syncPadTask = new Thread(SyncPadData);
syncPadTask.Start();
syncBeforeWeight = new Thread(GetBeforeWeight);
syncBeforeWeight.Start();
@ -112,18 +92,38 @@ namespace ButcherFactory.CarcassInStore_
{
this.Invoke(new Action(() =>
{
var entity = CarcassInStoreBL.Insert(workUnitID, batchID, weight);
needSubmitedList.Insert(0, entity);
needSubmitGrid.FirstDisplayedScrollingRowIndex = 0;
needSubmitGrid.Refresh();
if (errorWeight.HasValue && weight != 0 && weight < errorWeight)
SoundPalyUtil.PlaySound("Sounds\\wtl.wav");
var last = needSubmitedList.LastOrDefault();
if (last == null)
{
SoundPalyUtil.PlaySound(SoundType.Error);
return;
}
else
SoundPalyUtil.PlaySound(SoundType.ShotSucc);
{
last.Weight = weight;
CarcassInStoreBL.FillWeight(last.ID, weight);
needSubmitedList.Remove(last);
needSubmitGrid.Refresh();
historyList.Insert(0, last);
if (historyList.Count > 100)
historyList.RemoveAt(100);
historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
historyDataGrid.Refresh();
checkWeight = new Thread(new ParameterizedThreadStart(CheckWeight));
checkWeight.Start(weight);
}
}));
}
}
void CheckWeight(object objWeight)
{
decimal weight = (decimal)objWeight;
var first = errorWeight.FirstOrDefault(x => x > weight);
if (first != 0)
SoundPalyUtil.PlaySound(string.Format("Sounds\\l{0}.wav", first));
}
void LoadBind()
{
this.Invoke(new Action(() =>
@ -134,12 +134,13 @@ namespace ButcherFactory.CarcassInStore_
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
}
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today);
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, "Date");
var config = XmlUtil.DeserializeFromFile<CarcassInStoreFormConfig>();
if (config.Weight.HasValue)
if (!string.IsNullOrEmpty(config.Weight))
{
lowWeight.Text = config.Weight.Value.ToString("#0.######");
errorWeight = config.Weight;
strErrorWeight = config.Weight;
var arr = strErrorWeight.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).OrderBy(x => x);
errorWeight.AddRange(arr);
}
workUnitSelect.EBindComboBox<WorkUnit>(x => x.ID == config.WorkUnitID);
@ -148,40 +149,45 @@ namespace ButcherFactory.CarcassInStore_
}));
}
bool noCode = false;
void BindGoods()
{
var goods = CarcassInStoreBL.GetGoodsList();
var goods = FormClientGoodsSetBL.GetGoodsList();
foreach (var item in goods)
{
var btn = new UButton() { Width = 130, Height = 75, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(26, 10, 26, 35), PlaySound = true };
var btn = new UButton() { Width = 120, Height = 75, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(22, 10, 22, 30), PlaySound = true };
btn.Click += (sender, e) =>
{
if (!string.IsNullOrEmpty(uScanPanel1.TextBox.Text) && uScanPanel1.TextBox.Text.Length != 23)
var code = uScanPanel1.TextBox.Text;
if (!noCode && code.Length != 23)
throw new Exception("条码格式不正确");
var c = sender as UButton;
GoodsBtnClick((long)c.Tag, c.Text);
uScanPanel1.TextBox.Text = string.Empty;
Insert(code, (long)c.Tag, c.Text);
if (noCode)
{
noCodeBtn_Click(sender, EventArgs.Empty);
noCodeBtn.AsClicked = false;
}
else
uScanPanel1.TextBox.Text = string.Empty;
};
flowLayoutPanel1.Controls.Add(btn);
}
}
static object _lock = new object();
void GoodsBtnClick(long goodsID, string goodsName)
void Insert(string barCode, long goodsID, string goodsName)
{
lock (_lock)
{
var last = needSubmitedList.LastOrDefault();
if (last == null)
throw new Exception("未过称");
CarcassInStoreBL.Update(last.ID, goodsID, uScanPanel1.TextBox.Text);
last.Goods_Name = goodsName;
last.BarCode = uScanPanel1.TextBox.Text;
historyList.Insert(0,last);
needSubmitedList.Remove(last);
historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
if (batchID == null)
throw new Exception("没有批次信息");
var entity = CarcassInStoreBL.Insert(workUnitID, batchID.Value, goodsID, barCode);
entity.Goods_Name = goodsName;
needSubmitedList.Insert(0, entity);
needSubmitGrid.FirstDisplayedScrollingRowIndex = 0;
needSubmitGrid.Refresh();
historyDataGrid.Refresh();
}
}
@ -196,45 +202,6 @@ namespace ButcherFactory.CarcassInStore_
historyDataGrid.Refresh();
}
void SyncPadData()
{
while (true)
{
if (this.IsHandleCreated)
{
this.Invoke(new Action(() =>
{
if (netStateWatch1.NetState)
SyncFromPad();
}));
}
Thread.Sleep(2000);
}
}
void SyncFromPad()
{
lock (_lock)
{
if (needSubmitedList.Any())
{
CarcassInStoreBL.DoWithPadData(needSubmitedList);
var filled = needSubmitedList.Where(x => x.Goods_ID.HasValue).ToList();
foreach (var item in filled)
{
needSubmitedList.Remove(item);
historyList.Insert(0, item);
}
if (filled.Any())
{
needSubmitGrid.Refresh();
historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
historyDataGrid.Refresh();
}
}
}
}
void GetBeforeWeight()
{
while (true)
@ -288,5 +255,12 @@ namespace ButcherFactory.CarcassInStore_
{
ReceiveWeight(0);
}
private void noCodeBtn_Click(object sender, EventArgs e)
{
noCode = !noCode;
noCodeBtn.Text = noCode ? "等待插入" : "无 码";
}
}
}

+ 8
- 0
ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx View File

@ -118,6 +118,14 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="noCodeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="noWeightBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO


+ 1
- 1
ButcherFactory.Form/CarcassInStore_/CarcassInStoreFormConfig.cs View File

@ -8,7 +8,7 @@ namespace ButcherFactory.CarcassInStore_
{
public class CarcassInStoreFormConfig
{
public decimal? Weight { get; set; }
public string Weight { get; set; }
public long? WorkUnitID { get; set; }
}


+ 0
- 329
ButcherFactory.Form/CarcassInStore_/CarcassInStoreFormOld.cs View File

@ -1,329 +0,0 @@
//using ButcherFactory.BO;
//using ButcherFactory.BO.Rpcs;
//using ButcherFactory.BO.Utils;
//using System;
//using System.Collections.Generic;
//using System.ComponentModel;
//using System.Data;
//using System.Drawing;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
//using System.Windows.Forms;
//using ButcherFactory.Utils;
//using ButcherFactory.BO.LocalBL;
//using WinFormControl;
//using System.Threading;
//namespace ButcherFactory.CarcassInStore_
//{
// public partial class CarcassInStoreFormOld:Form, IWithRoleForm
// {
// #region IWithRoleForm
// public List<short> RoleName
// {
// get { return new List<short> { (short)设备类别.白条入库 }; }
// }
// public Form Generate()
// {
// return this;
// }
// #endregion
// Thread syncPadTask;
// Thread syncBeforeWeight;
// Thread uploadData;
// BindingList<CarcassInStore> needSubmitedList;
// BindingList<CarcassInStore> historyList;
// long? workUnitID;
// long? batchID;
// decimal? errorWeight = null;
// public CarcassInStoreForm()
// {
// InitializeComponent();
// netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500);
// this.FormClosing += delegate
// {
// if (syncPadTask != null && syncPadTask.IsAlive)
// syncPadTask.Abort();
// if (syncBeforeWeight != null && syncBeforeWeight.IsAlive)
// syncBeforeWeight.Abort();
// if (uploadData != null && uploadData.IsAlive)
// uploadData.Abort();
// };
// workUnitSelect.SelectedIndexChanged += delegate
// {
// if (workUnitSelect.SelectedValue == null)
// workUnitID = null;
// else
// workUnitID = (long)workUnitSelect.SelectedValue;
// SaveConfig(workUnitSelect, EventArgs.Empty);
// };
// productBatchSelect.SelectedIndexChanged += delegate
// {
// if (productBatchSelect.SelectedValue == null)
// batchID = null;
// else
// batchID = (long)productBatchSelect.SelectedValue;
// };
// lowWeight.LostFocus += SaveConfig;
// }
// void SaveConfig(object sender, EventArgs e)
// {
// var txt = lowWeight.Text.Trim();
// if (string.IsNullOrEmpty(txt))
// errorWeight = null;
// else
// {
// decimal v;
// if (decimal.TryParse(lowWeight.Text.Trim(), out v))
// errorWeight = v;
// else
// lowWeight.Text = string.Format("{0:#0.######}", errorWeight);
// }
// XmlUtil.SerializerObjToFile(new CarcassInStoreFormConfig { Weight = errorWeight, WorkUnitID = workUnitID });
// }
// protected override void OnLoad(EventArgs e)
// {
// base.OnLoad(e);
// var initTask = new Thread(LoadBind);
// initTask.Start();
// syncPadTask = new Thread(SyncPadData);
// syncPadTask.Start();
// syncBeforeWeight = new Thread(GetBeforeWeight);
// syncBeforeWeight.Start();
// uploadData = new Thread(UpLoadLocalData);
// uploadData.Start();
// uWeightControl1.ReceivedValue += ReceiveWeight;
// }
// void ReceiveWeight(decimal weight)
// {
// lock (_lock)
// {
// this.Invoke(new Action(() =>
// {
// var last = needSubmitedList.LastOrDefault();
// if (last == null)
// {
// SoundPalyUtil.PlaySound(SoundType.Error);
// return;
// }
// else
// {
// last.Weight = weight;
// CarcassInStoreBL.Update(last.ID, "Weight", weight);
// needSubmitedList.Remove(last);
// needSubmitGrid.Refresh();
// historyList.Insert(0, last);
// if (historyList.Any())
// historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
// historyDataGrid.Refresh();
// if (errorWeight.HasValue && weight != 0 && weight < errorWeight)
// SoundPalyUtil.PlaySound("Sounds\\wtl.wav");
// else
// SoundPalyUtil.PlaySound(SoundType.ShotSucc);
// }
// }));
// }
// }
// void LoadBind()
// {
// this.Invoke(new Action(() =>
// {
// if (netStateWatch1.NetState)
// {
// BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.白条出入库);
// BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
// BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
// }
// productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today);
// var config = XmlUtil.DeserializeFromFile<CarcassInStoreFormConfig>();
// if (config.Weight.HasValue)
// {
// lowWeight.Text = config.Weight.Value.ToString("#0.######");
// errorWeight = config.Weight;
// }
// workUnitSelect.EBindComboBox<WorkUnit>(x => x.ID == config.WorkUnitID);
// BindGoods();
// BindGrid();
// }));
// }
// void BindGoods()
// {
// var goods = CarcassInStoreBL.GetGoodsList();
// foreach (var item in goods)
// {
// var btn = new UButton() { Width = 130, Height = 75, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(26, 10, 26, 35), PlaySound = true };
// btn.Click += (sender, e) =>
// {
// if (!noCode)
// {
// if (string.IsNullOrEmpty(uScanPanel1.TextBox.Text))
// throw new Exception("请先扫码");
// if (uScanPanel1.TextBox.Text.Length != 23)
// throw new Exception("条码格式不正确");
// }
// var c = sender as UButton;
// var list = CarcassInStoreBL.InsertOrUpdate(workUnitID, batchID, (long)c.Tag, uScanPanel1.TextBox.Text);
// AfterUpdateOrInsert(list);
// uScanPanel1.TextBox.Text = string.Empty;
// if (noCode)
// {
// noCodeBtn_Click(c, EventArgs.Empty);
// noCodeBtn.AsClicked = false;
// }
// };
// flowLayoutPanel1.Controls.Add(btn);
// }
// }
// static object _lock = new object();
// void AfterUpdateOrInsert(List<CarcassInStore> list)
// {
// lock (_lock)
// {
// bool upNeedRefresh = false;
// bool downNeedRefresh = false;
// foreach (var item in list)
// {
// if (item.Weight.HasValue)
// {
// var first = historyList.FirstOrDefault(x => x.ID == item.ID);
// if (first != null)
// {
// first.Goods_Name = item.Goods_Name;
// downNeedRefresh = true;
// }
// }
// else
// {
// var upFirst = needSubmitedList.FirstOrDefault(x => x.ID == item.ID);
// if (upFirst != null)
// upFirst.Goods_Name = item.Goods_Name;
// else
// needSubmitedList.Insert(0, item);
// upNeedRefresh = true;
// }
// }
// if (upNeedRefresh)
// {
// if (needSubmitedList.Any())
// needSubmitGrid.FirstDisplayedScrollingRowIndex = 0;
// needSubmitGrid.Refresh();
// }
// else if (downNeedRefresh)
// historyDataGrid.Refresh();
// }
// }
// void BindGrid()
// {
// needSubmitedList = CarcassInStoreBL.GetLocalDataWithState(false);
// needSubmitGrid.DataSource = needSubmitedList;
// needSubmitGrid.Refresh();
// historyList = CarcassInStoreBL.GetLocalDataWithState(true);
// historyDataGrid.DataSource = historyList;
// historyDataGrid.Refresh();
// }
// void SyncPadData()
// {
// while (true)
// {
// if (this.IsHandleCreated)
// {
// this.Invoke(new Action(() =>
// {
// if (netStateWatch1.NetState)
// {
// var list = CarcassInStoreBL.DoWithPadData(workUnitID, batchID);
// if (list.Any())
// AfterUpdateOrInsert(list);
// }
// }));
// }
// Thread.Sleep(2000);
// }
// }
// void GetBeforeWeight()
// {
// while (true)
// {
// if (this.IsHandleCreated)
// {
// this.Invoke(new Action(() =>
// {
// if (netStateWatch1.NetState)
// {
// var list = historyList.Where(x => x.BeforeWeight == null && !string.IsNullOrEmpty(x.BarCode)).Take(5);
// if (list.Any())
// {
// var back = CarcassInStoreBL.GetBeforeWeight(list.Select(x => x.BarCode));
// if (back.Any())
// {
// foreach (var item in back)
// list.First(x => x.BarCode == item.StringExt1).BeforeWeight = item.DecimalExt1;
// historyDataGrid.Refresh();
// }
// }
// }
// }));
// }
// Thread.Sleep(2000);
// }
// }
// void UpLoadLocalData()
// {
// while (true)
// {
// if (this.IsHandleCreated)
// {
// this.Invoke(new Action(() =>
// {
// if (netStateWatch1.NetState)
// CarcassInStoreBL.UploadCarcassInfo();
// }));
// }
// Thread.Sleep(2000);
// }
// }
// private void closeBtn_Click(object sender, EventArgs e)
// {
// Close();
// }
// bool noCode;
// private void noCodeBtn_Click(object sender, EventArgs e)
// {
// if (noCode)
// noCodeBtn.Text = "无 码";
// else
// noCodeBtn.Text = "等待插入";
// noCode = !noCode;
// }
// private void noWeightBtn_Click(object sender, EventArgs e)
// {
// ReceiveWeight(0);
// }
// }
//}

+ 101
- 0
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs View File

@ -0,0 +1,101 @@
namespace ButcherFactory.Dialogs
{
partial class ClientGoodsSetDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClientGoodsSetDialog));
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeBtn = new WinFormControl.UButton();
this.SuspendLayout();
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel2.Location = new System.Drawing.Point(10, 130);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(797, 384);
this.flowLayoutPanel2.TabIndex = 24;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(10, 52);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(797, 70);
this.flowLayoutPanel1.TabIndex = 22;
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.AsClicked = false;
this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage")));
this.closeBtn.EnableGroup = false;
this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.closeBtn.FlatAppearance.BorderSize = 0;
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(696, 2);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 26;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.WithStataHode = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// ClientGoodsSetDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(819, 533);
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);
this.Name = "ClientGoodsSetDialog";
this.Text = "存货设置";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private WinFormControl.UButton closeBtn;
}
}

+ 68
- 0
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs View File

@ -0,0 +1,68 @@
using ButcherFactory.BO;
using ButcherFactory.BO.LocalBL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Dialogs
{
public partial class ClientGoodsSetDialog : Form
{
Dictionary<string, IEnumerable<ClientGoodsSet_Detail>> goodsSetDic;
public ClientGoodsSetDialog()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
goodsSetDic = FormClientGoodsSetBL.GetGoodsSetDic();
foreach (var item in goodsSetDic)
{
var btn = new UButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), WithStataHode = true, EnableGroup = true };
btn.Click += GroupBtnClick;
flowLayoutPanel1.Controls.Add(btn);
}
}
void GroupBtnClick(object sender, EventArgs e)
{
flowLayoutPanel2.Controls.Clear();
var groupBtn = sender as UButton;
var arr = goodsSetDic[groupBtn.Text];
foreach (var item in arr)
{
var btn = new UButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), Margin = new Padding(20, 10, 20, 35), PlaySound = true, WithStataHode = true };
if (item.Selected)
btn.AsClicked = true;
btn.Click += GoodsBtnClick;
flowLayoutPanel2.Controls.Add(btn);
}
}
void GoodsBtnClick(object sender, EventArgs e)
{
var btn = sender as UButton;
var detail = btn.Tag as ClientGoodsSet_Detail;
if (detail.Selected)
FormClientGoodsSetBL.DeleteWorkGoodsSet(detail.ID);
else
FormClientGoodsSetBL.InsertWorkerGoodsSet(detail.ID);
detail.Selected = !detail.Selected;
}
private void closeBtn_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

+ 129
- 0
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.resx View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
</root>

+ 713
- 0
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs View File

@ -0,0 +1,713 @@
namespace ButcherFactory.SegmentProduction_
{
partial class SegmentProductionForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SegmentProductionForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle67 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle68 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle70 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle69 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle61 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle62 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle66 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle64 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle65 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.barPrintCheck = new System.Windows.Forms.CheckBox();
this.productBatchSelect = new System.Windows.Forms.ComboBox();
this.workUnitSelect = new System.Windows.Forms.ComboBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeBtn = new WinFormControl.UButton();
this.uTimerLabel1 = new WinFormControl.UTimerLabel();
this.uLabel1 = new WinFormControl.ULabel();
this.uLabel2 = new WinFormControl.ULabel();
this.netStateWatch1 = new WinFormControl.NetStateWatch();
this.uWeightControl1 = new WinFormControl.UWeightControl();
this.submitBtn = new WinFormControl.UButton();
this.deleteBtn = new WinFormControl.UButton();
this.rePrintBtn = new WinFormControl.UButton();
this.historyDataGrid = new WinFormControl.UDataGridView();
this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uLabel3 = new WinFormControl.ULabel();
this.taskDataGrid = new WinFormControl.UDataGridView();
this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsLabel = new WinFormControl.ULabel();
this.trunOutBtn = new WinFormControl.UButton();
this.switchBtn = new WinFormControl.UButton();
this.goodsSetBtn = new WinFormControl.UButton();
this.endBtn = new WinFormControl.UButton();
this.startBtn = new WinFormControl.UButton();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck);
this.splitContainer1.Panel1.Controls.Add(this.closeBtn);
this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1);
this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect);
this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect);
this.splitContainer1.Panel1.Controls.Add(this.uLabel1);
this.splitContainer1.Panel1.Controls.Add(this.uLabel2);
this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1);
this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1226, 602);
this.splitContainer1.SplitterDistance = 87;
this.splitContainer1.TabIndex = 0;
//
// barPrintCheck
//
this.barPrintCheck.AutoSize = true;
this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F);
this.barPrintCheck.Location = new System.Drawing.Point(359, 50);
this.barPrintCheck.Name = "barPrintCheck";
this.barPrintCheck.Size = new System.Drawing.Size(108, 24);
this.barPrintCheck.TabIndex = 16;
this.barPrintCheck.Text = "启用打码";
this.barPrintCheck.UseVisualStyleBackColor = true;
//
// productBatchSelect
//
this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F);
this.productBatchSelect.FormattingEnabled = true;
this.productBatchSelect.Location = new System.Drawing.Point(903, 47);
this.productBatchSelect.Name = "productBatchSelect";
this.productBatchSelect.Size = new System.Drawing.Size(170, 28);
this.productBatchSelect.TabIndex = 11;
//
// workUnitSelect
//
this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F);
this.workUnitSelect.FormattingEnabled = true;
this.workUnitSelect.Location = new System.Drawing.Point(903, 11);
this.workUnitSelect.Name = "workUnitSelect";
this.workUnitSelect.Size = new System.Drawing.Size(170, 28);
this.workUnitSelect.TabIndex = 10;
//
// splitContainer2
//
this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.submitBtn);
this.splitContainer2.Panel1.Controls.Add(this.deleteBtn);
this.splitContainer2.Panel1.Controls.Add(this.rePrintBtn);
this.splitContainer2.Panel1.Controls.Add(this.groupBox1);
this.splitContainer2.Panel1.Controls.Add(this.groupBox2);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.trunOutBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel2);
this.splitContainer2.Panel2.Controls.Add(this.switchBtn);
this.splitContainer2.Panel2.Controls.Add(this.goodsSetBtn);
this.splitContainer2.Panel2.Controls.Add(this.endBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel1);
this.splitContainer2.Panel2.Controls.Add(this.startBtn);
this.splitContainer2.Size = new System.Drawing.Size(1226, 511);
this.splitContainer2.SplitterDistance = 554;
this.splitContainer2.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.historyDataGrid);
this.groupBox1.Controls.Add(this.uLabel3);
this.groupBox1.Location = new System.Drawing.Point(10, 174);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(533, 332);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.taskDataGrid);
this.groupBox2.Controls.Add(this.GoodsLabel);
this.groupBox2.Location = new System.Drawing.Point(9, 8);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(5);
this.groupBox2.Size = new System.Drawing.Size(533, 120);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel2.Location = new System.Drawing.Point(-3, 125);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(670, 384);
this.flowLayoutPanel2.TabIndex = 21;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(-3, 49);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(547, 70);
this.flowLayoutPanel1.TabIndex = 0;
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.AsClicked = false;
this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage")));
this.closeBtn.EnableGroup = false;
this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.closeBtn.FlatAppearance.BorderSize = 0;
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(1106, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 15;
this.closeBtn.Text = "关 闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.WithStataHode = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// uTimerLabel1
//
this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uTimerLabel1.AutoSize = true;
this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent;
this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F);
this.uTimerLabel1.Format = "M月d日 H:mm:ss";
this.uTimerLabel1.Location = new System.Drawing.Point(1084, 53);
this.uTimerLabel1.Name = "uTimerLabel1";
this.uTimerLabel1.Size = new System.Drawing.Size(136, 16);
this.uTimerLabel1.TabIndex = 14;
this.uTimerLabel1.Text = "4月21日 16:32:19";
//
// uLabel1
//
this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uLabel1.AutoSize = true;
this.uLabel1.BackColor = System.Drawing.Color.Transparent;
this.uLabel1.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel1.Location = new System.Drawing.Point(802, 14);
this.uLabel1.Name = "uLabel1";
this.uLabel1.Size = new System.Drawing.Size(109, 20);
this.uLabel1.TabIndex = 12;
this.uLabel1.Text = "工作单元:";
//
// uLabel2
//
this.uLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uLabel2.AutoSize = true;
this.uLabel2.BackColor = System.Drawing.Color.Transparent;
this.uLabel2.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel2.Location = new System.Drawing.Point(802, 50);
this.uLabel2.Name = "uLabel2";
this.uLabel2.Size = new System.Drawing.Size(109, 20);
this.uLabel2.TabIndex = 13;
this.uLabel2.Text = "生产批次:";
//
// netStateWatch1
//
this.netStateWatch1.BackColor = System.Drawing.Color.Transparent;
this.netStateWatch1.Location = new System.Drawing.Point(359, 2);
this.netStateWatch1.Name = "netStateWatch1";
this.netStateWatch1.Size = new System.Drawing.Size(90, 39);
this.netStateWatch1.TabIndex = 1;
//
// uWeightControl1
//
this.uWeightControl1.BackColor = System.Drawing.Color.Transparent;
this.uWeightControl1.Location = new System.Drawing.Point(3, 3);
this.uWeightControl1.Name = "uWeightControl1";
this.uWeightControl1.Size = new System.Drawing.Size(349, 78);
this.uWeightControl1.TabIndex = 0;
this.uWeightControl1.WeightFalg = null;
//
// submitBtn
//
this.submitBtn.AsClicked = false;
this.submitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("submitBtn.BackgroundImage")));
this.submitBtn.EnableGroup = false;
this.submitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.submitBtn.FlatAppearance.BorderSize = 0;
this.submitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.submitBtn.Font = new System.Drawing.Font("宋体", 15F);
this.submitBtn.ForeColor = System.Drawing.Color.Black;
this.submitBtn.Location = new System.Drawing.Point(249, 134);
this.submitBtn.Name = "submitBtn";
this.submitBtn.PlaySound = false;
this.submitBtn.SelfControlEnable = false;
this.submitBtn.Size = new System.Drawing.Size(111, 34);
this.submitBtn.SoundType = WinFormControl.SoundType.Click;
this.submitBtn.TabIndex = 23;
this.submitBtn.Text = "提交";
this.submitBtn.UseVisualStyleBackColor = true;
this.submitBtn.WithStataHode = false;
this.submitBtn.Click += new System.EventHandler(this.submitBtn_Click);
//
// deleteBtn
//
this.deleteBtn.AsClicked = false;
this.deleteBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("deleteBtn.BackgroundImage")));
this.deleteBtn.EnableGroup = false;
this.deleteBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.deleteBtn.FlatAppearance.BorderSize = 0;
this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
this.deleteBtn.ForeColor = System.Drawing.Color.Black;
this.deleteBtn.Location = new System.Drawing.Point(129, 134);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.PlaySound = false;
this.deleteBtn.SelfControlEnable = false;
this.deleteBtn.Size = new System.Drawing.Size(111, 34);
this.deleteBtn.SoundType = WinFormControl.SoundType.Click;
this.deleteBtn.TabIndex = 22;
this.deleteBtn.Text = "删除";
this.deleteBtn.UseVisualStyleBackColor = true;
this.deleteBtn.WithStataHode = false;
this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click);
//
// rePrintBtn
//
this.rePrintBtn.AsClicked = false;
this.rePrintBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("rePrintBtn.BackgroundImage")));
this.rePrintBtn.EnableGroup = false;
this.rePrintBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.rePrintBtn.FlatAppearance.BorderSize = 0;
this.rePrintBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rePrintBtn.ForeColor = System.Drawing.Color.Black;
this.rePrintBtn.Location = new System.Drawing.Point(9, 134);
this.rePrintBtn.Name = "rePrintBtn";
this.rePrintBtn.PlaySound = false;
this.rePrintBtn.SelfControlEnable = false;
this.rePrintBtn.Size = new System.Drawing.Size(111, 34);
this.rePrintBtn.SoundType = WinFormControl.SoundType.Click;
this.rePrintBtn.TabIndex = 21;
this.rePrintBtn.Text = "补打";
this.rePrintBtn.UseVisualStyleBackColor = true;
this.rePrintBtn.WithStataHode = false;
this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click);
//
// historyDataGrid
//
this.historyDataGrid.AllowUserToAddRows = false;
this.historyDataGrid.AllowUserToDeleteRows = false;
this.historyDataGrid.AllowUserToResizeColumns = false;
this.historyDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle67.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle67;
this.historyDataGrid.BackgroundColor = System.Drawing.Color.White;
this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle68.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle68.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle68.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle68.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle68;
this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_RowIndex,
this.H_BarCode,
this.H_Goods_Name,
this.H_Weight});
this.historyDataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.historyDataGrid.Location = new System.Drawing.Point(5, 19);
this.historyDataGrid.MultiSelect = false;
this.historyDataGrid.Name = "historyDataGrid";
this.historyDataGrid.ReadOnly = true;
this.historyDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle70.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle70.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle70;
this.historyDataGrid.RowTemplate.Height = 23;
this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyDataGrid.Size = new System.Drawing.Size(523, 308);
this.historyDataGrid.TabIndex = 2;
//
// H_RowIndex
//
this.H_RowIndex.DataPropertyName = "RowIndex";
this.H_RowIndex.HeaderText = "序号";
this.H_RowIndex.Name = "H_RowIndex";
this.H_RowIndex.ReadOnly = true;
this.H_RowIndex.Width = 80;
//
// H_BarCode
//
this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.H_BarCode.DataPropertyName = "BarCode";
this.H_BarCode.HeaderText = "条码";
this.H_BarCode.Name = "H_BarCode";
this.H_BarCode.ReadOnly = true;
//
// H_Goods_Name
//
this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.H_Goods_Name.DataPropertyName = "Goods_Name";
this.H_Goods_Name.HeaderText = "产品";
this.H_Goods_Name.Name = "H_Goods_Name";
this.H_Goods_Name.ReadOnly = true;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle69.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle69;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
//
// uLabel3
//
this.uLabel3.AutoSize = true;
this.uLabel3.BackColor = System.Drawing.Color.White;
this.uLabel3.Font = new System.Drawing.Font("宋体", 12F);
this.uLabel3.Location = new System.Drawing.Point(8, 0);
this.uLabel3.Name = "uLabel3";
this.uLabel3.Size = new System.Drawing.Size(72, 16);
this.uLabel3.TabIndex = 1;
this.uLabel3.Text = "生产历史";
//
// taskDataGrid
//
this.taskDataGrid.AllowUserToAddRows = false;
this.taskDataGrid.AllowUserToDeleteRows = false;
this.taskDataGrid.AllowUserToResizeColumns = false;
this.taskDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle61.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle61;
this.taskDataGrid.BackgroundColor = System.Drawing.Color.White;
this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle62.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle62.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle62.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle62.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle62;
this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_Item,
this.T_Need,
this.T_Done,
this.T_Last});
this.taskDataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.taskDataGrid.Location = new System.Drawing.Point(5, 19);
this.taskDataGrid.MultiSelect = false;
this.taskDataGrid.Name = "taskDataGrid";
this.taskDataGrid.ReadOnly = true;
this.taskDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle66.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle66.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle66;
this.taskDataGrid.RowTemplate.Height = 23;
this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.taskDataGrid.Size = new System.Drawing.Size(523, 96);
this.taskDataGrid.TabIndex = 2;
//
// T_Item
//
this.T_Item.DataPropertyName = "Item";
this.T_Item.HeaderText = "项目";
this.T_Item.Name = "T_Item";
this.T_Item.ReadOnly = true;
//
// T_Need
//
this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Need.DataPropertyName = "Need";
dataGridViewCellStyle63.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle63;
this.T_Need.HeaderText = "订货";
this.T_Need.Name = "T_Need";
this.T_Need.ReadOnly = true;
//
// T_Done
//
this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Done.DataPropertyName = "Done";
dataGridViewCellStyle64.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle64;
this.T_Done.HeaderText = "完工";
this.T_Done.Name = "T_Done";
this.T_Done.ReadOnly = true;
//
// T_Last
//
this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Last.DataPropertyName = "Last";
dataGridViewCellStyle65.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle65;
this.T_Last.HeaderText = "剩余";
this.T_Last.Name = "T_Last";
this.T_Last.ReadOnly = true;
//
// GoodsLabel
//
this.GoodsLabel.AutoSize = true;
this.GoodsLabel.BackColor = System.Drawing.Color.White;
this.GoodsLabel.Font = new System.Drawing.Font("宋体", 12F);
this.GoodsLabel.ForeColor = System.Drawing.Color.Red;
this.GoodsLabel.Location = new System.Drawing.Point(8, 0);
this.GoodsLabel.Name = "GoodsLabel";
this.GoodsLabel.Size = new System.Drawing.Size(72, 16);
this.GoodsLabel.TabIndex = 1;
this.GoodsLabel.Text = "存货名称";
//
// trunOutBtn
//
this.trunOutBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.trunOutBtn.AsClicked = false;
this.trunOutBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("trunOutBtn.BackgroundImage")));
this.trunOutBtn.EnableGroup = false;
this.trunOutBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.trunOutBtn.FlatAppearance.BorderSize = 0;
this.trunOutBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.trunOutBtn.Font = new System.Drawing.Font("宋体", 15F);
this.trunOutBtn.ForeColor = System.Drawing.Color.Black;
this.trunOutBtn.Location = new System.Drawing.Point(433, 7);
this.trunOutBtn.Name = "trunOutBtn";
this.trunOutBtn.PlaySound = false;
this.trunOutBtn.SelfControlEnable = false;
this.trunOutBtn.Size = new System.Drawing.Size(111, 34);
this.trunOutBtn.SoundType = WinFormControl.SoundType.Click;
this.trunOutBtn.TabIndex = 22;
this.trunOutBtn.Text = "挂起";
this.trunOutBtn.UseVisualStyleBackColor = true;
this.trunOutBtn.WithStataHode = false;
this.trunOutBtn.Click += new System.EventHandler(this.trunOutBtn_Click);
//
// switchBtn
//
this.switchBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.switchBtn.AsClicked = false;
this.switchBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("switchBtn.BackgroundImage")));
this.switchBtn.EnableGroup = false;
this.switchBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.switchBtn.FlatAppearance.BorderSize = 0;
this.switchBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.switchBtn.Font = new System.Drawing.Font("宋体", 15F);
this.switchBtn.ForeColor = System.Drawing.Color.Black;
this.switchBtn.Location = new System.Drawing.Point(551, 7);
this.switchBtn.Name = "switchBtn";
this.switchBtn.PlaySound = false;
this.switchBtn.SelfControlEnable = false;
this.switchBtn.Size = new System.Drawing.Size(111, 34);
this.switchBtn.SoundType = WinFormControl.SoundType.Click;
this.switchBtn.TabIndex = 20;
this.switchBtn.Text = "切换";
this.switchBtn.UseVisualStyleBackColor = true;
this.switchBtn.WithStataHode = false;
this.switchBtn.Click += new System.EventHandler(this.switchBtn_Click);
//
// goodsSetBtn
//
this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.goodsSetBtn.AsClicked = false;
this.goodsSetBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("goodsSetBtn.BackgroundImage")));
this.goodsSetBtn.EnableGroup = false;
this.goodsSetBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.goodsSetBtn.FlatAppearance.BorderSize = 0;
this.goodsSetBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F);
this.goodsSetBtn.ForeColor = System.Drawing.Color.Black;
this.goodsSetBtn.Location = new System.Drawing.Point(551, 52);
this.goodsSetBtn.Name = "goodsSetBtn";
this.goodsSetBtn.PlaySound = false;
this.goodsSetBtn.SelfControlEnable = false;
this.goodsSetBtn.Size = new System.Drawing.Size(111, 62);
this.goodsSetBtn.SoundType = WinFormControl.SoundType.Click;
this.goodsSetBtn.TabIndex = 18;
this.goodsSetBtn.Text = "产品设置";
this.goodsSetBtn.UseVisualStyleBackColor = true;
this.goodsSetBtn.WithStataHode = false;
this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click);
//
// endBtn
//
this.endBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.endBtn.AsClicked = false;
this.endBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("endBtn.BackgroundImage")));
this.endBtn.EnableGroup = false;
this.endBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.endBtn.FlatAppearance.BorderSize = 0;
this.endBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.endBtn.Font = new System.Drawing.Font("宋体", 15F);
this.endBtn.ForeColor = System.Drawing.Color.Black;
this.endBtn.Location = new System.Drawing.Point(315, 7);
this.endBtn.Name = "endBtn";
this.endBtn.PlaySound = false;
this.endBtn.SelfControlEnable = true;
this.endBtn.Size = new System.Drawing.Size(111, 34);
this.endBtn.SoundType = WinFormControl.SoundType.Click;
this.endBtn.TabIndex = 18;
this.endBtn.Text = "结束";
this.endBtn.UseVisualStyleBackColor = true;
this.endBtn.WithStataHode = false;
this.endBtn.Click += new System.EventHandler(this.endBtn_Click);
//
// startBtn
//
this.startBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.startBtn.AsClicked = false;
this.startBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("startBtn.BackgroundImage")));
this.startBtn.EnableGroup = false;
this.startBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.startBtn.FlatAppearance.BorderSize = 0;
this.startBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.startBtn.Font = new System.Drawing.Font("宋体", 15F);
this.startBtn.ForeColor = System.Drawing.Color.Black;
this.startBtn.Location = new System.Drawing.Point(197, 7);
this.startBtn.Name = "startBtn";
this.startBtn.PlaySound = false;
this.startBtn.SelfControlEnable = true;
this.startBtn.Size = new System.Drawing.Size(111, 34);
this.startBtn.SoundType = WinFormControl.SoundType.Click;
this.startBtn.TabIndex = 17;
this.startBtn.Text = "开始";
this.startBtn.UseVisualStyleBackColor = true;
this.startBtn.WithStataHode = false;
this.startBtn.Click += new System.EventHandler(this.startBtn_Click);
//
// SegmentProductionForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1226, 602);
this.Controls.Add(this.splitContainer1);
this.Name = "SegmentProductionForm";
this.Text = "分割品车间称重计数";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private WinFormControl.NetStateWatch netStateWatch1;
private WinFormControl.UWeightControl uWeightControl1;
private WinFormControl.UButton closeBtn;
private WinFormControl.UTimerLabel uTimerLabel1;
private System.Windows.Forms.ComboBox productBatchSelect;
private System.Windows.Forms.ComboBox workUnitSelect;
private WinFormControl.ULabel uLabel1;
private WinFormControl.ULabel uLabel2;
private System.Windows.Forms.CheckBox barPrintCheck;
private WinFormControl.UButton switchBtn;
private WinFormControl.UButton endBtn;
private WinFormControl.UButton startBtn;
private System.Windows.Forms.SplitContainer splitContainer2;
private WinFormControl.UButton goodsSetBtn;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox2;
private WinFormControl.UDataGridView taskDataGrid;
private WinFormControl.ULabel GoodsLabel;
private System.Windows.Forms.GroupBox groupBox1;
private WinFormControl.UDataGridView historyDataGrid;
private WinFormControl.ULabel uLabel3;
private WinFormControl.UButton submitBtn;
private WinFormControl.UButton deleteBtn;
private WinFormControl.UButton rePrintBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Item;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Need;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Done;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Last;
private WinFormControl.UButton trunOutBtn;
}
}

+ 283
- 0
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs View File

@ -0,0 +1,283 @@
using ButcherFactory.BO;
using ButcherFactory.BO.Rpcs;
using ButcherFactory.BO.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using ButcherFactory.Utils;
using ButcherFactory.BO.LocalBL;
using WinFormControl;
using ButcherFactory.Dialogs;
namespace ButcherFactory.SegmentProduction_
{
public partial class SegmentProductionForm : Form, IWithRoleForm
{
public List<short> RoleName
{
get { return new List<short> { (short). }; }
}
public Form Generate()
{
return this;
}
Thread uploadData;
BindingList<SegmentProduction> historyList;
BindingList<SegmentProduction> unSubmitList;
Dictionary<string, List<ClientGoodsSet_Detail>> goodsSetDic;
long? workUnitID;
long? batchID;
DateTime? batchDate;
void Start(bool start)
{
startBtn.Enabled = !start;
endBtn.Enabled = start;
}
public SegmentProductionForm()
{
InitializeComponent();
netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500);
this.FormClosing += delegate
{
if (uploadData != null && uploadData.IsAlive)
uploadData.Abort();
};
workUnitSelect.SelectedIndexChanged += delegate
{
if (workUnitSelect.SelectedValue == null)
workUnitID = null;
else
workUnitID = (long)workUnitSelect.SelectedValue;
XmlUtil.SerializerObjToFile(new SegmentProductionFormConfig { WorkUnitID = workUnitID });
};
productBatchSelect.SelectedIndexChanged += delegate
{
if (productBatchSelect.SelectedValue == null)
{
batchID = null;
batchDate = null;
}
else
{
var entity = productBatchSelect.SelectedItem as ProductBatch;
batchID = entity.ID;
batchDate = entity.Date;
}
};
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var initTask = new Thread(LoadBind);
initTask.Start();
uploadData = new Thread(UpLoadLocalData);
uploadData.Start();
}
void LoadBind()
{
this.Invoke(new Action(() =>
{
if (netStateWatch1.NetState)
{
BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
}
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, "Date");
var config = XmlUtil.DeserializeFromFile<SegmentProductionFormConfig>();
workUnitSelect.EBindComboBox<WorkUnit>(x => x.ID == config.WorkUnitID);
BindGoods();
BindGrid();
}));
}
void BindGoods()
{
goodsSetDic = FormClientGoodsSetBL.GetSelectedDetail();
flowLayoutPanel1.Controls.Clear();
flowLayoutPanel2.Controls.Clear();
foreach (var item in goodsSetDic)
{
var btn = new UButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), WithStataHode = true, EnableGroup = true };
btn.Click += GroupGoodsSetClick;
flowLayoutPanel1.Controls.Add(btn);
}
}
void GroupGoodsSetClick(object sender, EventArgs e)
{
flowLayoutPanel2.Controls.Clear();
var groupBtn = sender as UButton;
var arr = goodsSetDic[groupBtn.Text];
foreach (var item in arr)
{
var btn = new UButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), Margin = new Padding(20, 10, 20, 35), PlaySound = true };
btn.Click += GoodsBtnClick;
flowLayoutPanel2.Controls.Add(btn);
}
}
void GoodsBtnClick(object sender, EventArgs e)
{
if (batchID == null)
throw new Exception("请先选择批次");
var btn = sender as UButton;
var detail = btn.Tag as ClientGoodsSet_Detail;
var weight = uWeightControl1.Weight;
if (weight == 0)
throw new Exception("重量不能为0");
if (detail.StandardWeight.HasValue)
{
if (weight < (detail.StandardWeightLow ?? 0) || weight > (detail.StandardWeightUp ?? 0))
throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp));
weight = detail.StandardWeight.Value;
}
var entity = SegmentProductionBL.Insert(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value);
entity.Goods_Name = detail.Goods_Name;
GoodsLabel.Text = entity.Goods_Name;
unSubmitList.Insert(0, entity);
historyList.Insert(0, entity);
historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
historyDataGrid.Refresh();
}
void BindGrid()
{
unSubmitList = SegmentProductionBL.GetListByState(false);
historyList = SegmentProductionBL.GetListByState(true);
var uCopy = unSubmitList.ToList();
uCopy.Reverse();
foreach (var item in uCopy)
historyList.Insert(0, item);
historyDataGrid.DataSource = historyList;
historyDataGrid.Refresh();
var first = unSubmitList.FirstOrDefault(x => x.GroupID == null && !x.TrunOut);
if (first == null)
Start(false);
else
{
GoodsLabel.Text = first.Goods_Name;
Start(true);
}
}
void UpLoadLocalData()
{
//while (true)
//{
// if (this.IsHandleCreated)
// {
// this.Invoke(new Action(() =>
// {
// if (netStateWatch1.NetState)
// CarcassInStoreBL.UploadCarcassInfo();
// }));
// }
// Thread.Sleep(2000);
//}
}
private void closeBtn_Click(object sender, EventArgs e)
{
Close();
}
private void startBtn_Click(object sender, EventArgs e)
{
Start(true);
}
private void endBtn_Click(object sender, EventArgs e)
{
var arr = unSubmitList.Where(x => x.GroupID == null && !x.TrunOut);
if (arr.Any())
{
var groupID = SegmentProductionBL.SetListGroupID(arr.Select(x => x.ID));
foreach (var item in arr)
item.GroupID = groupID;
Start(false);
if (barPrintCheck.Checked)
{
}
}
else
throw new Exception("本次开始之后未生产任何商品");
}
private void trunOutBtn_Click(object sender, EventArgs e)
{
var arr = unSubmitList.Where(x => x.GroupID == null && !x.TrunOut);
if (arr.Any())
SegmentProductionBL.BatchUpdate(arr.Select(x => x.ID), new Tuple<string, object>("TrunOut", true));
foreach (var item in arr)
item.TrunOut = true;
GoodsLabel.Text = string.Empty;
Start(false);
}
private void switchBtn_Click(object sender, EventArgs e)
{
trunOutBtn_Click(sender, e);
var arr = unSubmitList.Where(x => x.GroupID == null);
var r = new BindingList<SegmentProduction>();
foreach (var item in arr.GroupBy(x => x.Goods_Name))
r.Add(item.First());
var dialog = new TrunOutDialog(r);
if (dialog.ShowDialog() == DialogResult.OK)
{
var gName = dialog.backGoodsName;
var targets = arr.Where(x => x.Goods_Name == gName);
SegmentProductionBL.BatchUpdate(targets.Select(x => x.ID), new Tuple<string, object>("TrunOut", false));
foreach (var item in targets)
item.TrunOut = false;
GoodsLabel.Text = gName;
Start(true);
}
}
private void goodsSetBtn_Click(object sender, EventArgs e)
{
new ClientGoodsSetDialog().ShowDialog();
}
private void rePrintBtn_Click(object sender, EventArgs e)
{
}
private void deleteBtn_Click(object sender, EventArgs e)
{
}
private void submitBtn_Click(object sender, EventArgs e)
{
var arrs = unSubmitList.Where(x => x.GroupID.HasValue && !x.TrunOut).ToList();
if (arrs.Any())
{
SegmentProductionBL.BatchUpdate(arrs.Select(x => x.ID), new Tuple<string, object>("Submited", true));
foreach (var item in arrs)
unSubmitList.Remove(item);
}
UMessageBox.Show("已提交");
}
}
}

+ 199
- 0
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.resx View File

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="submitBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="deleteBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="rePrintBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<metadata name="T_Last.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="trunOutBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="switchBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="goodsSetBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="endBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="startBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 13
- 0
ButcherFactory.Form/SegmentProduction_/SegmentProductionFormConfig.cs View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.SegmentProduction_
{
public class SegmentProductionFormConfig
{
public long? WorkUnitID { get; set; }
}
}

+ 152
- 0
ButcherFactory.Form/SegmentProduction_/TrunOutDialog.Designer.cs View File

@ -0,0 +1,152 @@
namespace ButcherFactory.SegmentProduction_
{
partial class TrunOutDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrunOutDialog));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.closeBtn = new WinFormControl.UButton();
this.uDataGridView1 = new WinFormControl.UDataGridView();
this.G_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.G_CreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.G_GoBack = new System.Windows.Forms.DataGridViewButtonColumn();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
this.SuspendLayout();
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.AsClicked = false;
this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage")));
this.closeBtn.EnableGroup = false;
this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.closeBtn.FlatAppearance.BorderSize = 0;
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(500, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 16;
this.closeBtn.Text = "关 闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.WithStataHode = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// uDataGridView1
//
this.uDataGridView1.AllowUserToAddRows = false;
this.uDataGridView1.AllowUserToDeleteRows = false;
this.uDataGridView1.AllowUserToResizeColumns = false;
this.uDataGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
this.uDataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.G_Goods_Name,
this.G_CreateTime,
this.G_GoBack});
this.uDataGridView1.Location = new System.Drawing.Point(12, 47);
this.uDataGridView1.MultiSelect = false;
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.uDataGridView1.RowTemplate.Height = 46;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(595, 329);
this.uDataGridView1.TabIndex = 17;
//
// G_Goods_Name
//
this.G_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.G_Goods_Name.DataPropertyName = "Goods_Name";
this.G_Goods_Name.HeaderText = "存货";
this.G_Goods_Name.Name = "G_Goods_Name";
this.G_Goods_Name.ReadOnly = true;
//
// G_CreateTime
//
this.G_CreateTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.G_CreateTime.DataPropertyName = "CreateTime";
this.G_CreateTime.HeaderText = "生成时间";
this.G_CreateTime.Name = "G_CreateTime";
this.G_CreateTime.ReadOnly = true;
//
// G_GoBack
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(7, 5, 7, 5);
this.G_GoBack.DefaultCellStyle = dataGridViewCellStyle3;
this.G_GoBack.HeaderText = "切回";
this.G_GoBack.Name = "G_GoBack";
this.G_GoBack.ReadOnly = true;
this.G_GoBack.Text = "切回";
this.G_GoBack.UseColumnTextForButtonValue = true;
this.G_GoBack.Width = 150;
//
// TrunOutDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(619, 388);
this.Controls.Add(this.uDataGridView1);
this.Controls.Add(this.closeBtn);
this.Name = "TrunOutDialog";
this.Text = "请选择切换任务";
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private WinFormControl.UButton closeBtn;
private WinFormControl.UDataGridView uDataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn G_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn G_CreateTime;
private System.Windows.Forms.DataGridViewButtonColumn G_GoBack;
}
}

+ 46
- 0
ButcherFactory.Form/SegmentProduction_/TrunOutDialog.cs View File

@ -0,0 +1,46 @@
using ButcherFactory.BO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherFactory.SegmentProduction_
{
public partial class TrunOutDialog : Form
{
public string backGoodsName;
BindingList<SegmentProduction> list;
public TrunOutDialog(BindingList<SegmentProduction> trunOutList)
{
this.list = trunOutList;
InitializeComponent();
uDataGridView1.CellContentClick += uDataGridView1_CellContentClick;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
uDataGridView1.DataSource = list;
uDataGridView1.Refresh();
}
void uDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex != 2)
return;
backGoodsName = (string)uDataGridView1.CurrentRow.Cells[0].Value;
DialogResult = DialogResult.OK;
this.Close();
}
private void closeBtn_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

+ 138
- 0
ButcherFactory.Form/SegmentProduction_/TrunOutDialog.resx View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<metadata name="G_Goods_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="G_CreateTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="G_GoBack.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 2
- 2
ButcherFactory.Form/Utils/ControlsUtil.cs View File

@ -11,12 +11,12 @@ namespace ButcherFactory.Utils
{
public static class ControlsUtil
{
public static void EBindComboBox<T>(this ComboBox box, Func<T, bool> SetSelectIndex = null)
public static void EBindComboBox<T>(this ComboBox box, Func<T, bool> SetSelectIndex = null, params string[] extendFields)
where T : BaseInfo, new()
{
box.DisplayMember = "Name";
box.ValueMember = "ID";
var list = BaseInfoBL.GetList<T>(10);
var list = BaseInfoBL.GetList<T>(extendFields: extendFields);
box.DataSource = list;
if (SetSelectIndex != null)
{


+ 6
- 11
ButcherFactory.Login/App.xaml.cs View File

@ -16,24 +16,19 @@ namespace ButcherFactory.Login
/// </summary>
public partial class App : Application
{
System.Threading.Mutex mutex;
public EventWaitHandle ProgramStarted { get; set; }
public App()
protected override void OnStartup(StartupEventArgs e)
{
var aProcessName = Process.GetCurrentProcess().ProcessName;
bool ret;
mutex = new System.Threading.Mutex(true, aProcessName, out ret);
bool createNew;
ProgramStarted = new EventWaitHandle(false, EventResetMode.AutoReset, "ButcherFactorySolution", out createNew);
if (!ret)
if (!createNew)
{
SoundPalyUtil.PlaySound(SoundType.Error);
UMessageBox.Show(@"系统已经在运行中,如果要重新启动,请从进程中关闭...", @"系统警告");
Environment.Exit(0);
App.Current.Shutdown();
}
}
protected override void OnStartup(StartupEventArgs e)
{
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.Application.SetUnhandledExceptionMode(System.Windows.Forms.UnhandledExceptionMode.CatchException);
System.Windows.Forms.Application.ThreadException += Application_ThreadException;


+ 1
- 1
ButcherFactory.Login/Login.xaml.cs View File

@ -67,7 +67,7 @@ namespace ButcherFactory.Login
private void ExistBtn_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
App.Current.Shutdown();
}
private void UserNameTextBoxClick(object sender, MouseButtonEventArgs e)


+ 108
- 104
ButcherFactorySolution/ButcherFactorySolution.vdproj View File

@ -28,6 +28,12 @@
"Entry"
{
"MsmKey" = "8:_01E56548E879FA791BE1522C98562ED5"
"OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_01E56548E879FA791BE1522C98562ED5"
"OwnerKey" = "8:_BF905506D35441369705E8C12149682E"
"MsmSig" = "8:_UNDEFINED"
}
@ -52,6 +58,12 @@
"Entry"
{
"MsmKey" = "8:_3E728084E6413DC3E740199EBCA6CF15"
"OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_3E728084E6413DC3E740199EBCA6CF15"
"OwnerKey" = "8:_BF905506D35441369705E8C12149682E"
"MsmSig" = "8:_UNDEFINED"
}
@ -70,13 +82,13 @@
"Entry"
{
"MsmKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"OwnerKey" = "8:_9FC311468D3F37CF5966009732A129CC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E"
"OwnerKey" = "8:_9FC311468D3F37CF5966009732A129CC"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -88,61 +100,61 @@
"Entry"
{
"MsmKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8"
"OwnerKey" = "8:_BAE74BCA28583EF343767A0EBA38772C"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmKey" = "8:_522FFC69C80F4D5DA4C9B348F8590C61"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_522FFC69C80F4D5DA4C9B348F8590C61"
"MsmKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"MsmKey" = "8:_748F78F338674C3884B702673BEDE665"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmKey" = "8:_7849FA7621DB41BA9C7A431166BC6A99"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_7C73DC68AEB6485CB5209D5939E2DC1A"
"MsmKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E"
"OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D"
"MsmKey" = "8:_7C73DC68AEB6485CB5209D5939E2DC1A"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E"
"OwnerKey" = "8:_BAE74BCA28583EF343767A0EBA38772C"
"OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"OwnerKey" = "8:_01E56548E879FA791BE1522C98562ED5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E"
"OwnerKey" = "8:_01E56548E879FA791BE1522C98562ED5"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -165,8 +177,8 @@
}
"Entry"
{
"MsmKey" = "8:_BAE74BCA28583EF343767A0EBA38772C"
"OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"MsmKey" = "8:_B24BD1F54711439BA132ABC05EC82AF6"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -190,12 +202,6 @@
"Entry"
{
"MsmKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D"
"OwnerKey" = "8:_BAE74BCA28583EF343767A0EBA38772C"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
@ -208,13 +214,13 @@
"Entry"
{
"MsmKey" = "8:_D32656229814B10B3981022C6BAE7B85"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"OwnerKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_D32656229814B10B3981022C6BAE7B85"
"OwnerKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -226,12 +232,6 @@
"Entry"
{
"MsmKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9"
"OwnerKey" = "8:_BAE74BCA28583EF343767A0EBA38772C"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
@ -243,44 +243,44 @@
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_BF905506D35441369705E8C12149682E"
"MsmKey" = "8:_FCCE14D01A514BCF927F597A9F5842D2"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"OwnerKey" = "8:_BF905506D35441369705E8C12149682E"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_BAE74BCA28583EF343767A0EBA38772C"
"OwnerKey" = "8:_D32656229814B10B3981022C6BAE7B85"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"OwnerKey" = "8:_8D58B6FD6249E85E930D55CCE736855E"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_3E728084E6413DC3E740199EBCA6CF15"
"OwnerKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_01E56548E879FA791BE1522C98562ED5"
"OwnerKey" = "8:_9FC311468D3F37CF5966009732A129CC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9"
"OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -292,31 +292,31 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D"
"OwnerKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_9FC311468D3F37CF5966009732A129CC"
"OwnerKey" = "8:_01E56548E879FA791BE1522C98562ED5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E"
"OwnerKey" = "8:_3E728084E6413DC3E740199EBCA6CF15"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_8D58B6FD6249E85E930D55CCE736855E"
"OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D32656229814B10B3981022C6BAE7B85"
"OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3"
"MsmSig" = "8:_UNDEFINED"
}
}
@ -441,11 +441,6 @@
"AssemblyAsmDisplayName" = "8:ButcherFactory.BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_01E56548E879FA791BE1522C98562ED5"
{
"Name" = "8:ButcherFactory.BO.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:ButcherFactory.BO.dll"
"TargetName" = "8:"
@ -512,11 +507,6 @@
"AssemblyAsmDisplayName" = "8:WinFormControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_3E728084E6413DC3E740199EBCA6CF15"
{
"Name" = "8:WinFormControl.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:WinFormControl.dll"
"TargetName" = "8:"
@ -563,11 +553,6 @@
"AssemblyAsmDisplayName" = "8:MongoDB.Bson, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_45A67B7D2502BF76FA9795FF8899DE9E"
{
"Name" = "8:MongoDB.Bson.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:MongoDB.Bson.dll"
"TargetName" = "8:"
@ -594,11 +579,6 @@
"AssemblyAsmDisplayName" = "8:Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_4D70C75DA5B25015E8DDBF829D234FE8"
{
"Name" = "8:Forks.JsonRpc.Client.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Forks.JsonRpc.Client.dll"
"TargetName" = "8:"
@ -669,6 +649,46 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_748F78F338674C3884B702673BEDE665"
{
"SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l60.wav"
"TargetName" = "8:l60.wav"
"Tag" = "8:"
"Folder" = "8:_6866532246094A308566729453EB35CA"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7849FA7621DB41BA9C7A431166BC6A99"
{
"SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l68.wav"
"TargetName" = "8:l68.wav"
"Tag" = "8:"
"Folder" = "8:_6866532246094A308566729453EB35CA"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7C73DC68AEB6485CB5209D5939E2DC1A"
{
"SourcePath" = "8:..\\ButcherFactory.Login\\images\\login.png"
@ -696,11 +716,6 @@
"AssemblyAsmDisplayName" = "8:Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_8D58B6FD6249E85E930D55CCE736855E"
{
"Name" = "8:Forks.Utils.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Forks.Utils.dll"
"TargetName" = "8:"
@ -747,11 +762,6 @@
"AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_9FC311468D3F37CF5966009732A129CC"
{
"Name" = "8:MongoDB.Driver.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:MongoDB.Driver.dll"
"TargetName" = "8:"
@ -771,23 +781,12 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BAE74BCA28583EF343767A0EBA38772C"
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B24BD1F54711439BA132ABC05EC82AF6"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:ButcherFactory.BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_BAE74BCA28583EF343767A0EBA38772C"
{
"Name" = "8:ButcherFactory.BO.DLL"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:ButcherFactory.BO.DLL"
"TargetName" = "8:"
"SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l55.wav"
"TargetName" = "8:l55.wav"
"Tag" = "8:"
"Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88"
"Folder" = "8:_6866532246094A308566729453EB35CA"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
@ -799,7 +798,7 @@
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BF905506D35441369705E8C12149682E"
@ -860,11 +859,6 @@
"AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_C1BAA40E3F5E065EA88D97DA96D5992D"
{
"Name" = "8:Forks.EnterpriseServices.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Forks.EnterpriseServices.dll"
"TargetName" = "8:"
@ -891,11 +885,6 @@
"AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_D32656229814B10B3981022C6BAE7B85"
{
"Name" = "8:Forks.Json.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Forks.Json.dll"
"TargetName" = "8:"
@ -922,11 +911,6 @@
"AssemblyAsmDisplayName" = "8:Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_D75F76D9C28EDCFD7454D52CBB18C6E9"
{
"Name" = "8:Newtonsoft.Json.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Newtonsoft.Json.dll"
"TargetName" = "8:"
@ -966,6 +950,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FCCE14D01A514BCF927F597A9F5842D2"
{
"SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l65.wav"
"TargetName" = "8:l65.wav"
"Tag" = "8:"
"Folder" = "8:_6866532246094A308566729453EB35CA"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
}
"FileType"
{


Loading…
Cancel
Save