| @ -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; } | |||||
| } | |||||
| } | |||||
| @ -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; } | |||||
| //} | |||||
| } | |||||
| @ -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; | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -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(); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -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); | |||||
| // } | |||||
| // } | |||||
| //} | |||||
| @ -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; | |||||
| } | |||||
| } | |||||
| @ -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(); | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -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> | |||||
| @ -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; | |||||
| } | |||||
| } | |||||
| @ -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("已提交"); | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -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> | |||||
| @ -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; } | |||||
| } | |||||
| } | |||||
| @ -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; | |||||
| } | |||||
| } | |||||
| @ -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(); | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -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> | |||||