From a44958a7902dfdf62aa56ab592d77e8b96bd108c Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Fri, 31 Aug 2018 14:32:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/BO.csproj | 1 + BO/BO/BaseInfo/ProductBatch.cs | 23 + BO/Utils/BillRpc/GradeAndWeightRpc.cs | 81 +- ButcherManage.BO/BaseInfo/BodyDiscont.cs | 15 + ButcherManage.BO/BaseInfo/Livestock.cs | 20 + ButcherManage.BO/Bill/GradeAndWeight.cs | 23 + .../Bill/GradeAndWeight_Detail.cs | 63 + .../Bill/OrderGradeFinishRelate.cs | 26 + ButcherManage.BO/ButcherManage.BO.csproj | 5 + ButcherManage.BO/Enums/DriveType.cs | 1 + ButcherManage.BO/LocalBL/BaseInfoBL.cs | 48 + ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs | 80 + ButcherManage.BO/LocalBL/GradeAndWeightBL.cs | 57 + ButcherManage.Form/ButcherManage.Form.csproj | 22 + .../GradeAndWeightForm.Designer.cs | 1012 ++++++ .../GradeAndWeight_/GradeAndWeightForm.cs | 625 ++++ .../GradeAndWeight_/GradeAndWeightForm.resx | 195 ++ .../Properties/Resources.Designer.cs | 93 + ButcherManage.Form/Properties/Resources.resx | 130 + ButcherManage.Form/Resources/close.png | Bin 0 -> 3236 bytes ButcherManage.Form/Resources/title.png | Bin 0 -> 3223 bytes ButcherManage.Form/Resources/wfLogo.png | Bin 0 -> 2795 bytes ButcherManage.Form/Utils/ControlsUtil.cs | 31 + .../ButcherManage.Login.csproj | 9 + ButcherManage.Login/Images/close.png | Bin 0 -> 3236 bytes ButcherManage.Login/Images/title.png | Bin 0 -> 3223 bytes ButcherManage.Login/Images/wfLogo.png | Bin 0 -> 2795 bytes ButcherWeight/ButcherWeight.csproj | 27 + .../Properties/Resources.Designer.cs | 113 + ButcherWeight/Properties/Resources.resx | 136 + ButcherWeight/Resources/bgTitle.png | Bin 0 -> 1066 bytes ButcherWeight/Resources/green.png | Bin 0 -> 1867 bytes ButcherWeight/Resources/red.png | Bin 0 -> 1527 bytes ButcherWeight/Resources/silvery.png | Bin 0 -> 1432 bytes ButcherWeight/Resources/silvery1.png | Bin 0 -> 1432 bytes ButcherWeight/Resources/yellow.png | Bin 0 -> 1627 bytes ButcherWeight/WeightForm.Designer.cs | 2870 +++++++++-------- ButcherWeight/WeightForm.cs | 36 +- ButcherWeight/WeightForm.resx | 302 +- WeighAndGrading/BodyDiscontSetting.cs | 6 +- WeighAndGrading/DataViewForm.cs | 10 +- WeighAndGrading/GradeFrom.Designer.cs | 26 +- WeighAndGrading/GradeFrom.cs | 41 +- WeighAndGrading/WeightGradePrint.cs | 2 +- 44 files changed, 4646 insertions(+), 1483 deletions(-) create mode 100644 BO/BO/BaseInfo/ProductBatch.cs create mode 100644 ButcherManage.BO/BaseInfo/BodyDiscont.cs create mode 100644 ButcherManage.BO/BaseInfo/Livestock.cs create mode 100644 ButcherManage.BO/Bill/GradeAndWeight.cs create mode 100644 ButcherManage.BO/Bill/GradeAndWeight_Detail.cs create mode 100644 ButcherManage.BO/Bill/OrderGradeFinishRelate.cs create mode 100644 ButcherManage.BO/LocalBL/BaseInfoBL.cs create mode 100644 ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs create mode 100644 ButcherManage.BO/LocalBL/GradeAndWeightBL.cs create mode 100644 ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.Designer.cs create mode 100644 ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.cs create mode 100644 ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.resx create mode 100644 ButcherManage.Form/Properties/Resources.Designer.cs create mode 100644 ButcherManage.Form/Properties/Resources.resx create mode 100644 ButcherManage.Form/Resources/close.png create mode 100644 ButcherManage.Form/Resources/title.png create mode 100644 ButcherManage.Form/Resources/wfLogo.png create mode 100644 ButcherManage.Form/Utils/ControlsUtil.cs create mode 100644 ButcherManage.Login/Images/close.png create mode 100644 ButcherManage.Login/Images/title.png create mode 100644 ButcherManage.Login/Images/wfLogo.png create mode 100644 ButcherWeight/Properties/Resources.Designer.cs create mode 100644 ButcherWeight/Properties/Resources.resx create mode 100644 ButcherWeight/Resources/bgTitle.png create mode 100644 ButcherWeight/Resources/green.png create mode 100644 ButcherWeight/Resources/red.png create mode 100644 ButcherWeight/Resources/silvery.png create mode 100644 ButcherWeight/Resources/silvery1.png create mode 100644 ButcherWeight/Resources/yellow.png diff --git a/BO/BO.csproj b/BO/BO.csproj index e8b0f00..020523f 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -66,6 +66,7 @@ + diff --git a/BO/BO/BaseInfo/ProductBatch.cs b/BO/BO/BaseInfo/ProductBatch.cs new file mode 100644 index 0000000..9630611 --- /dev/null +++ b/BO/BO/BaseInfo/ProductBatch.cs @@ -0,0 +1,23 @@ +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO.BaseInfo +{ + [MapToTable("Butcher_ProductBatch")] + [KeyField("ID", KeyGenType.assigned)] + public class ProductBatch + { + public long ID { get; set; } + + public string Name { get; set; } + + public DateTime? Date { get; set; } + + [DbColumn(DefaultValue = 0)] + public int RowVersion { get; set; } + } +} diff --git a/BO/Utils/BillRpc/GradeAndWeightRpc.cs b/BO/Utils/BillRpc/GradeAndWeightRpc.cs index 73449f8..f11ecff 100644 --- a/BO/Utils/BillRpc/GradeAndWeightRpc.cs +++ b/BO/Utils/BillRpc/GradeAndWeightRpc.cs @@ -4,6 +4,7 @@ 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.Concurrent; using System.Collections.Generic; @@ -92,8 +93,15 @@ namespace BO.Utils.BillRpc public static List GetDataConfirmList(DateTime date, int? order) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetDataConfirmList"; - var result = RpcFacade.Call(method, date, order); - return serializer.Deserialize>(result); + try + { + var result = RpcFacade.Call(method, date, order); + return serializer.Deserialize>(result); + } + catch + { + return new List(); + } } } @@ -233,9 +241,9 @@ namespace BO.Utils.BillRpc ClearUnSyncDelete(); var syncs = GetAllNeedSyncDetails(); foreach (var detail in syncs) - { + { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateOrInsertDetailOrDelete"; - var id = RpcFacade.Call(method, serializer.Serialize(detail)); + var id = RpcFacade.Call(method, JsonConvert.SerializeObject(detail)); if (detail.IsDeleted) Delete(detail.SID); else @@ -295,7 +303,7 @@ namespace BO.Utils.BillRpc } } - public static Dictionary GetOrderIdx(DateTime date) + public static Dictionary GetOrderIdx(DateTime date) { var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); @@ -348,7 +356,7 @@ namespace BO.Utils.BillRpc public static void UpdateHistory(DateTime dateTime) { var lastOrder = 0; - var orderIdx=1; + var orderIdx = 1; using (var session = LocalDmoSession.New()) { if (CheckTodayUpdated(dateTime, session)) @@ -377,7 +385,7 @@ namespace BO.Utils.BillRpc { var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); query.Columns.Add(DQSelectColumn.Field("SID")); - query.Where.Conditions.Add(DQCondition.And( DQCondition.EQ("Date", dateTime), DQCondition.IsNotNull(DQExpression.Field("OrderIndex")))); + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date", dateTime), DQCondition.IsNotNull(DQExpression.Field("OrderIndex")))); return session.ExecuteScalar(query) != null; } @@ -389,15 +397,15 @@ namespace BO.Utils.BillRpc session.ExecuteNonQuery(update); } - static List> Get20180411Data(DateTime dateTime,IDmoSession session) + static List> Get20180411Data(DateTime dateTime, IDmoSession session) { var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); query.Columns.Add(DQSelectColumn.Field("Order")); query.Columns.Add(DQSelectColumn.Field("SID")); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Order")); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("SID")); - query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date",dateTime),DQCondition.IsNotNull(DQExpression.Field("Order")))); - var list = new List>(); + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date", dateTime), DQCondition.IsNotNull(DQExpression.Field("Order")))); + var list = new List>(); using (var reader = session.ExecuteReader(query)) { while (reader.Read()) @@ -407,5 +415,58 @@ namespace BO.Utils.BillRpc } return list; } + + public static List GetProductBatch() + { + var query = new DmoQuery(typeof(ProductBatch)); + using (var session = LocalDmoSession.New()) + { + return session.ExecuteList(query).Cast().ToList(); + } + } + + const string baseInfoRpcPath = @"/MainSystem/B3ClientService/Rpcs/SyncBaseInfoRpc/"; + public static void LoadProductBatchFromServer() + { + using (var session = LocalDmoSession.New()) + { + var local = GetLocalVersion(session); + var json = RpcFacade.Call(baseInfoRpcPath + "SyncProductBatchByType", 0, JsonConvert.SerializeObject(local)); + + var result = JsonConvert.DeserializeObject, List, List>>(json);//insert,update,delete + foreach (var item in result.Item1) + session.Insert(item); + foreach (var item in result.Item2) + session.Update(item); + if (result.Item3.Any()) + Delete(session, result.Item3); + + session.Commit(); + } + } + + static List> GetLocalVersion(IDmoSession session) + { + var query = new DQueryDom(new JoinAlias(typeof(ProductBatch))); + query.Columns.Add(DQSelectColumn.Field("ID")); + query.Columns.Add(DQSelectColumn.Field("RowVersion")); + //query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("Date", DateTime.Today.AddDays(-1))); + var list = new List>(); + using (var reader = session.ExecuteReader(query)) + { + while (reader.Read()) + { + list.Add(new Tuple((long)reader[0], (int)reader[1])); + } + } + return list; + } + + static void Delete(IDmoSession session, List ids) + { + var delete = new DQDeleteDom(typeof(ProductBatch)); + delete.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("ID"), ids.Select(x => DQExpression.Value(x)).ToArray())); + session.ExecuteNonQuery(delete); + } } } diff --git a/ButcherManage.BO/BaseInfo/BodyDiscont.cs b/ButcherManage.BO/BaseInfo/BodyDiscont.cs new file mode 100644 index 0000000..9041f01 --- /dev/null +++ b/ButcherManage.BO/BaseInfo/BodyDiscont.cs @@ -0,0 +1,15 @@ +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + [MapToTable("Butcher_BodyDiscont")] + public class BodyDiscont : BaseInfo + { + public decimal? Discont { get; set; } + } +} diff --git a/ButcherManage.BO/BaseInfo/Livestock.cs b/ButcherManage.BO/BaseInfo/Livestock.cs new file mode 100644 index 0000000..79ce240 --- /dev/null +++ b/ButcherManage.BO/BaseInfo/Livestock.cs @@ -0,0 +1,20 @@ +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + [MapToTable("Butcher_Livestock")] + public class Livestock : BaseInfo + { + public short Technics { get; set; } + + public int? SortNum { get; set; } + + [NonDmoProperty] + public string Technics_Name { get { return Technics == 0 ? "烫褪" : "毛剥"; } } + } +} diff --git a/ButcherManage.BO/Bill/GradeAndWeight.cs b/ButcherManage.BO/Bill/GradeAndWeight.cs new file mode 100644 index 0000000..f26f3fb --- /dev/null +++ b/ButcherManage.BO/Bill/GradeAndWeight.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + public class GradeAndWeight + { + public long? WeightID { get; set; } + + public long OrderDetail_ID { get; set; } + + public int Order { get; set; } + + public int Number { get; set; } + + public int Already { get; set; } + + public bool Finish { get; set; } + } +} diff --git a/ButcherManage.BO/Bill/GradeAndWeight_Detail.cs b/ButcherManage.BO/Bill/GradeAndWeight_Detail.cs new file mode 100644 index 0000000..c9df611 --- /dev/null +++ b/ButcherManage.BO/Bill/GradeAndWeight_Detail.cs @@ -0,0 +1,63 @@ +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + [Serializable] + [MapToTable("GradeAndWeight_Detail")] + [KeyField("SID", KeyGenType.identity)] + public class GradeAndWeight_Detail + { + /// + /// 本地ID + /// + public long SID { get; set; } + + public long? OrderDetail_ID { get; set; } + + public int? Order { get; set; } + + public int Index { get; set; } + + public int? OrderIndex { get; set; } + + public DateTime Date { get; set; } + + public short? Technics { get; set; } + + public string Technics_Name { get; set; } + + public long? Livestock_ID { get; set; } + + public string Livestock_Name { get; set; } + + public decimal? Weight { get; set; } + + [DbColumn(DbType = SqlDbType.DateTime)] + public DateTime Time { get; set; } + + /// + /// ServerID + /// + public long ID { get; set; } + + public bool Sync { get; set; } + + /// + /// 是否删除的 + /// + public bool IsDeleted { get; set; } + + //掉猪 + public bool IsDrop { get; set; } + + public string BarCode { get; set; } + + public long? ProductBatch_ID { get; set; } + } +} diff --git a/ButcherManage.BO/Bill/OrderGradeFinishRelate.cs b/ButcherManage.BO/Bill/OrderGradeFinishRelate.cs new file mode 100644 index 0000000..436252f --- /dev/null +++ b/ButcherManage.BO/Bill/OrderGradeFinishRelate.cs @@ -0,0 +1,26 @@ +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + [MapToTable("OrderGradeFinishRelate")] + public class OrderGradeFinishRelate + { + public OrderGradeFinishRelate(int order, DateTime date, short technics) + { + Order = order; + Date = date; + Technics = technics; + } + + public int Order { get; set; } + + public DateTime Date { get; set; } + + public short Technics { get; set; } + } +} diff --git a/ButcherManage.BO/ButcherManage.BO.csproj b/ButcherManage.BO/ButcherManage.BO.csproj index 4d748bc..da5b0d2 100644 --- a/ButcherManage.BO/ButcherManage.BO.csproj +++ b/ButcherManage.BO/ButcherManage.BO.csproj @@ -55,6 +55,8 @@ + + @@ -66,6 +68,9 @@ + + + diff --git a/ButcherManage.BO/Enums/DriveType.cs b/ButcherManage.BO/Enums/DriveType.cs index 6eb546a..133b595 100644 --- a/ButcherManage.BO/Enums/DriveType.cs +++ b/ButcherManage.BO/Enums/DriveType.cs @@ -11,5 +11,6 @@ namespace ButcherManage.BO.Enums 赶猪确认 = 103, 上线确认 = 104, 烫毛分线 = 105, + 胴体定级 = 106, } } diff --git a/ButcherManage.BO/LocalBL/BaseInfoBL.cs b/ButcherManage.BO/LocalBL/BaseInfoBL.cs new file mode 100644 index 0000000..1ee1e15 --- /dev/null +++ b/ButcherManage.BO/LocalBL/BaseInfoBL.cs @@ -0,0 +1,48 @@ +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 ButcherManage.BO.LocalBL +{ + public static class BaseInfoBL + { + public static List GetList(int range = 10, params string[] extendFields) + where T : BaseInfo, new() + { + var query = new DQueryDom(new JoinAlias(typeof(T))); + query.Columns.Add(DQSelectColumn.Field("ID")); + query.Columns.Add(DQSelectColumn.Field("Name")); + foreach (var field in extendFields) + query.Columns.Add(DQSelectColumn.Field(field)); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); + query.Range = SelectRange.Top(range); + var result = new List(); + var type = typeof(T); + using (var session = DmoSession.New()) + { + using (var reader = session.ExecuteReader(query)) + { + while (reader.Read()) + { + var entity = new T(); + result.Add(entity); + entity.ID = (long)reader[0]; + entity.Name = (string)reader[1]; + var idx = 2; + foreach (var field in extendFields) + { + type.GetProperty(field).SetValue(entity, reader[idx]); + idx++; + } + } + } + } + return result; + } + } +} diff --git a/ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs b/ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs new file mode 100644 index 0000000..4fb48fc --- /dev/null +++ b/ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs @@ -0,0 +1,80 @@ +using Forks.EnterpriseServices.DomainObjects2; +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO.LocalBL +{ + public static class BaseInfoSyncRpc + { + const string baseInfoRpcPath = @"/MainSystem/B3ClientService/Rpcs/SyncBaseInfoRpc/"; + static void TruncateTable(Type type, IDmoSession session) + { + var table = DmoInfo.Get(type).MappedDBObject; + var sql = string.Format("truncate table [{0}]", table); + session.ExecuteSqlNonQuery(sql); + } + + public static void SyncBaseInfo(string methodName = null) + where T : BaseInfo + { + var type = typeof(T); + if (string.IsNullOrEmpty(methodName)) + methodName = "Sync" + type.Name; + var json = SimpleRest.Call(baseInfoRpcPath + methodName); + var list = JsonConvert.DeserializeObject>(json); + using (var session = DmoSession.New()) + { + TruncateTable(type, session); + foreach (var item in list) + session.Insert(item); + session.Commit(); + } + } + + public static void SyncBodyDiscont() + { + var json = SimpleRest.Call(baseInfoRpcPath + "SyncBodyDiscont"); + var list = JsonConvert.DeserializeObject>(json); + using (var session = DmoSession.New()) + { + DeleteLocal(session, list.Select(x => x.ID)); + var exist = GetLocal(session); + foreach (var item in list) + { + if (exist.Any(x => x == item.ID)) + UpdateName(session, item); + else + session.Insert(item); + } + session.Commit(); + } + } + + static void DeleteLocal(IDmoSession session, IEnumerable ids) + { + var del = new DQDeleteDom(typeof(BodyDiscont)); + del.Where.Conditions.Add(DQCondition.NotInList(DQExpression.Field("ID"), ids.Select(x => DQExpression.Value(x)).ToArray())); + session.ExecuteNonQuery(del); + } + + static List GetLocal(IDmoSession session) + { + var query = new DQueryDom(new JoinAlias(typeof(BodyDiscont))); + query.Columns.Add(DQSelectColumn.Field("ID")); + return query.EExecuteList(session); + } + + static void UpdateName(IDmoSession session, BodyDiscont entity) + { + var update = new DQUpdateDom(typeof(BodyDiscont)); + update.Columns.Add(new DQUpdateColumn("Name", entity.Name)); + update.Where.Conditions.Add(DQCondition.EQ("ID", entity.ID)); + session.ExecuteNonQuery(update); + } + } +} diff --git a/ButcherManage.BO/LocalBL/GradeAndWeightBL.cs b/ButcherManage.BO/LocalBL/GradeAndWeightBL.cs new file mode 100644 index 0000000..e522525 --- /dev/null +++ b/ButcherManage.BO/LocalBL/GradeAndWeightBL.cs @@ -0,0 +1,57 @@ +using Forks.EnterpriseServices.DomainObjects2; +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ButcherManage.BO; + +namespace ButcherManage.BO.LocalBL +{ + public static class GradeAndWeightBL + { + public static IEnumerable GetLivestock() + { + var query = new DQueryDom(new JoinAlias(typeof(Livestock))); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("SortNum")); + query.Columns.Add(DQSelectColumn.Field("ID")); + query.Columns.Add(DQSelectColumn.Field("Name")); + query.Columns.Add(DQSelectColumn.Field("Technics")); + using (var session = DmoSession.New()) + { + var list = query.EExecuteList(session); + return list.Select(x => new Livestock { ID = x.Item1, Name = x.Item2, Technics = x.Item3 }); + } + } + + public static IEnumerable GetBodyDiscont() + { + var dom = new DmoQuery(typeof(BodyDiscont)); + dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); + using (var session = DmoSession.New()) + { + return session.ExecuteList(dom).Cast(); + } + } + + //public static void SetGradeFinish(int order, DateTime date, short technics) + //{ + // using (var session = DmoSession.New()) + // { + // if (Finished(session, date, order, technics)) + // return; + // session.Insert(new OrderGradeFinishRelate(order, date, technics)); + // session.Commit(); + // } + //} + + //static bool Finished(IDmoSession session, DateTime date, int order, short technics) + //{ + // var query = new DQueryDom(new JoinAlias(typeof(OrderGradeFinishRelate))); + // query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Order", order), DQCondition.EQ("Date", date), DQCondition.EQ("Technics", technics))); + // query.Columns.Add(DQSelectColumn.Create(DQExpression.Value("1"), "c")); + // return session.ExecuteScalar(query) != null; + //} + } +} diff --git a/ButcherManage.Form/ButcherManage.Form.csproj b/ButcherManage.Form/ButcherManage.Form.csproj index 42ee2c0..d468fe7 100644 --- a/ButcherManage.Form/ButcherManage.Form.csproj +++ b/ButcherManage.Form/ButcherManage.Form.csproj @@ -72,6 +72,12 @@ PickOutConfirm.cs + + True + True + Resources.resx + + @@ -83,6 +89,10 @@ PickOutConfirm.cs + + ResXFileCodeGenerator + Resources.Designer.cs + @@ -96,6 +106,18 @@ MSBuild:Compile + + + + + + + + + + + + if $(Configuration)==Debug ( diff --git a/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.Designer.cs b/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.Designer.cs new file mode 100644 index 0000000..bd646c5 --- /dev/null +++ b/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.Designer.cs @@ -0,0 +1,1012 @@ +namespace ButcherManage.GradeAndWeight_ +{ + partial class GradeAndWeightForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel6 = new System.Windows.Forms.Panel(); + this.uTimerLabel1 = new WinFormControl.UTimerLabel(); + this.closeBtn = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.uWeightControl1 = new WinFormControl.UWeightControl(); + this.nButton1 = new WinFormControl.NButton(); + this.isPrintCheckBox = new System.Windows.Forms.CheckBox(); + this.netStateWatch1 = new WinFormControl.NetStateWatch(); + this.nButton2 = new WinFormControl.NButton(); + this.uLabel1 = new WinFormControl.ULabel(); + this.datePicker = new System.Windows.Forms.TextBox(); + this.nButton3 = new WinFormControl.NButton(); + this.panel4 = new System.Windows.Forms.Panel(); + this.productBatchSelect = new System.Windows.Forms.ComboBox(); + this.uLabel9 = new WinFormControl.ULabel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.nButton6 = new WinFormControl.NButton(); + this.modifyPanel = new System.Windows.Forms.Panel(); + this.cancelBtn = new System.Windows.Forms.Button(); + this.stateLabel = new System.Windows.Forms.Label(); + this.nButton5 = new WinFormControl.NButton(); + this.lblSucessed = new System.Windows.Forms.Label(); + this.nButton4 = new WinFormControl.NButton(); + this.alreadyLabel = new WinFormControl.ULabel(); + this.uLabel8 = new WinFormControl.ULabel(); + this.orderLabel = new WinFormControl.ULabel(); + this.uLabel5 = new WinFormControl.ULabel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.ttPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.tangScrollBar = new System.Windows.Forms.VScrollBar(); + this.tangGridView = new WinFormControl.UDataGridView(); + this.T_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Finish = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_WeightID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Already = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Btn = new System.Windows.Forms.DataGridViewButtonColumn(); + this.uLabel2 = new WinFormControl.ULabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.mbPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.maoScrollBar = new System.Windows.Forms.VScrollBar(); + this.maoGridView = new WinFormControl.UDataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewButtonColumn1 = new System.Windows.Forms.DataGridViewButtonColumn(); + this.uLabel3 = new WinFormControl.ULabel(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.historyGrid = new WinFormControl.UDataGridView(); + this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_OrderIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Technics_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); + this.uLabel4 = new WinFormControl.ULabel(); + this.discontPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.panel1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel7.SuspendLayout(); + this.modifyPanel.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.maoGridView)).BeginInit(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.historyGrid)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(88)))), ((int)(((byte)(216))))); + this.panel1.Controls.Add(this.panel6); + this.panel1.Controls.Add(this.uTimerLabel1); + this.panel1.Controls.Add(this.closeBtn); + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1364, 50); + this.panel1.TabIndex = 0; + // + // panel6 + // + this.panel6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel6.BackColor = System.Drawing.Color.White; + this.panel6.Location = new System.Drawing.Point(1308, 7); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(1, 38); + this.panel6.TabIndex = 36; + // + // 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("黑体", 13F); + this.uTimerLabel1.ForeColor = System.Drawing.Color.White; + this.uTimerLabel1.Format = "M月d日 H:mm:ss"; + this.uTimerLabel1.Location = new System.Drawing.Point(1155, 17); + this.uTimerLabel1.Name = "uTimerLabel1"; + this.uTimerLabel1.Size = new System.Drawing.Size(134, 18); + this.uTimerLabel1.TabIndex = 35; + this.uTimerLabel1.Text = "7月6日 8:38:49"; + // + // closeBtn + // + this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeBtn.BackColor = System.Drawing.Color.Transparent; + this.closeBtn.BackgroundImage = global::ButcherManage.Properties.Resources.close; + this.closeBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.closeBtn.Location = new System.Drawing.Point(1321, 12); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.Size = new System.Drawing.Size(31, 23); + this.closeBtn.TabIndex = 34; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.Transparent; + this.panel3.BackgroundImage = global::ButcherManage.Properties.Resources.title; + this.panel3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.panel3.Location = new System.Drawing.Point(70, 14); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(159, 20); + this.panel3.TabIndex = 1; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.Transparent; + this.panel2.BackgroundImage = global::ButcherManage.Properties.Resources.wfLogo; + this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.panel2.Location = new System.Drawing.Point(12, 8); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(60, 35); + this.panel2.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 = 1; + this.uWeightControl1.WeightFalg = null; + // + // nButton1 + // + this.nButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton1.ClickColor = System.Drawing.Color.YellowGreen; + this.nButton1.Font = new System.Drawing.Font("宋体", 12F); + this.nButton1.ForeColor = System.Drawing.Color.White; + this.nButton1.Location = new System.Drawing.Point(472, 4); + this.nButton1.Name = "nButton1"; + this.nButton1.PlaySound = false; + this.nButton1.Size = new System.Drawing.Size(108, 35); + this.nButton1.SoundType = WinFormControl.SoundType.Click; + this.nButton1.TabIndex = 2; + this.nButton1.Text = "打印选中"; + this.nButton1.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton1.UseVisualStyleBackColor = false; + // + // isPrintCheckBox + // + this.isPrintCheckBox.AutoSize = true; + this.isPrintCheckBox.Font = new System.Drawing.Font("宋体", 15F); + this.isPrintCheckBox.Location = new System.Drawing.Point(358, 9); + this.isPrintCheckBox.Name = "isPrintCheckBox"; + this.isPrintCheckBox.Size = new System.Drawing.Size(108, 24); + this.isPrintCheckBox.TabIndex = 32; + this.isPrintCheckBox.Text = "打印条码"; + this.isPrintCheckBox.UseVisualStyleBackColor = true; + // + // netStateWatch1 + // + this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; + this.netStateWatch1.Location = new System.Drawing.Point(606, 3); + this.netStateWatch1.Name = "netStateWatch1"; + this.netStateWatch1.Size = new System.Drawing.Size(90, 39); + this.netStateWatch1.TabIndex = 33; + // + // nButton2 + // + this.nButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton2.ClickColor = System.Drawing.Color.YellowGreen; + this.nButton2.Font = new System.Drawing.Font("宋体", 12F); + this.nButton2.ForeColor = System.Drawing.Color.White; + this.nButton2.Location = new System.Drawing.Point(47, 1); + this.nButton2.Name = "nButton2"; + this.nButton2.PlaySound = false; + this.nButton2.Size = new System.Drawing.Size(108, 35); + this.nButton2.SoundType = WinFormControl.SoundType.Click; + this.nButton2.TabIndex = 34; + this.nButton2.Text = "扣重项"; + this.nButton2.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton2.UseVisualStyleBackColor = false; + // + // uLabel1 + // + 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(11, 100); + this.uLabel1.Name = "uLabel1"; + this.uLabel1.Size = new System.Drawing.Size(109, 20); + this.uLabel1.TabIndex = 35; + this.uLabel1.Text = "宰杀日期:"; + // + // datePicker + // + this.datePicker.Font = new System.Drawing.Font("宋体", 15F); + this.datePicker.Location = new System.Drawing.Point(118, 97); + this.datePicker.Name = "datePicker"; + this.datePicker.ReadOnly = true; + this.datePicker.Size = new System.Drawing.Size(227, 30); + this.datePicker.TabIndex = 36; + // + // nButton3 + // + this.nButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton3.ClickColor = System.Drawing.Color.YellowGreen; + this.nButton3.Font = new System.Drawing.Font("宋体", 12F); + this.nButton3.ForeColor = System.Drawing.Color.White; + this.nButton3.Location = new System.Drawing.Point(358, 95); + this.nButton3.Name = "nButton3"; + this.nButton3.PlaySound = false; + this.nButton3.Size = new System.Drawing.Size(108, 35); + this.nButton3.SoundType = WinFormControl.SoundType.Click; + this.nButton3.TabIndex = 37; + this.nButton3.Text = "同步数据"; + this.nButton3.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton3.UseVisualStyleBackColor = false; + this.nButton3.WithStataHode = true; + // + // panel4 + // + this.panel4.Controls.Add(this.productBatchSelect); + this.panel4.Controls.Add(this.uLabel9); + this.panel4.Controls.Add(this.panel7); + this.panel4.Controls.Add(this.netStateWatch1); + this.panel4.Controls.Add(this.alreadyLabel); + this.panel4.Controls.Add(this.uLabel8); + this.panel4.Controls.Add(this.orderLabel); + this.panel4.Controls.Add(this.uLabel5); + this.panel4.Controls.Add(this.uWeightControl1); + this.panel4.Controls.Add(this.nButton3); + this.panel4.Controls.Add(this.nButton1); + this.panel4.Controls.Add(this.datePicker); + this.panel4.Controls.Add(this.isPrintCheckBox); + this.panel4.Controls.Add(this.uLabel1); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(0, 50); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(1364, 139); + this.panel4.TabIndex = 38; + // + // 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(472, 54); + this.productBatchSelect.Name = "productBatchSelect"; + this.productBatchSelect.Size = new System.Drawing.Size(224, 28); + this.productBatchSelect.TabIndex = 49; + // + // uLabel9 + // + this.uLabel9.AutoSize = true; + this.uLabel9.BackColor = System.Drawing.Color.Transparent; + this.uLabel9.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel9.Location = new System.Drawing.Point(397, 58); + this.uLabel9.Name = "uLabel9"; + this.uLabel9.Size = new System.Drawing.Size(69, 20); + this.uLabel9.TabIndex = 48; + this.uLabel9.Text = "批次:"; + // + // panel7 + // + this.panel7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel7.Controls.Add(this.nButton2); + this.panel7.Controls.Add(this.nButton6); + this.panel7.Controls.Add(this.modifyPanel); + this.panel7.Controls.Add(this.nButton5); + this.panel7.Controls.Add(this.lblSucessed); + this.panel7.Controls.Add(this.nButton4); + this.panel7.Location = new System.Drawing.Point(803, 1); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(560, 138); + this.panel7.TabIndex = 47; + // + // nButton6 + // + this.nButton6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton6.ClickColor = System.Drawing.Color.YellowGreen; + this.nButton6.Font = new System.Drawing.Font("宋体", 12F); + this.nButton6.ForeColor = System.Drawing.Color.White; + this.nButton6.Location = new System.Drawing.Point(183, 1); + this.nButton6.Name = "nButton6"; + this.nButton6.PlaySound = false; + this.nButton6.Size = new System.Drawing.Size(108, 35); + this.nButton6.SoundType = WinFormControl.SoundType.Click; + this.nButton6.TabIndex = 46; + this.nButton6.Text = "掉猪"; + this.nButton6.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton6.UseVisualStyleBackColor = false; + // + // modifyPanel + // + this.modifyPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.modifyPanel.Controls.Add(this.cancelBtn); + this.modifyPanel.Controls.Add(this.stateLabel); + this.modifyPanel.Location = new System.Drawing.Point(50, 78); + this.modifyPanel.Name = "modifyPanel"; + this.modifyPanel.Size = new System.Drawing.Size(438, 57); + this.modifyPanel.TabIndex = 42; + this.modifyPanel.Visible = false; + // + // cancelBtn + // + this.cancelBtn.Font = new System.Drawing.Font("宋体", 15F); + this.cancelBtn.ForeColor = System.Drawing.Color.Red; + this.cancelBtn.Location = new System.Drawing.Point(330, 6); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(102, 43); + this.cancelBtn.TabIndex = 36; + this.cancelBtn.Text = "取消"; + this.cancelBtn.UseVisualStyleBackColor = true; + // + // stateLabel + // + this.stateLabel.AutoSize = true; + this.stateLabel.Font = new System.Drawing.Font("宋体", 15F); + this.stateLabel.ForeColor = System.Drawing.Color.Red; + this.stateLabel.Location = new System.Drawing.Point(14, 19); + this.stateLabel.Name = "stateLabel"; + this.stateLabel.Size = new System.Drawing.Size(289, 20); + this.stateLabel.TabIndex = 35; + this.stateLabel.Text = "您正在修改序号为 1000 的信息"; + // + // nButton5 + // + this.nButton5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton5.ClickColor = System.Drawing.Color.YellowGreen; + this.nButton5.Font = new System.Drawing.Font("宋体", 12F); + this.nButton5.ForeColor = System.Drawing.Color.White; + this.nButton5.Location = new System.Drawing.Point(445, 1); + this.nButton5.Name = "nButton5"; + this.nButton5.PlaySound = false; + this.nButton5.Size = new System.Drawing.Size(108, 35); + this.nButton5.SoundType = WinFormControl.SoundType.Click; + this.nButton5.TabIndex = 45; + this.nButton5.Text = "数据校验"; + this.nButton5.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton5.UseVisualStyleBackColor = false; + // + // lblSucessed + // + this.lblSucessed.BackColor = System.Drawing.Color.Lime; + this.lblSucessed.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSucessed.ForeColor = System.Drawing.Color.Red; + this.lblSucessed.Location = new System.Drawing.Point(9, 38); + this.lblSucessed.Name = "lblSucessed"; + this.lblSucessed.Size = new System.Drawing.Size(267, 39); + this.lblSucessed.TabIndex = 43; + this.lblSucessed.Text = "插入级别成功"; + this.lblSucessed.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblSucessed.Visible = false; + // + // nButton4 + // + this.nButton4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton4.ClickColor = System.Drawing.Color.YellowGreen; + this.nButton4.Font = new System.Drawing.Font("宋体", 12F); + this.nButton4.ForeColor = System.Drawing.Color.White; + this.nButton4.Location = new System.Drawing.Point(314, 1); + this.nButton4.Name = "nButton4"; + this.nButton4.PlaySound = false; + this.nButton4.Size = new System.Drawing.Size(108, 35); + this.nButton4.SoundType = WinFormControl.SoundType.Click; + this.nButton4.TabIndex = 44; + this.nButton4.Text = "删除"; + this.nButton4.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.nButton4.UseVisualStyleBackColor = false; + // + // alreadyLabel + // + this.alreadyLabel.AutoSize = true; + this.alreadyLabel.BackColor = System.Drawing.Color.Transparent; + this.alreadyLabel.Font = new System.Drawing.Font("宋体", 15F); + this.alreadyLabel.ForeColor = System.Drawing.Color.Red; + this.alreadyLabel.Location = new System.Drawing.Point(778, 107); + this.alreadyLabel.Name = "alreadyLabel"; + this.alreadyLabel.Size = new System.Drawing.Size(19, 20); + this.alreadyLabel.TabIndex = 41; + this.alreadyLabel.Text = "0"; + // + // uLabel8 + // + this.uLabel8.AutoSize = true; + this.uLabel8.BackColor = System.Drawing.Color.Transparent; + this.uLabel8.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel8.Location = new System.Drawing.Point(675, 107); + this.uLabel8.Name = "uLabel8"; + this.uLabel8.Size = new System.Drawing.Size(109, 20); + this.uLabel8.TabIndex = 40; + this.uLabel8.Text = "已杀头数:"; + // + // orderLabel + // + this.orderLabel.AutoSize = true; + this.orderLabel.BackColor = System.Drawing.Color.Transparent; + this.orderLabel.Font = new System.Drawing.Font("宋体", 15F); + this.orderLabel.ForeColor = System.Drawing.Color.Red; + this.orderLabel.Location = new System.Drawing.Point(602, 107); + this.orderLabel.Name = "orderLabel"; + this.orderLabel.Size = new System.Drawing.Size(19, 20); + this.orderLabel.TabIndex = 39; + this.orderLabel.Text = "0"; + // + // uLabel5 + // + this.uLabel5.AutoSize = true; + this.uLabel5.BackColor = System.Drawing.Color.Transparent; + this.uLabel5.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel5.Location = new System.Drawing.Point(506, 107); + this.uLabel5.Name = "uLabel5"; + this.uLabel5.Size = new System.Drawing.Size(109, 20); + this.uLabel5.TabIndex = 38; + this.uLabel5.Text = "屠宰顺序:"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.ttPanel); + this.groupBox1.Controls.Add(this.tangScrollBar); + this.groupBox1.Controls.Add(this.tangGridView); + this.groupBox1.Controls.Add(this.uLabel2); + this.groupBox1.Location = new System.Drawing.Point(12, 206); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(837, 239); + this.groupBox1.TabIndex = 39; + this.groupBox1.TabStop = false; + // + // ttPanel + // + this.ttPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.ttPanel.Location = new System.Drawing.Point(492, 36); + this.ttPanel.Name = "ttPanel"; + this.ttPanel.Size = new System.Drawing.Size(337, 194); + this.ttPanel.TabIndex = 53; + // + // tangScrollBar + // + this.tangScrollBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.tangScrollBar.Location = new System.Drawing.Point(446, 36); + this.tangScrollBar.Name = "tangScrollBar"; + this.tangScrollBar.Size = new System.Drawing.Size(40, 194); + this.tangScrollBar.TabIndex = 52; + // + // tangGridView + // + this.tangGridView.AllowUserToAddRows = false; + this.tangGridView.AllowUserToDeleteRows = false; + this.tangGridView.AllowUserToResizeColumns = false; + this.tangGridView.AllowUserToResizeRows = false; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + this.tangGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.tangGridView.BackgroundColor = System.Drawing.Color.White; + this.tangGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle11.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.T_OrderDetail_ID, + this.T_Finish, + this.T_WeightID, + this.T_Order, + this.T_Number, + this.T_Already, + this.T_Btn}); + this.tangGridView.Location = new System.Drawing.Point(4, 36); + this.tangGridView.MultiSelect = false; + this.tangGridView.Name = "tangGridView"; + this.tangGridView.ReadOnly = true; + this.tangGridView.RowHeadersVisible = false; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle12; + this.tangGridView.RowTemplate.Height = 23; + this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.tangGridView.Size = new System.Drawing.Size(440, 194); + this.tangGridView.TabIndex = 1; + // + // T_OrderDetail_ID + // + this.T_OrderDetail_ID.HeaderText = "OrderDetail_ID"; + this.T_OrderDetail_ID.Name = "T_OrderDetail_ID"; + this.T_OrderDetail_ID.ReadOnly = true; + this.T_OrderDetail_ID.Visible = false; + // + // T_Finish + // + this.T_Finish.HeaderText = "Finish"; + this.T_Finish.Name = "T_Finish"; + this.T_Finish.ReadOnly = true; + this.T_Finish.Visible = false; + // + // T_WeightID + // + this.T_WeightID.HeaderText = "磅单号"; + this.T_WeightID.Name = "T_WeightID"; + this.T_WeightID.ReadOnly = true; + this.T_WeightID.Width = 90; + // + // T_Order + // + this.T_Order.HeaderText = "顺序号"; + this.T_Order.Name = "T_Order"; + this.T_Order.ReadOnly = true; + this.T_Order.Width = 90; + // + // T_Number + // + this.T_Number.HeaderText = "头数"; + this.T_Number.Name = "T_Number"; + this.T_Number.ReadOnly = true; + this.T_Number.Width = 80; + // + // T_Already + // + this.T_Already.HeaderText = "已宰"; + this.T_Already.Name = "T_Already"; + this.T_Already.ReadOnly = true; + this.T_Already.Width = 80; + // + // T_Btn + // + this.T_Btn.HeaderText = "完毕"; + this.T_Btn.Name = "T_Btn"; + this.T_Btn.ReadOnly = true; + // + // uLabel2 + // + 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(0, -1); + this.uLabel2.Name = "uLabel2"; + this.uLabel2.Size = new System.Drawing.Size(49, 20); + this.uLabel2.TabIndex = 0; + this.uLabel2.Text = "烫褪"; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.groupBox2.Controls.Add(this.mbPanel); + this.groupBox2.Controls.Add(this.maoScrollBar); + this.groupBox2.Controls.Add(this.maoGridView); + this.groupBox2.Controls.Add(this.uLabel3); + this.groupBox2.Location = new System.Drawing.Point(12, 464); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(837, 242); + this.groupBox2.TabIndex = 40; + this.groupBox2.TabStop = false; + // + // mbPanel + // + this.mbPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.mbPanel.Location = new System.Drawing.Point(494, 39); + this.mbPanel.Name = "mbPanel"; + this.mbPanel.Size = new System.Drawing.Size(337, 194); + this.mbPanel.TabIndex = 56; + // + // maoScrollBar + // + this.maoScrollBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.maoScrollBar.Location = new System.Drawing.Point(448, 39); + this.maoScrollBar.Name = "maoScrollBar"; + this.maoScrollBar.Size = new System.Drawing.Size(40, 194); + this.maoScrollBar.TabIndex = 55; + // + // maoGridView + // + this.maoGridView.AllowUserToAddRows = false; + this.maoGridView.AllowUserToDeleteRows = false; + this.maoGridView.AllowUserToResizeColumns = false; + this.maoGridView.AllowUserToResizeRows = false; + dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; + this.maoGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.maoGridView.BackgroundColor = System.Drawing.Color.White; + this.maoGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle14.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; + this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn1, + this.dataGridViewTextBoxColumn2, + this.dataGridViewTextBoxColumn3, + this.dataGridViewTextBoxColumn4, + this.dataGridViewTextBoxColumn5, + this.dataGridViewTextBoxColumn6, + this.dataGridViewButtonColumn1}); + this.maoGridView.Location = new System.Drawing.Point(6, 39); + this.maoGridView.MultiSelect = false; + this.maoGridView.Name = "maoGridView"; + this.maoGridView.ReadOnly = true; + this.maoGridView.RowHeadersVisible = false; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle15; + this.maoGridView.RowTemplate.Height = 23; + this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.maoGridView.Size = new System.Drawing.Size(440, 194); + this.maoGridView.TabIndex = 54; + // + // dataGridViewTextBoxColumn1 + // + this.dataGridViewTextBoxColumn1.HeaderText = "OrderDetail_ID"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.ReadOnly = true; + this.dataGridViewTextBoxColumn1.Visible = false; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.HeaderText = "Finish"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + this.dataGridViewTextBoxColumn2.Visible = false; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.HeaderText = "磅单号"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.ReadOnly = true; + this.dataGridViewTextBoxColumn3.Width = 90; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.HeaderText = "顺序号"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + this.dataGridViewTextBoxColumn4.ReadOnly = true; + this.dataGridViewTextBoxColumn4.Width = 90; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.HeaderText = "头数"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.ReadOnly = true; + this.dataGridViewTextBoxColumn5.Width = 80; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.HeaderText = "已宰"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.ReadOnly = true; + this.dataGridViewTextBoxColumn6.Width = 80; + // + // dataGridViewButtonColumn1 + // + this.dataGridViewButtonColumn1.HeaderText = "完毕"; + this.dataGridViewButtonColumn1.Name = "dataGridViewButtonColumn1"; + this.dataGridViewButtonColumn1.ReadOnly = true; + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.Transparent; + this.uLabel3.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel3.Location = new System.Drawing.Point(0, -2); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(49, 20); + this.uLabel3.TabIndex = 1; + this.uLabel3.Text = "毛剥"; + // + // groupBox3 + // + this.groupBox3.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.groupBox3.Controls.Add(this.historyGrid); + this.groupBox3.Controls.Add(this.vScrollBar2); + this.groupBox3.Controls.Add(this.uLabel4); + this.groupBox3.Location = new System.Drawing.Point(860, 206); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(422, 500); + this.groupBox3.TabIndex = 41; + this.groupBox3.TabStop = false; + this.groupBox3.Text = " "; + // + // historyGrid + // + this.historyGrid.AllowUserToAddRows = false; + this.historyGrid.AllowUserToDeleteRows = false; + this.historyGrid.AllowUserToResizeColumns = false; + this.historyGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16; + this.historyGrid.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.historyGrid.BackgroundColor = System.Drawing.Color.White; + this.historyGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle17.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17; + this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.H_SID, + this.H_Livestock_ID, + this.H_IsDrop, + this.H_Technics, + this.H_OrderIndex, + this.H_Index, + this.H_Order, + this.H_Technics_Name, + this.H_Livestock_Name, + this.H_Weight, + this.H_Time}); + this.historyGrid.Location = new System.Drawing.Point(6, 36); + this.historyGrid.MultiSelect = false; + this.historyGrid.Name = "historyGrid"; + this.historyGrid.ReadOnly = true; + this.historyGrid.RowHeadersVisible = false; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle18; + this.historyGrid.RowTemplate.Height = 23; + this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.historyGrid.Size = new System.Drawing.Size(370, 455); + this.historyGrid.TabIndex = 54; + // + // H_SID + // + this.H_SID.HeaderText = "SID"; + this.H_SID.Name = "H_SID"; + this.H_SID.ReadOnly = true; + this.H_SID.Visible = false; + // + // H_Livestock_ID + // + this.H_Livestock_ID.HeaderText = "Livestock_ID"; + this.H_Livestock_ID.Name = "H_Livestock_ID"; + this.H_Livestock_ID.ReadOnly = true; + this.H_Livestock_ID.Visible = false; + // + // H_IsDrop + // + this.H_IsDrop.HeaderText = "IsDrop"; + this.H_IsDrop.Name = "H_IsDrop"; + this.H_IsDrop.ReadOnly = true; + this.H_IsDrop.Visible = false; + // + // H_Technics + // + this.H_Technics.HeaderText = "Technics"; + this.H_Technics.Name = "H_Technics"; + this.H_Technics.ReadOnly = true; + this.H_Technics.Visible = false; + // + // H_OrderIndex + // + this.H_OrderIndex.HeaderText = "OrderIndex"; + this.H_OrderIndex.Name = "H_OrderIndex"; + this.H_OrderIndex.ReadOnly = true; + this.H_OrderIndex.Visible = false; + // + // H_Index + // + this.H_Index.HeaderText = "序号"; + this.H_Index.Name = "H_Index"; + this.H_Index.ReadOnly = true; + this.H_Index.Width = 65; + // + // H_Order + // + this.H_Order.HeaderText = "顺序"; + this.H_Order.Name = "H_Order"; + this.H_Order.ReadOnly = true; + this.H_Order.Width = 65; + // + // H_Technics_Name + // + this.H_Technics_Name.HeaderText = "工艺"; + this.H_Technics_Name.Name = "H_Technics_Name"; + this.H_Technics_Name.ReadOnly = true; + this.H_Technics_Name.Width = 65; + // + // H_Livestock_Name + // + this.H_Livestock_Name.HeaderText = "级别"; + this.H_Livestock_Name.Name = "H_Livestock_Name"; + this.H_Livestock_Name.ReadOnly = true; + this.H_Livestock_Name.Width = 110; + // + // H_Weight + // + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + this.H_Weight.Width = 70; + // + // H_Time + // + this.H_Time.HeaderText = "时间"; + this.H_Time.Name = "H_Time"; + this.H_Time.ReadOnly = true; + // + // vScrollBar2 + // + this.vScrollBar2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.vScrollBar2.Location = new System.Drawing.Point(378, 36); + this.vScrollBar2.Name = "vScrollBar2"; + this.vScrollBar2.Size = new System.Drawing.Size(40, 455); + this.vScrollBar2.TabIndex = 53; + // + // uLabel4 + // + this.uLabel4.AutoSize = true; + this.uLabel4.BackColor = System.Drawing.Color.Transparent; + this.uLabel4.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel4.Location = new System.Drawing.Point(6, -1); + this.uLabel4.Name = "uLabel4"; + this.uLabel4.Size = new System.Drawing.Size(49, 20); + this.uLabel4.TabIndex = 1; + this.uLabel4.Text = "记录"; + // + // discontPanel + // + this.discontPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.discontPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.discontPanel.Location = new System.Drawing.Point(1293, 213); + this.discontPanel.Name = "discontPanel"; + this.discontPanel.Size = new System.Drawing.Size(61, 489); + this.discontPanel.TabIndex = 42; + // + // GradeAndWeightForm + // + 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(1364, 714); + this.Controls.Add(this.discontPanel); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "GradeAndWeightForm"; + this.Text = "称重定级"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.panel7.ResumeLayout(false); + this.modifyPanel.ResumeLayout(false); + this.modifyPanel.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tangGridView)).EndInit(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.maoGridView)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.historyGrid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel2; + private WinFormControl.UWeightControl uWeightControl1; + private WinFormControl.NButton nButton1; + private System.Windows.Forms.CheckBox isPrintCheckBox; + private WinFormControl.NetStateWatch netStateWatch1; + private WinFormControl.NButton nButton2; + private WinFormControl.ULabel uLabel1; + private System.Windows.Forms.TextBox datePicker; + private WinFormControl.NButton nButton3; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox2; + private WinFormControl.ULabel uLabel2; + private WinFormControl.ULabel uLabel3; + private WinFormControl.UDataGridView tangGridView; + private System.Windows.Forms.DataGridViewTextBoxColumn T_OrderDetail_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Finish; + private System.Windows.Forms.DataGridViewTextBoxColumn T_WeightID; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Number; + private System.Windows.Forms.DataGridViewTextBoxColumn T_Already; + private System.Windows.Forms.DataGridViewButtonColumn T_Btn; + private System.Windows.Forms.VScrollBar tangScrollBar; + private System.Windows.Forms.FlowLayoutPanel ttPanel; + private System.Windows.Forms.FlowLayoutPanel mbPanel; + private System.Windows.Forms.VScrollBar maoScrollBar; + private WinFormControl.UDataGridView maoGridView; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; + private System.Windows.Forms.DataGridViewButtonColumn dataGridViewButtonColumn1; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Panel closeBtn; + private System.Windows.Forms.Panel panel6; + private WinFormControl.UTimerLabel uTimerLabel1; + private WinFormControl.ULabel uLabel4; + private System.Windows.Forms.VScrollBar vScrollBar2; + private WinFormControl.UDataGridView historyGrid; + private System.Windows.Forms.DataGridViewTextBoxColumn H_SID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_IsDrop; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics; + private System.Windows.Forms.DataGridViewTextBoxColumn H_OrderIndex; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Index; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; + private System.Windows.Forms.FlowLayoutPanel discontPanel; + private WinFormControl.ULabel uLabel5; + private WinFormControl.ULabel alreadyLabel; + private WinFormControl.ULabel uLabel8; + private WinFormControl.ULabel orderLabel; + private System.Windows.Forms.Label lblSucessed; + private System.Windows.Forms.Panel modifyPanel; + private System.Windows.Forms.Button cancelBtn; + private System.Windows.Forms.Label stateLabel; + private System.Windows.Forms.Panel panel7; + private WinFormControl.NButton nButton6; + private WinFormControl.NButton nButton5; + private WinFormControl.NButton nButton4; + private WinFormControl.ULabel uLabel9; + private System.Windows.Forms.ComboBox productBatchSelect; + + } +} \ No newline at end of file diff --git a/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.cs b/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.cs new file mode 100644 index 0000000..4d0c249 --- /dev/null +++ b/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.cs @@ -0,0 +1,625 @@ +using ButcherManage.BO; +using ButcherManage.BO.Enums; +using ButcherManage.BO.LocalBL; +using ButcherManage.BO.Utils; +using System; +using System.Collections.Concurrent; +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 ButcherManage.Utils; +using WinFormControl; +using System.IO; + +namespace ButcherManage.GradeAndWeight_ +{ + public partial class GradeAndWeightForm : Form, IWithRoleForm + { + #region IWithRoleForm + public List RoleName + { + get { return new List { (short)设备类别.胴体定级 }; } + } + + public Form Generate() + { + return this; + } + #endregion + + BindingList tangList; + BindingList maoList; + BindingList details; + long? batchID = null; + + int maxIndex = 0; + readonly ConcurrentQueue noLivestockList; + + Dictionary orderMaxIdx; + Thread syncTangGrid, syncMaoGrid, syncDetailGrid; + Thread syncToServer; + GradeAndWeight_Detail modifyDetail = null; + GradeAndWeight tangEntity; + GradeAndWeight maoEntity; + public GradeAndWeightForm() + { + InitializeComponent(); + netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500); + datePicker.Text = DateTime.Today.ToString("yyyy-MM-dd"); + productBatchSelect.SelectedIndexChanged += delegate + { + if (productBatchSelect.SelectedValue == null) + batchID = null; + else + batchID = (long)productBatchSelect.SelectedValue; + }; + this.FormClosing += delegate + { + if (syncTangGrid != null && syncTangGrid.IsAlive) + syncTangGrid.Abort(); + if (syncMaoGrid != null && syncMaoGrid.IsAlive) + syncMaoGrid.Abort(); + if (syncDetailGrid != null && syncDetailGrid.IsAlive) + syncDetailGrid.Abort(); + if (syncToServer != null && syncToServer.IsAlive) + syncToServer.Abort(); + }; + uWeightControl1.ReceivedValue += AddWeightDetail; + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + var height = (Screen.PrimaryScreen.Bounds.Height - 236) / 2; + groupBox1.Height = groupBox2.Height = height; + groupBox2.Location = new Point(groupBox2.Location.X, 226 + height); + var initTask = new Thread(LoadBind); + initTask.Start(); + syncToServer = new Thread(ToServerTask); + syncToServer.Start(); + } + + private void LoadBind() + { + this.Invoke(new Action(() => + { + if (netStateWatch1.NetState) + { + BaseInfoSyncRpc.SyncBaseInfo(); + BaseInfoSyncRpc.SyncBaseInfo(); + BaseInfoSyncRpc.SyncBodyDiscont(); + } + productBatchSelect.EBindComboBox(x => x.Date == DateTime.Today, 6, "Date"); + BindLivestockBtn(); + BindDiscountBtn(); + })); + } + + void BindLivestockBtn() + { + var livestocks = GradeAndWeightBL.GetLivestock(); + var i = 0; + foreach (var item in livestocks) + { + i++; + var btn = new NButton() { Name = "_" + item.ID, Text = item.Name, Tag = item, Size = new Size(90, 75), Margin = new Padding { All = 15 }, Font = new Font("宋体", 18), PlaySound = true, PulseOnFocus = true }; + + btn.Click += (sender, e) => + { + JiBieButtonClick(sender as NButton); + }; + if (item.Technics == TANG_TECH) + { + ttPanel.Controls.Add(btn); + } + else + { + mbPanel.Controls.Add(btn); + } + } + SetMargin(ttPanel); + SetMargin(mbPanel); + } + + void SetMargin(FlowLayoutPanel panel) + { + for (var i = 0; i < panel.Controls.Count; i++) + { + var c = panel.Controls[i]; + if (i % 3 == 0)//left + c.Margin = new Padding(0, c.Margin.Top, c.Margin.Right, c.Margin.Bottom); + if ((i + 1) % 3 == 0)//right + c.Margin = new Padding(c.Margin.Left, c.Margin.Top, 0, c.Margin.Bottom); + if (i <= 2)//firstRow + c.Margin = new Padding(c.Margin.Left, 0, c.Margin.Right, c.Margin.Bottom); + } + } + + void BindDiscountBtn() + { + var disconts = GradeAndWeightBL.GetBodyDiscont().Where(x => (x.Discont ?? 0) != 0); + discontPanel.Controls.Clear(); + foreach (var item in disconts) + { + var btn = new NButton() { Name = "_D" + item.ID, Text = item.Name, Tag = item.Discont, Size = new Size(60, 60), Margin = new Padding { Bottom = 30 }, Font = new Font("宋体", 15) }; + btn.Click += (sender, e) => + { + if (modifyDetail == null) + { + //if (disBtn != btn) + //{ + // disBtn = btn; + //} + //else + // disBtn = null; + } + else + { + //modifyDetail.Weight = (modifyDetail.Weight ?? 0) - Convert.ToDecimal(btn.Tag); + //LocalGradeAndWeightBL.Update(modifyDetail, "Weight"); + //cancelBtn_Click(sender, EventArgs.Empty); + } + }; + discontPanel.Controls.Add(btn); + } + } + + void JiBieButtonClick(NButton btn) + { + if (details == null) + { + MessageBox.Show("请先同步数据"); + return; + } + try + { + var livestockTag = btn.Tag as Livestock; + + if (modifyDetail == null) + { + AddDetail(livestockTag); + } + else + { + UpdateDetial(modifyDetail, livestockTag); + cancelBtn_Click(btn, EventArgs.Empty); + } + SetlblSucessVisibleTrue(); + SetlblSucessVisibleFalse(); + } + catch { throw; } + } + + static object _obj = new object(); + void AddDetail(Livestock livestock) + { + lock (_obj) + { + var n = 0; + var currentRow = livestock.Technics == 0 ? tangEntity : maoEntity; + + GradeAndWeight_Detail first; + //TryPeek 尝试返回 ConcurrentQueue 开头处的对象但不将其移除 + //TryDequeue 尝试移除并返回并发队列开头处的对象。 + if (noLivestockList.TryDequeue(out first)) + { + if (currentRow != null) + { + first.OrderDetail_ID = currentRow.OrderDetail_ID; + first.Order = currentRow.Order; + n = currentRow.Already; + SetOrderInex(first); + } + first.Date = DateTime.Parse(datePicker.Text); + first.Livestock_ID = livestock.ID; + first.Livestock_Name = livestock.Name; + first.Technics = livestock.Technics; + first.Technics_Name = livestock.Name; + if (disBtn != null) + { + first.Weight = (first.Weight ?? 0) - Convert.ToDecimal(disBtn.Tag); + SetBtnUnCheck(disBtn); + disBtn = null; + } + var barCode = StartPrintNewEntity(first); + first.BarCode = barCode; + LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "OrderIndex", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight", "BarCode"); + var tag = details.FirstOrDefault(x => x.SID == first.SID); + if (first != null) + { + tag.Date = first.Date; + tag.Livestock_ID = first.Livestock_ID; + tag.Livestock_Name = first.Livestock_Name; + tag.Order = first.Order; + tag.OrderDetail_ID = first.OrderDetail_ID; + tag.Technics = first.Technics; + tag.Technics_Name = first.Technics_Name; + tag.Weight = first.Weight; + historyGrid.Refresh(); + } + } + else//add + { + maxIndex++; + var entity = new GradeAndWeight_Detail(); + entity.Index = maxIndex; + entity.ProductBatch_ID = batchID; + if (currentRow != null) + { + entity.OrderDetail_ID = currentRow.OrderDetail_ID; + entity.Order = currentRow.Order; + n = currentRow.Already; + SetOrderInex(entity); + } + entity.Date = DateTime.Parse(datePicker.Text); + entity.Livestock_ID = livestock.ID; + entity.Livestock_Name = livestock.Name; + entity.Technics = livestock.Technics; + entity.Technics_Name = livestock.Technics_Name; + entity.Time = DateTime.Now; + if (disBtn != null) + { + entity.Weight = -Convert.ToDecimal(disBtn.Tag); + SetBtnUnCheck(disBtn); + disBtn = null; + } + entity.Weight = 0; + entity.BarCode = StartPrintNewEntity(entity); + LocalGradeAndWeightBL.Insert(entity); + details.Insert(0, entity); + AfterAddBindDetailGrid(); + } + + if (currentRow != null) + { + currentRow.Already = n + 1; + orderLabel.Text = currentRow.Order.ToString(); + alreadyLabel.Text = currentRow.Already.ToString(); + if (livestock.Technics==0) + tangGridView.Refresh(); + else + maoGridView.Refresh(); + } + else + { + orderLabel.Text = string.Empty; + alreadyLabel.Text = string.Empty; + } + } + } + + void UpdateDetial(GradeAndWeight_Detail detail, Livestock livestock) + { + var techIsEmpty = detail.Technics == null; + detail.Livestock_ID = livestock.ID; + detail.Livestock_Name = livestock.Name; + detail.Technics = livestock.Technics; + detail.Technics_Name = livestock.Technics_Name; + var current = livestock.Technics == 0 ? tangEntity : maoEntity; + if (current != null) + { + detail.Order = current.Order; + detail.OrderDetail_ID = current.OrderDetail_ID; + } + var updateFileNames = new List { "Order", "OrderDetail_ID", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name" }; + LocalGradeAndWeightBL.Update(detail, updateFileNames.ToArray()); + if (techIsEmpty) + ResetQueue(); + } + + private void SetOrderInex(GradeAndWeight_Detail detail) + { + if (detail.Order == null) + return; + if (!orderMaxIdx.ContainsKey(detail.Order.Value)) + orderMaxIdx.Add(detail.Order.Value, 0); + orderMaxIdx[detail.Order.Value] += 1; + detail.OrderIndex = orderMaxIdx[detail.Order.Value]; + } + + void SetlblSucessVisibleFalse() + { + System.Timers.Timer tm = new System.Timers.Timer(1000); + tm.Elapsed += delegate(object sender, System.Timers.ElapsedEventArgs e) + { + tm.Enabled = false; + this.Invoke(new Action(delegate + { + lblSucessed.Visible = false; + })); + tm.Dispose(); + }; + tm.Enabled = true; + } + + void SetlblSucessVisibleTrue() + { + this.Invoke(new Action(delegate + { + lblSucessed.Visible = true; + Application.DoEvents(); + })); + } + + void AfterAddBindDetailGrid() + { + if (details.Count > 50) + details.RemoveAt(50); + BindDetailGrid(); + } + + void AddWeightDetail(decimal weight) + { + lock (_obj) + { + maxIndex++; + var entity = new GradeAndWeight_Detail(); + entity.Index = maxIndex; + entity.ProductBatch_ID = batchID; + entity.Weight = (entity.Weight ?? 0) + weight; + entity.Time = DateTime.Now; + entity.Date = DateTime.Parse(datePicker.Text); + + LocalGradeAndWeightBL.Insert(entity); + details.Insert(0, entity); + noLivestockList.Enqueue(entity); + } + AfterAddBindDetailGrid(); + } + + private void cancelBtn_Click(object sender, EventArgs e) + { + foreach (DataGridViewRow row in historyGrid.Rows) + { + if (modifyDetail.SID == (long)row.Cells["H_SID"].Value) + { + row.DefaultCellStyle.BackColor = historyGrid.RowsDefaultCellStyle.BackColor; + break; + } + } + historyGrid.Refresh(); + modifyDetail = null; + modifyPanel.Hide(); + } + + //删除选中 + private void btnDeleteSelected_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确定删除选中的称重记录?", "删除选中", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + return; + + if (modifyDetail == null) + { + UMessageBox.Show("请选中要删除的记录"); + return; + } + //删除选中 更新 IsDeleted 和 Sync + lock (_obj) + { + modifyDetail.IsDeleted = true; + LocalGradeAndWeightBL.Update(modifyDetail, "IsDeleted"); + details.Remove(modifyDetail); + if (modifyDetail.Technics == null) + { + ResetQueue(); + } + modifyDetail = null; + modifyPanel.Hide(); + } + if (details.Any()) + historyGrid.DataSource = details; + historyGrid.Refresh(); + } + + private void historyGrid_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex < 0) + return; + var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail; + if (modifyDetail != null) + { + foreach (DataGridViewRow row in historyGrid.Rows) + { + if (modifyDetail.SID == (long)row.Cells["H_SID"].Value) + { + row.DefaultCellStyle.BackColor = historyGrid.RowsDefaultCellStyle.BackColor; + break; + } + } + } + modifyDetail = currentRow; + historyGrid.Refresh(); + stateLabel.Text = string.Format("您正在修改序号为 {0} 的信息", modifyDetail.Index); + modifyPanel.Show(); + } + + private void tangGridView_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + if (e.ColumnIndex == tangGridView.Columns.Count - 1) + return; + var entity = tangGridView.CurrentRow.DataBoundItem as GradeAndWeight; + if (tangEntity != null) + { + foreach (DataGridViewRow row in tangGridView.Rows) + { + if (tangEntity.OrderDetail_ID == (long)row.Cells["T_OrderDetail_ID"].Value) + { + row.DefaultCellStyle.BackColor = tangEntity.Finish ? Color.YellowGreen : tangGridView.RowsDefaultCellStyle.BackColor; + break; + } + } + } + tangEntity = entity; + tangGridView.CurrentRow.DefaultCellStyle.SelectionBackColor = tangEntity.Finish ? Color.Yellow : tangGridView.RowsDefaultCellStyle.SelectionBackColor; + tangGridView.Refresh(); + } + + private void tangGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + if (e.ColumnIndex != tangGridView.ColumnCount - 1) + return; + var entity = tangGridView.CurrentRow.DataBoundItem as GradeAndWeight; + if (entity.Finish) + { + tangEntity = null; + return; + } + entity.Finish = true; + LocalGradeAndWeightBL.SetGradeFinish(entity.Order,DateTime.Parse(datePicker.Text), 0); + tangEntity = null; + BindTangGrid(); + } + + private void maoGridView_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + if (e.ColumnIndex == maoGridView.Columns.Count - 1) + return; + var entity = maoGridView.CurrentRow.DataBoundItem as GradeAndWeight; + if (maoEntity != null) + { + foreach (DataGridViewRow row in maoGridView.Rows) + { + if (maoEntity.OrderDetail_ID == (long)row.Cells["M_OrderDetail_ID"].Value) + { + row.DefaultCellStyle.BackColor = maoEntity.Finish ? Color.YellowGreen : maoGridView.RowsDefaultCellStyle.BackColor; + break; + } + } + } + maoEntity = entity; + maoGridView.CurrentRow.DefaultCellStyle.SelectionBackColor = maoEntity.Finish ? Color.Yellow : maoGridView.RowsDefaultCellStyle.SelectionBackColor; + maoGridView.Refresh(); + } + + private void maoGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex == -1) + return; + if (e.ColumnIndex != maoGridView.ColumnCount - 1) + return; + var entity = maoGridView.CurrentRow.DataBoundItem as GradeAndWeight; + if (entity.Finish) + { + maoEntity = null; + return; + } + entity.Finish = true; + LocalGradeAndWeightBL.SetGradeFinish(entity.Order, DateTime.Parse(datePicker.Text), 1); + maoEntity = null; + BindMaoGrid(); + } + + private void discontBtn_Click(object sender, EventArgs e) + { + if (new BodyDiscontSetting().ShowDialog() == DialogResult.OK) + BuildDiscontPanel(false); + } + + private void dropPigBtn_Click(object sender, EventArgs e) + { + if (modifyDetail == null) + { + UMessageBox.Show("请先选择要设置为掉猪的行", "错误"); + return; + } + else + { + modifyDetail.IsDrop = !modifyDetail.IsDrop; + LocalGradeAndWeightBL.Update(modifyDetail, "IsDrop"); + cancelBtn_Click(sender, EventArgs.Empty); + } + } + + private void dataConfirmBtn_Click(object sender, EventArgs e) + { + new DataConfirm(butcherTimeInput.Date.Value).ShowDialog(); + } + + #region scrollBar + int tangRoll = -1; + private void InitTangScrollBar() + { + tangScrollBar.Maximum = (tangGridView.RowCount - tangGridView.DisplayedRowCount(false) + 30) * tangGridView.RowTemplate.Height; + tangScrollBar.Minimum = 0; + tangScrollBar.SmallChange = tangGridView.RowTemplate.Height; + tangScrollBar.LargeChange = tangGridView.RowTemplate.Height * 30; + this.tangScrollBar.Scroll += (sender, e) => + { + tangRoll = e.NewValue / tangGridView.RowTemplate.Height; + tangGridView.FirstDisplayedScrollingRowIndex = tangRoll; + }; + } + + int maoRoll = -1; + private void InitMaoScrollBar() + { + maoScrollBar.Maximum = (maoGridView.RowCount - maoGridView.DisplayedRowCount(false) + 30) * maoGridView.RowTemplate.Height; + maoScrollBar.Minimum = 0; + maoScrollBar.SmallChange = maoGridView.RowTemplate.Height; + maoScrollBar.LargeChange = maoGridView.RowTemplate.Height * 30; + maoScrollBar.Scroll += (sender, e) => + { + maoRoll = e.NewValue / maoGridView.RowTemplate.Height; + maoGridView.FirstDisplayedScrollingRowIndex = maoRoll; + }; + } + + int rightRoll = -1; + private void InitDetailScrollBar() + { + vScrollBar2.Maximum = (historyGrid.RowCount - historyGrid.DisplayedRowCount(false) + 30) * historyGrid.RowTemplate.Height; + vScrollBar2.Minimum = 0; + vScrollBar2.SmallChange = historyGrid.RowTemplate.Height; + vScrollBar2.LargeChange = historyGrid.RowTemplate.Height * 30; + + this.vScrollBar2.Scroll += (sender, e) => + { + rightRoll = e.NewValue / historyGrid.RowTemplate.Height; + historyGrid.FirstDisplayedScrollingRowIndex = rightRoll; + }; + } + #endregion + + void ToServerTask() + { + while (true) + { + if (this.IsHandleCreated) + { + this.Invoke(new Action(() => + { + if (netStateWatch1.NetState) + { + try + { + LocalGradeAndWeightBL.Sync(); + } + catch (Exception ex) + { + File.WriteAllText(string.Format("Log\\{0:yyyyMMddHHmmss}log.txt", DateTime.Now), "错误:" + ex.Message + " \n详细信息:" + ex.StackTrace); + } + } + })); + } + Thread.Sleep(200); + } + } + + private void closeBtn_Click(object sender, EventArgs e) + { + Close(); + } + } +} diff --git a/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.resx b/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.resx new file mode 100644 index 0000000..2601ec8 --- /dev/null +++ b/ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.resx @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/ButcherManage.Form/Properties/Resources.Designer.cs b/ButcherManage.Form/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1d27883 --- /dev/null +++ b/ButcherManage.Form/Properties/Resources.Designer.cs @@ -0,0 +1,93 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace ButcherManage.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ButcherManage.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 使用此强类型资源类,为所有资源查找 + /// 重写当前线程的 CurrentUICulture 属性。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap close { + get { + object obj = ResourceManager.GetObject("close", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap title { + get { + object obj = ResourceManager.GetObject("title", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap wfLogo { + get { + object obj = ResourceManager.GetObject("wfLogo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ButcherManage.Form/Properties/Resources.resx b/ButcherManage.Form/Properties/Resources.resx new file mode 100644 index 0000000..2e9787f --- /dev/null +++ b/ButcherManage.Form/Properties/Resources.resx @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\title.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\wfLogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ButcherManage.Form/Resources/close.png b/ButcherManage.Form/Resources/close.png new file mode 100644 index 0000000000000000000000000000000000000000..2b4ef46591b5378d80edf270a8bfd0238ccde854 GIT binary patch literal 3236 zcmaJ^X*iU7AJ!3NJ1rza#-Kx%nK4;rG>9Q&YmhB6W(I><%#39yOUX`TNzr006rxbJ z5y={|ryz(mxF^tz{n7ZVy{Pc z-o4!HuO_%Ci@k`_^lfRDBv+arnu6mvg(bP*07e9~8xDm-W9i;4xRV?loX7B1wlrH) z6F7!MP)6@yl>G^0Hk*Uvq_#g9jq$|M04_K;JP`r>T2%)G;IRmxjjAcwl&pty#~TJv zaFzjPR+s=!3=9j@)&iXLhqDC;I2sz@Pw*mA;r@kmLgA<+9}0#&I9KVNP-M6s1&5}QC{`qr*Uv6mxRYoksym4c(9_%L zng&4522aG2{HXHZIi{v?BO;ZCCSq_#NCc3rqKwC5;p#{OHFc<}o(32ShCuW+U=TfZ zeHEyxIuxm^t^rp4$wiVdJ_H<*_LGbKmy7%@cgGF{GCML7N5T8zum%(o0r0(SIR5v! zocgWa4=(oix#<3u3t}e&+8OSD4g2R6+d(_qU)E(GewiOfWILY1wzhdda1sXxkB|}a zl$HP6FdMwr`94v^w_4oDEJm~ZLry}MjI5ZH^T9uI0lW{i_bch^@3nAPHqR}HENL`F z6@-@*=xlePbOeAd_`ULn3f^uNT16$K%1WInV-pAKeVbVRO?T*vlZ1*XEzKCCta#dT z(+ACO7f07#`_*cWFLNDS&vgNK9XFH(NB{<8$KvEg%1?{~l=Y9M<_v#1wC3wce~wiu zL1mc+gS_(X%Z_YRIPt8g6>OdMwVzE%6}OITU|72My9{#e$`yLCE)ySgvyySBT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6UxmLUAxw9&AwxH^`_`S*Q^0GBo~k+mT`a7!dJ@oLosVX2rN z@?P)$H>8tb1E?nCZP6t#RQ@B3rZ{q5rA;?^roR8))y_E0Dz2H(`jz4W2NQFeH8(xj z_>9QXZ2uj-2Vb{DZh97H(`hdLGs67LU~PVQs-lqK;*D_RVm6Z;!JSygGPq@SgwtFr zv_4KOalw9iR<8bI+Us_{Zrcd~$-$%FxIVZHuKF4PmyjL%`sQs?3x~xv--s8Nwn%W6 zo1R8c_&Yk|?~QE34DJRUbg4Ay+Q2_OPEZkddt|=CkT`0voOD}G`& zGOjsa>})8yRR6qHie;lO6=Uj{RCXg-?8ZZeU>Prk*{z*EFZQG*D^v(~-#%#EFZDI} ziwSdq-2XE1oY=ZMy?UifBD$L6$zduuEq|i1c>~NSGN3MQ)kXfD9AiLPUNeigNp2BL z)(my@jqs>j^_+gRkH@Mh?a)m2C!v5BIfFNhW$qLXBZo_B8N1*93ESv-=P=%S|4pQ4 zw55{nVi+Ecpi{ITPMW_Q3-D)hK9KD)6na(;899WuuN z^o16nZ<(E}u86G^M=yMC(-hsjSE3Q_eLA-0>H9uRVD{7F3|2yt5!VH7*Z#bulQpdX z-^$Flqttxcw@i80wB2M!E)Q9V%pqv-N?vC0962kBtm1=jYVNd_yO^|CsjgK^y-*qC zY`(c(QG##FSaK1~u1@OuTM`wd)t+%-j#ugD9=m^w{AU1-sI z19N>R>-<_c&9Ja@-=AR)qU~a*IQL*AGrQu%H}2jA-?z#xHln?3h+WF3NC)MfwJbD- zc@t{&Rwhk`FzLWHfWD02C=Bu@_FHfKD@_V>VH0e1fuYAJz5AvUR=mvv=Fq3r%t|lB Ri0}M280niKi*%hY{|7AYu$KS; literal 0 HcmV?d00001 diff --git a/ButcherManage.Form/Resources/title.png b/ButcherManage.Form/Resources/title.png new file mode 100644 index 0000000000000000000000000000000000000000..0e3a70dab198843c73ba90045ae949c6491b5b34 GIT binary patch literal 3223 zcmaJ^dpwi<8{Qm;_=Xt*O_j6s>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0=l&}WlrMP4E9F3#u5)dujp%^=LvErksJC`Zm{`H0yb;Z4aeort zQ++*?|CHO;-+FY=kluKMed5mZ5R!s=dy<=}cWc(@-Tm@~Ug2Y4kLn;8_u=`m)$8Jk zPxD($QosRr<+tHi&bRa@l@fShh3o3pq`SwS=D1Fpo#}%dRAC z>9!v9uhI>Fzh76KyeM6=lC(|~rAEk&e3ogSefz~V5(uc;{Nl*HiD3N3Rl(kRFTT|B HNc4XI*Rp=P literal 0 HcmV?d00001 diff --git a/ButcherManage.Form/Resources/wfLogo.png b/ButcherManage.Form/Resources/wfLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..c7946490fac0a22c427b8bb0ad5209337a17f7b5 GIT binary patch literal 2795 zcmaJ@XH-*p9u3l)8d@MyVx-OhDL@Fps4)r6gc_70IFS?rrjP^@iikl41ZGA+1*A7c zst5}9*Z@~4N>LO+90ddh)&dBQY;e@s59_{j-ustx@BOv=;iY+dx@xL{)c^p1rn?)# zSGHQOzA8$xukoQEIoV<$BnAlmxD26)%BKTxH11wH#GOrL(tYVvT5MD&eKPupvgN4psz7B=3Xjtej2Qr+@!_&iA zZgG6NUz{f;EG{z4i3Z)e1+rO;kqNNrLMlYe-p3JO#8~JTU5sqMdJTg@zCeVLSm@tL z1(3ZVcrKp~aj-?%gdyya5Jx9l1Pbniw6}&J;Rr_<+!2PbvwDbI zT@c1+@q{cc2ePV2-OG&@Vxh83|1N>e`!357d~K7gVK6b32SeDxS4;W^B$NL?l+FH* z76^Um|K$5Wg$0yY9v$XO7jUEbVY0z7Hm!!@Veou9RmkO2xZHi;y67Fw6>ah5t1lcf8RO0o2&tSfx;p_2m8saWSTu|a&WS*Dv9m+Nkpu*Sh~6&i zJ06a-Lph;bP&gvt8<)Thi)Pa~!f#yKKV17Ca#!uZ=E))x=zLZTo#w*lvLRo}#;|^z z3*v`*U%9j&=Ysqp7bZ&vwmRJZ8uqsoYR{yOc<(9?CzHyU+HdpwA0O*&_jngWTc`qh+lNp86JrzC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%*V#{3*lt%z{n3{@#rE+e?D>^WE!y$x6% zr585v>M4VR(hi&q!W`pTlohLfZr*Yr)u@#*v(B$rd$rDNRE z^k_8ckimT-C1*NSkgT21&(4Pp!fve#!I`f; zZu6lnPmXf7WS*E3G*@mJz*ID4ol>%n%MT;hfRV_DnBAWz{SYTIsv-{(%Iv>gfPhF*#_T=WlK$i4f!%95d8eN>th z;T9`zuhSA!SGm(hId{3v{GkFTeyOIG6RyuioU18oh8FU6I4 zE5_5bUXfJ_W187pvr zlP|^hwi;;YSZhyv^8VNZ6BFU4U0_9t<6@xnUu6;_iJ8Q3YjM^`AD8lki=$RmJ_mlA z>av>|@H5BRx9TX2LrG#ratB%!-Pr_|2aq zle@9OZnr%ax26o;_m~?-y=;EBeoeUi`~FyLVt~C(x?S5jlGJA|hWpqoBK2*gFy08t kFe%tSH1sbs`id$XFp`K&VV~-;TK)ZWCwda(this ComboBox box, Func SetSelectIndex = null, int top = 10, params string[] extendFields) + where T : BaseInfo, new() + { + box.DisplayMember = "Name"; + box.ValueMember = "ID"; + + var list = BaseInfoBL.GetList(top, extendFields: extendFields); + box.DataSource = list; + if (SetSelectIndex != null) + { + var idx = list.FindIndex(x => SetSelectIndex(x)); + if (idx > 0) + box.SelectedIndex = idx; + } + box.Refresh(); + } + } +} diff --git a/ButcherManage.Login/ButcherManage.Login.csproj b/ButcherManage.Login/ButcherManage.Login.csproj index 92c2ae4..3216efa 100644 --- a/ButcherManage.Login/ButcherManage.Login.csproj +++ b/ButcherManage.Login/ButcherManage.Login.csproj @@ -90,6 +90,15 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\yellow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\silvery.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bgTitle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ButcherWeight/Resources/bgTitle.png b/ButcherWeight/Resources/bgTitle.png new file mode 100644 index 0000000000000000000000000000000000000000..8f07b724da1b7726aac3b4b5bbb38cf72e16faed GIT binary patch literal 1066 zcmaJ=&1=*^6i+SMQs`ZaupxV?V!pq2Lf55kwsyg-WxLQ7JUGeBc0)Irm`vTY9;_ll z4?-{E(VIu{Djr1Eiw947@;?v+{Rc{&>__dPbRe0TH}Cg8e($}5^|jmca|?4E$IaJQ z-6q?o*ta-)f&JhAnBm!Wh1S}1gLG&gCYW1B#KU|&gj=|YA=-WT6)$nz^z)$ArtQWZ z$0wl#a~&xQV}|CqrAihaB=DJ(u`9A&zL> zEeq^LLIH9#gDqQ!qOGcysCb4h0u5pj8j1#xp#f9D6FX<&)fHV|E?E{U0JBgl0aLA2 zfl{k6kpX})!PcXc!pO%H-vRSI#+v71ooa$1B}t2r-lPlGyM&UoOJcrS&8uGG7dL|l zk$!qDFViS%7bn3Zj8+m7@csPDTqyY@QM}I5UI&tNGB?-Q`yH(~Ip7gD-#IJpEM}JefT@t{i^j&~$LQaQ(P& w?{{ILaItuBGeb7heb{-h|DBt<#63>$*Nd+|ALP?pudTW7ZasMR4_=W?!T~{ zqwy3hG*J?gu0+Gr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pd=~NCaVKJG$DSIb2UkLqL`4|DgmijJD88*xP*nQ`n-- zGht8?W}$M-I%aT&Fi$8GA~RzsO_{Y6l|9tOL?cC079(W>Win6KBEh-IIH{+smJbIw zDisn>T4Z-~r*t_4 zM$$uE{adbLM6SmUgo%kP$IN&xrdOIN0vsqC!AH&|c0|2Fu72cPWFvARCK<>x+&u!wxeT5~m9_;qU0^_Fh$KESGd%FK}-QDRekB)GI z?AEZf#mi@T_2Mpn;ruSYD0^_n9ZI%()y&;$$y;fF^<&W85=)q4zm(HXS!fjW57oJMEb<0i6n(zhEr9qob*0qUirE>5YP z_(wf8`cc#MzGjuX#J9YzwCsMxXCcq->UQ4BJ(*A$8qvJ2jBlJ7q6J>e{^BVR5%Jjt>0J??yT$^!)A_5zE)LUXv?o z9cz(R-pQrgcNm&;?~N_5YY>yDpz8kemwWxqC!ED;k7qAyXu>o^ x.ID).OrderBy(x => x.FinishWeight).ToList(); foreach (DataGridViewRow row in billGrid.Rows) { - if ((bool)row.Cells["M_FinishWeight"].Value) - row.DefaultCellStyle.BackColor = Color.YellowGreen; if ((int)row.Cells["M_PrintNumber"].Value > 0) - row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999"); + row.DefaultCellStyle.BackColor = Color.FromArgb(236, 152, 62); + else if ((bool)row.Cells["M_FinishWeight"].Value) + row.DefaultCellStyle.BackColor = Color.FromArgb(23, 223, 51); } totalNumLbl.Text = dmoList.Sum(x => x.Number ?? 0).ToString(); billGrid.Refresh(); diff --git a/ButcherWeight/WeightForm.resx b/ButcherWeight/WeightForm.resx index 1d2ddf1..57ce092 100644 --- a/ButcherWeight/WeightForm.resx +++ b/ButcherWeight/WeightForm.resx @@ -117,154 +117,348 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAIAAACw1AcgAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAACPSURBVBhXFcOHFoEAAEDR9wtGtmOnUKHsvT/czN4k + H0P3nMvM+DLTv0x1m2nZZlL6MHYWLUaaxVB9M1De9JUXvcKTbv5JJ/egLd1pZW80xRuNzJV6+kItdaaa + PFFJnDDiR/TYgXJ0TymypxjeoYW2qEETJWBS8G/I+9bkhDWysEL2rpA8S7Ju5wLR9e+a/wA97S5ZX5Ah + VwAAAABJRU5ErkJggg== + + + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + + + iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAM7SURBVGhD7dpZTypBEIbh+XvHn+uCuOOuuIs77iK4 + bxFQo/bxq5Nqa5oCROXmTF28CYlkiA8J09NdUTab/TM3N1ecn593CwsLbnFx0S0tLbnl5WW3srJCra6u + Urlczre2tpbIpAG7sBPMYAdDWMIUtjAGdPHm5sa9vb3Fen9/t75R6AhbGEezs7Pu9fXVamMwjmZmZtzz + 83Osl5cX6weFnjAm6Eql4qrV6pd6enqyPtJstGBL0NPT0+7x8VGtXC5bLaQZIhhHU1NT7u7uznd/f1+3 + h4cHS6QZcdIUxtHk5KS7vr6mcIfUur29tRqkmSF2hXE0MTHhzs/P3cXFRU2Xl5dWC2mGsIUxQZ+enrpi + sRirVCo17OzsLJFpFrLQEbYEPT4+7o6Ojqjj4+NYJycndSsUColMs+BCP3aFcTQ2Nub29vao/f39mg4O + DqwvpNmxK4yj0dFRt729HWtnZ6emfD5vKWlWoSeMCZo3TNbX12NtbGxYLRT6sStBZzIZv/sk450pLbmD + lcQ0E06zhHE0MjJC23m8TVovbP1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmB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1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmBM0FhQIzwqWr8X + u3porPM4LK6tnydNPTSWH5x8g/X9pKlBtzFpatBtTJp6aO2N2u+O1TzN0kPz3bFR2l3V+lxZNMpD46jF + al8EPTQ0pC6yrd8LxgStPU5av5eHbrY5Yn0/2HpoDOdpYWDP+nqaISLowcHBminJZnuuVv1CR9jCmKA3 + Nzcp7dQAhScHVjzNDLErQQ8MDDQ98+K2trYskWaEQk8YE3R4aru7u1uTdjBp5VUrdmRXgu7v7/fzB4eH + h75mR+nWZ9JKGrIrjAka0zThcIg2CCKTF0xSmoW0koYwha2HlqNM+APD15vOkRdOYqGHtGI/9oQtQff1 + 9flhPKTNmIVfgvUvicmxH3vCFsYEfXV1RYUTkRKekxdNcqELo3KwZFeCTqfTfsaX53kbwVufSRsJy44w + hS2MAV3EjzxPp8vB6hCe8cPkB/6Paf+zNJGwjMuesP0wLgG6Ay96e3tdKpWienp6qO7ubl9XV5evs7Mz + 0UkLacRu7AjTD9tCOp3u+Au2mDGZwgrkuwAAAABJRU5ErkJggg== + + + True - + True - + True - - True + + 417, 5 - - True + + 541, 13 - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - - 268, 5 + + True - - 143, 5 + + True - + True - + True - + True diff --git a/WeighAndGrading/BodyDiscontSetting.cs b/WeighAndGrading/BodyDiscontSetting.cs index 27d4177..6c1c65e 100644 --- a/WeighAndGrading/BodyDiscontSetting.cs +++ b/WeighAndGrading/BodyDiscontSetting.cs @@ -45,9 +45,13 @@ namespace WeighAndGrading var connection = LoginRpcUtil.TestConnection(); if (connection) { - GradeAndWeightRpc.SaveBodyDiscontItem(list); + try + { + GradeAndWeightRpc.SaveBodyDiscontItem(list); if (existFile) File.Delete(changeFlagPath); + } + catch { } } else if (!existFile) File.WriteAllText(changeFlagPath, string.Empty); diff --git a/WeighAndGrading/DataViewForm.cs b/WeighAndGrading/DataViewForm.cs index 70028a0..dbc2742 100644 --- a/WeighAndGrading/DataViewForm.cs +++ b/WeighAndGrading/DataViewForm.cs @@ -318,7 +318,7 @@ namespace WeighAndGrading { list = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, tang); } - catch (TimeoutException) { } + catch (Exception ex) { } } } @@ -546,8 +546,12 @@ namespace WeighAndGrading VerifyConnection(); if (connection) { - disconts = GradeAndWeightRpc.GetBodyDiscontItem(); - XmlUtil.SerializerObjToFile(disconts, discontPath); + try + { + disconts = GradeAndWeightRpc.GetBodyDiscontItem(); + XmlUtil.SerializerObjToFile(disconts, discontPath); + } + catch { } } else disconts = XmlUtil.DeserializeFromFile>(discontPath); diff --git a/WeighAndGrading/GradeFrom.Designer.cs b/WeighAndGrading/GradeFrom.Designer.cs index d94d044..5f7e977 100644 --- a/WeighAndGrading/GradeFrom.Designer.cs +++ b/WeighAndGrading/GradeFrom.Designer.cs @@ -104,8 +104,8 @@ this.btnStartWeight = new System.Windows.Forms.Button(); this.btnStopWeight = new System.Windows.Forms.Button(); this.dataConfirmBtn = new System.Windows.Forms.Button(); - this.batchSelect = new BWP.WinFormControl.UComboBox(); this.label3 = new System.Windows.Forms.Label(); + this.batchSelect = new System.Windows.Forms.ComboBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit(); this.groupBox2.SuspendLayout(); @@ -820,19 +820,6 @@ this.dataConfirmBtn.UseVisualStyleBackColor = true; this.dataConfirmBtn.Click += new System.EventHandler(this.dataConfirmBtn_Click); // - // batchSelect - // - this.batchSelect.CodeArgs = null; - this.batchSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.batchSelect.EnableTopItem = true; - this.batchSelect.Font = new System.Drawing.Font("宋体", 14F); - this.batchSelect.FormattingEnabled = true; - this.batchSelect.Location = new System.Drawing.Point(603, 8); - this.batchSelect.Name = "batchSelect"; - this.batchSelect.Range = 10; - this.batchSelect.Size = new System.Drawing.Size(204, 30); - this.batchSelect.TabIndex = 44; - // // label3 // this.label3.AutoSize = true; @@ -843,6 +830,15 @@ this.label3.TabIndex = 43; this.label3.Text = "批次"; // + // batchSelect + // + this.batchSelect.Font = new System.Drawing.Font("宋体", 14F); + this.batchSelect.FormattingEnabled = true; + this.batchSelect.Location = new System.Drawing.Point(603, 11); + this.batchSelect.Name = "batchSelect"; + this.batchSelect.Size = new System.Drawing.Size(204, 27); + this.batchSelect.TabIndex = 45; + // // GradeFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -964,7 +960,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; - private BWP.WinFormControl.UComboBox batchSelect; private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox batchSelect; } } \ No newline at end of file diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index 90889ea..22aed00 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -86,7 +86,22 @@ namespace WeighAndGrading maoGridView.DataSource = null; historyGrid.AutoGenerateColumns = false; historyGrid.DataSource = null; - batchSelect.Init("BaseInfoRpc/GetProductBatchList"); + + try + { + LocalGradeAndWeightBL.LoadProductBatchFromServer(); + } + catch + { + #if DEBUG + throw; +#endif + } + + + batchSelect.DataSource = LocalGradeAndWeightBL.GetProductBatch(); + batchSelect.DisplayMember = "Name"; + batchSelect.ValueMember = "ID"; tangList = new List(); maoList = new List(); noLivestockList = new ConcurrentQueue(); @@ -242,7 +257,7 @@ namespace WeighAndGrading private void syncBtn_Click(object sender, EventArgs e) { - if (batchSelect.LongValue == null) + if (batchSelect.SelectedValue == null) throw new Exception("请先选择批次"); if (butcherTimeInput.Date.Value == new DateTime(2018, 3, 15)) LocalGradeAndWeightBL.UpdateHistory(butcherTimeInput.Date.Value); @@ -346,7 +361,7 @@ namespace WeighAndGrading { list = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, tang); } - catch (TimeoutException) { } + catch (Exception ex) { } } } @@ -765,7 +780,7 @@ namespace WeighAndGrading maxIndex++; var entity = new GradeAndWeight_Detail(); entity.Index = maxIndex; - entity.ProductBatch_ID = batchSelect.LongValue; + entity.ProductBatch_ID = (long)batchSelect.SelectedValue; if (currentRow != null) { entity.OrderDetail_ID = currentRow.OrderDetail_ID; @@ -861,7 +876,7 @@ namespace WeighAndGrading maxIndex++; var entity = new GradeAndWeight_Detail(); entity.Index = maxIndex; - entity.ProductBatch_ID = batchSelect.LongValue; + entity.ProductBatch_ID = (long)batchSelect.SelectedValue; entity.Weight = (entity.Weight ?? 0) + weight; entity.Time = DateTime.Now; entity.Date = butcherTimeInput.Date.Value; @@ -1036,8 +1051,12 @@ namespace WeighAndGrading VerifyConnection(); if (connection) { - disconts = GradeAndWeightRpc.GetBodyDiscontItem(); - XmlUtil.SerializerObjToFile(disconts, discontPath); + try + { + disconts = GradeAndWeightRpc.GetBodyDiscontItem(); + XmlUtil.SerializerObjToFile(disconts, discontPath); + } + catch { } } else disconts = XmlUtil.DeserializeFromFile>(discontPath); @@ -1215,8 +1234,12 @@ namespace WeighAndGrading var changes = new List>(); foreach (var item in list) changes.Add(new CTuple(item.ID, item.Discont)); - GradeAndWeightRpc.SaveBodyDiscontItem(changes); - File.Delete(changeFlagPath); + try + { + GradeAndWeightRpc.SaveBodyDiscontItem(changes); + File.Delete(changeFlagPath); + } + catch { } } } diff --git a/WeighAndGrading/WeightGradePrint.cs b/WeighAndGrading/WeightGradePrint.cs index 04a6419..3473716 100644 --- a/WeighAndGrading/WeightGradePrint.cs +++ b/WeighAndGrading/WeightGradePrint.cs @@ -56,7 +56,7 @@ namespace WeighAndGrading var imgUrl = string.Format("TempImg\\_img{0}.png", id); try { - BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, imgUrl, 120); + BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, imgUrl, 100); } catch (Exception ex) {