From c49ab27fbf463e595570a253c533d6f039c2a938 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Wed, 13 Jun 2018 22:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=B3=BB=E5=88=97=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/BO.csproj | 1 + BO/BO/Bill/SecondOrder/SecondOrder.cs | 2 - BO/BO/Bill/SecondOrder/SecondOrder_Detail.cs | 2 - BO/BO/Bill/WeightBill/SelfHelpSendMsg.cs | 15 + BO/Utils/BillRpc/SecondOrderRpc.cs | 12 +- BO/Utils/BillRpc/WeightBillRpc.cs | 9 +- ButcherManage.BO/Bill/HotPick.cs | 30 + ButcherManage.BO/Bill/OrderDetail.cs | 60 ++ ButcherManage.BO/Bill/PickOutConfirmLocal.cs | 7 + ButcherManage.BO/Bill/PickOutRecord.cs | 15 - ButcherManage.BO/ButcherManage.BO.csproj | 6 +- ButcherManage.BO/EntityExpand.cs | 46 ++ ButcherManage.BO/Enums/DriveType.cs | 2 + ButcherManage.BO/LocalBL/HotPickBL.cs | 53 ++ ButcherManage.BO/LocalBL/OrderConfirmBL.cs | 66 ++ ButcherManage.BO/Utils/FormUtil.cs | 3 +- ButcherManage.Form/ButcherManage.Form.csproj | 18 + .../HotPickSelector.Designer.cs | 574 ++++++++++++++++ .../HotPickSelector_/HotPickSelector.cs | 201 ++++++ .../HotPickSelector_/HotPickSelector.resx | 156 +++++ .../OrderConfirmForm.Designer.cs | 629 ++++++++++++++++++ .../OrderConfirm_/OrderConfirmForm.cs | 285 ++++++++ .../OrderConfirm_/OrderConfirmForm.resx | 168 +++++ .../PickOutConfirm.Designer.cs | 237 ++++--- .../PickOutConfirm_/PickOutConfirm.cs | 34 +- ButcherManage.Login/Login.xaml | 2 +- ButcherManage.Login/Login.xaml.cs | 52 +- ButcherManageClient/Login.cs | 81 ++- ButcherOrder/ButcherOrderForm.cs | 2 +- ButcherWeight/WeightForm.Designer.cs | 93 ++- ButcherWeight/WeightForm.cs | 32 + ButcherWeight/WeightForm.resx | 9 + OrderConfirm/OrderConfirmForm.Designer.cs | 306 +++++---- 33 files changed, 2824 insertions(+), 384 deletions(-) create mode 100644 BO/BO/Bill/WeightBill/SelfHelpSendMsg.cs create mode 100644 ButcherManage.BO/Bill/HotPick.cs create mode 100644 ButcherManage.BO/Bill/OrderDetail.cs delete mode 100644 ButcherManage.BO/Bill/PickOutRecord.cs create mode 100644 ButcherManage.BO/EntityExpand.cs create mode 100644 ButcherManage.BO/LocalBL/HotPickBL.cs create mode 100644 ButcherManage.BO/LocalBL/OrderConfirmBL.cs create mode 100644 ButcherManage.Form/HotPickSelector_/HotPickSelector.Designer.cs create mode 100644 ButcherManage.Form/HotPickSelector_/HotPickSelector.cs create mode 100644 ButcherManage.Form/HotPickSelector_/HotPickSelector.resx create mode 100644 ButcherManage.Form/OrderConfirm_/OrderConfirmForm.Designer.cs create mode 100644 ButcherManage.Form/OrderConfirm_/OrderConfirmForm.cs create mode 100644 ButcherManage.Form/OrderConfirm_/OrderConfirmForm.resx diff --git a/BO/BO.csproj b/BO/BO.csproj index fe2f54d..e8b0f00 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -84,6 +84,7 @@ + diff --git a/BO/BO/Bill/SecondOrder/SecondOrder.cs b/BO/BO/Bill/SecondOrder/SecondOrder.cs index 1381db1..10c677b 100644 --- a/BO/BO/Bill/SecondOrder/SecondOrder.cs +++ b/BO/BO/Bill/SecondOrder/SecondOrder.cs @@ -17,8 +17,6 @@ namespace BO.BO.Bill public int HotFadeNumber { get; set; } - public bool IsOk { get; set; } - public bool Finish { get; set; } } } diff --git a/BO/BO/Bill/SecondOrder/SecondOrder_Detail.cs b/BO/BO/Bill/SecondOrder/SecondOrder_Detail.cs index 0dfdc19..12b6a50 100644 --- a/BO/BO/Bill/SecondOrder/SecondOrder_Detail.cs +++ b/BO/BO/Bill/SecondOrder/SecondOrder_Detail.cs @@ -13,7 +13,5 @@ namespace BO.BO.Bill public long SecondOrder_ID { get; set; } public int Number { get; set; } - - public DateTime Time { get; set; } } } diff --git a/BO/BO/Bill/WeightBill/SelfHelpSendMsg.cs b/BO/BO/Bill/WeightBill/SelfHelpSendMsg.cs new file mode 100644 index 0000000..aa9a30a --- /dev/null +++ b/BO/BO/Bill/WeightBill/SelfHelpSendMsg.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO +{ + public class SelfHelpSendMsg + { + public long WeightBill_ID { get; set; } + public string Car_Name { get; set; } + public string Supplier_Name { get; set; } + } +} diff --git a/BO/Utils/BillRpc/SecondOrderRpc.cs b/BO/Utils/BillRpc/SecondOrderRpc.cs index da57df6..c82c852 100644 --- a/BO/Utils/BillRpc/SecondOrderRpc.cs +++ b/BO/Utils/BillRpc/SecondOrderRpc.cs @@ -1,5 +1,6 @@ using BO.BO.Bill; using Forks.JsonRpc.Client; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -11,21 +12,20 @@ namespace BO.Utils.BillRpc { public static class SecondOrderRpc { - static JavaScriptSerializer serializer = new JavaScriptSerializer(); public static List GetSecondOrderList(DateTime date) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/SyncSecondOrder"; var result = RpcFacade.Call(method, date); - return serializer.Deserialize>(result); + return JsonConvert.DeserializeObject>(result); } public static void Insert(SecondOrder_Detail detail, SecondOrder order) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/InsertDetail"; - var dJson = serializer.Serialize(detail); + var dJson = JsonConvert.SerializeObject(detail); string mJson = string.Empty; if (detail.SecondOrder_ID == 0) - mJson = serializer.Serialize(order); + mJson = JsonConvert.SerializeObject(order); order.ID = RpcFacade.Call(method, dJson, mJson, order.OrderDetail_ID); } @@ -40,7 +40,7 @@ namespace BO.Utils.BillRpc const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/SetFinish"; string mJson = string.Empty; if (id == 0) - mJson = serializer.Serialize(order); + mJson = JsonConvert.SerializeObject(order); var r = RpcFacade.Call(method, id, orderDetailID, mJson); if (id == 0) order.ID = r; @@ -51,7 +51,7 @@ namespace BO.Utils.BillRpc const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/GetSecondOrderDetails"; var result = RpcFacade.Call(method, id); result = result.ESerializeDateTime(); - return serializer.Deserialize>(result); + return JsonConvert.DeserializeObject>(result); } } } diff --git a/BO/Utils/BillRpc/WeightBillRpc.cs b/BO/Utils/BillRpc/WeightBillRpc.cs index b86f574..b49fb88 100644 --- a/BO/Utils/BillRpc/WeightBillRpc.cs +++ b/BO/Utils/BillRpc/WeightBillRpc.cs @@ -2,6 +2,7 @@ using BO.BO.BaseInfo; using Forks.JsonRpc.Client; using Forks.JsonRpc.Client.Data; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -14,7 +15,7 @@ namespace BO.Utils.BillRpc public static class WeightBillRpc { static JavaScriptSerializer serializer = new JavaScriptSerializer(); - public static List GetWeightBillList(long? carID, long? supplierID,DateTime date) + public static List GetWeightBillList(long? carID, long? supplierID, DateTime date) { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetWeightBillList"; var obj = RpcFacade.Call(method, date, carID, supplierID); @@ -125,5 +126,11 @@ namespace BO.Utils.BillRpc const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetFarmerInfo"; return serializer.Deserialize(RpcFacade.Call(method, id)); } + + public static List GetMsgList() + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetMsgList"; + return JsonConvert.DeserializeObject>(RpcFacade.Call(method)); + } } } diff --git a/ButcherManage.BO/Bill/HotPick.cs b/ButcherManage.BO/Bill/HotPick.cs new file mode 100644 index 0000000..1e9785a --- /dev/null +++ b/ButcherManage.BO/Bill/HotPick.cs @@ -0,0 +1,30 @@ +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + public class HotPick + { + public long ID { get; set; } + public long OrderDetail_ID { get; set; } + + public int? Order { get; set; } + + public int? PlanNumber { get; set; } + + public int? HotFadeNumber { get; set; } + + public bool Finish { get; set; } + } + + public class HotPick_Detail : IWithNumber + { + public long ID { get; set; } + public long SecondOrder_ID { get; set; } + public int? Number { get; set; } + } +} diff --git a/ButcherManage.BO/Bill/OrderDetail.cs b/ButcherManage.BO/Bill/OrderDetail.cs new file mode 100644 index 0000000..bfb6346 --- /dev/null +++ b/ButcherManage.BO/Bill/OrderDetail.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO.Bill +{ + public class OrderDetail + { + public long ID { get; set; } + + public string Creator { get; set; } + + public long? AccountingUnit_ID { get; set; } + + public DateTime? Date { get; set; } + + public long WeightBill_ID { get; set; } + + public long? B3WeighBill_ID { get; set; } + + public int Order { get; set; } + + public int PlanNumber { get; set; } + + public string LiveColonyHouse_Name { get; set; } + + public bool IsHurryButcher { get; set; } + + public bool SecondarySplit { get; set; } + + //0 = 未开始; 10 = 已开始; 20 = 已完毕; + public int OrderState { get; set; } + + public int Doing { get { if (OrderState == 10) return -10; else return OrderState; } } + + public int? ConfirmNumber { get; set; } + } + + public class OrderConfirmDetail : IWithNumber + { + public long ID { get; set; } + public long OrderDetail_ID { get; set; } + public int? Number { get; set; } + } + + public class HurryRecord + { + public long WeightBill_ID { get; set; } + + public long? B3WeighBill_ID { get; set; } + + public string LiveColonyHouse_Name { get; set; } + + public int HurryNumber { get; set; } + + public long? ToOrderDetail_ID { get; set; } + } +} diff --git a/ButcherManage.BO/Bill/PickOutConfirmLocal.cs b/ButcherManage.BO/Bill/PickOutConfirmLocal.cs index 5d0712d..ad14880 100644 --- a/ButcherManage.BO/Bill/PickOutConfirmLocal.cs +++ b/ButcherManage.BO/Bill/PickOutConfirmLocal.cs @@ -15,4 +15,11 @@ namespace ButcherManage.BO //0:未开始,1:开始,-1:结束 public int ConfirmState { get; set; } } + + [MapToTable("Butcher_PickOutRecord")] + public class PickOutRecord : Base, IWithNumber + { + public long Order_ID { get; set; } + public int? Number { get; set; } + } } diff --git a/ButcherManage.BO/Bill/PickOutRecord.cs b/ButcherManage.BO/Bill/PickOutRecord.cs deleted file mode 100644 index 16c7c0c..0000000 --- a/ButcherManage.BO/Bill/PickOutRecord.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Forks.EnterpriseServices.DomainObjects2; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace ButcherManage.BO -{ - [MapToTable("Butcher_PickOutRecord")] - public class PickOutRecord : Base - { - public long Order_ID { get; set; } - public int? Number { get; set; } - } -} diff --git a/ButcherManage.BO/ButcherManage.BO.csproj b/ButcherManage.BO/ButcherManage.BO.csproj index 8b98025..4d748bc 100644 --- a/ButcherManage.BO/ButcherManage.BO.csproj +++ b/ButcherManage.BO/ButcherManage.BO.csproj @@ -60,10 +60,14 @@ + + - + + + diff --git a/ButcherManage.BO/EntityExpand.cs b/ButcherManage.BO/EntityExpand.cs new file mode 100644 index 0000000..9b55310 --- /dev/null +++ b/ButcherManage.BO/EntityExpand.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherManage.BO +{ + public interface IWithNumber + { + int? Number { get; set; } + } + + public class EntityExpand + { + public int? Number1 { get; set; } + + public int? Number2 { get; set; } + + public int? Number3 { get; set; } + + public int? Number4 { get; set; } + + public int? Number5 { get; set; } + + public static List Build(List list) + where T : IWithNumber + { + var result = new List(); + var t = typeof(EntityExpand); + for (var i = 0; i < list.Count; ) + { + var entity = new EntityExpand(); + result.Add(entity); + for (var j = 1; j <= 5; j++) + { + t.GetProperty(string.Format("Number{0}", j)).SetValue(entity, list[i].Number); + i++; + if (i == list.Count) + break; + } + } + return result; + } + } +} diff --git a/ButcherManage.BO/Enums/DriveType.cs b/ButcherManage.BO/Enums/DriveType.cs index d244418..6eb546a 100644 --- a/ButcherManage.BO/Enums/DriveType.cs +++ b/ButcherManage.BO/Enums/DriveType.cs @@ -9,5 +9,7 @@ namespace ButcherManage.BO.Enums public enum 设备类别 { 赶猪确认 = 103, + 上线确认 = 104, + 烫毛分线 = 105, } } diff --git a/ButcherManage.BO/LocalBL/HotPickBL.cs b/ButcherManage.BO/LocalBL/HotPickBL.cs new file mode 100644 index 0000000..ff46a03 --- /dev/null +++ b/ButcherManage.BO/LocalBL/HotPickBL.cs @@ -0,0 +1,53 @@ +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 HotPickBL + { + public static List GetSecondOrderList(DateTime date) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/SyncSecondOrder"; + var result = SimpleRest.Call(method, date); + return JsonConvert.DeserializeObject>(result); + } + + public static void Insert(HotPick_Detail detail, HotPick order) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/InsertDetail"; + var dJson = JsonConvert.SerializeObject(detail); + string mJson = string.Empty; + if (detail.SecondOrder_ID == 0) + mJson = JsonConvert.SerializeObject(order); + order.ID = SimpleRest.Call(method, dJson, mJson, order.OrderDetail_ID); + } + + public static void DeleteDetail(HotPick_Detail detail) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/DeleteDetail"; + SimpleRest.Call(method, detail.ID, detail.SecondOrder_ID, detail.Number); + } + + public static void SetFinish(HotPick order) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/SetFinish"; + string mJson = string.Empty; + if (order.ID == 0) + mJson = JsonConvert.SerializeObject(order); + var r = SimpleRest.Call(method, order.ID, order.OrderDetail_ID, mJson); + if (order.ID == 0) + order.ID = r; + } + + public static List GetSecondOrderDetails(long id) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/SecondOrderRpc/GetSecondOrderDetails"; + var result = SimpleRest.Call(method, id); + return JsonConvert.DeserializeObject>(result); + } + } +} diff --git a/ButcherManage.BO/LocalBL/OrderConfirmBL.cs b/ButcherManage.BO/LocalBL/OrderConfirmBL.cs new file mode 100644 index 0000000..18869ca --- /dev/null +++ b/ButcherManage.BO/LocalBL/OrderConfirmBL.cs @@ -0,0 +1,66 @@ +using ButcherManage.BO.Bill; +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 OrderConfirmBL + { + public static List GetOrderDetail(DateTime date) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetConfirmOrder"; + var result = SimpleRest.Call(method, date); + return JsonConvert.DeserializeObject>(result); + } + + public static List GetRecords(long id) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetOrderConfirmDetail"; + var result = SimpleRest.Call(method, id); + return JsonConvert.DeserializeObject>(result); + } + + public static void SaveRecord(OrderConfirmDetail detail) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/SaveConfirmDetail"; + detail.ID = SimpleRest.Call(method, JsonConvert.SerializeObject(detail)); + } + + public static void SetOrderState(long id, int state) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/SetOrderState"; + SimpleRest.Call(method, id, state); + } + + public static HurryRecord GetHurryRecord(long id) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetHurryRecord"; + var result = SimpleRest.Call(method, id); + return JsonConvert.DeserializeObject(result); + } + + public static int GetCurrentOrder(long id) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetCurrentOrder"; + return SimpleRest.Call(method, id); + } + + public static int GetMaxOrder(DateTime date) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetMaxOrder"; + return SimpleRest.Call(method, date); + } + + public static void InsertByHurryRecord(OrderDetail orderDetail, long hurryOrderID) + { + orderDetail.AccountingUnit_ID = 1; + orderDetail.Creator = "田存波"; + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/InsertByHurryRecord"; + orderDetail.ID = SimpleRest.Call(method, JsonConvert.SerializeObject(orderDetail), hurryOrderID); + } + } +} diff --git a/ButcherManage.BO/Utils/FormUtil.cs b/ButcherManage.BO/Utils/FormUtil.cs index 2bcc2f2..7d66d70 100644 --- a/ButcherManage.BO/Utils/FormUtil.cs +++ b/ButcherManage.BO/Utils/FormUtil.cs @@ -12,7 +12,8 @@ namespace ButcherManage.BO.Utils { public static Form CreateFrom() { - var dll = Path.Combine(Environment.CurrentDirectory, "ButcherManage.Form.dll"); + //var dll = Path.Combine(Environment.CurrentDirectory, "ButcherManage.Form.dll"); + var dll = Path.Combine(@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManage.Form\bin\Debug", "ButcherManage.Form.dll"); if (!File.Exists(dll)) throw new Exception("缺少必要的程序集文件 ButcherManage.Form.dll"); diff --git a/ButcherManage.Form/ButcherManage.Form.csproj b/ButcherManage.Form/ButcherManage.Form.csproj index eef9b22..42ee2c0 100644 --- a/ButcherManage.Form/ButcherManage.Form.csproj +++ b/ButcherManage.Form/ButcherManage.Form.csproj @@ -53,6 +53,18 @@ CalendarSelecter.xaml + + Form + + + HotPickSelector.cs + + + Form + + + OrderConfirmForm.cs + Form @@ -62,6 +74,12 @@ + + HotPickSelector.cs + + + OrderConfirmForm.cs + PickOutConfirm.cs diff --git a/ButcherManage.Form/HotPickSelector_/HotPickSelector.Designer.cs b/ButcherManage.Form/HotPickSelector_/HotPickSelector.Designer.cs new file mode 100644 index 0000000..2b48742 --- /dev/null +++ b/ButcherManage.Form/HotPickSelector_/HotPickSelector.Designer.cs @@ -0,0 +1,574 @@ +namespace ButcherManage.HotPickSelector_ +{ + partial class HotPickSelector + { + /// + /// 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 dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + this.queryBtn = new WinFormControl.NButton(); + this.datePicker = new System.Windows.Forms.TextBox(); + this.colseBtn = new WinFormControl.NButton(); + this.uTimerLabel1 = new WinFormControl.UTimerLabel(); + this.uLabel1 = new WinFormControl.ULabel(); + this.numPad = new System.Windows.Forms.FlowLayoutPanel(); + this.R_C5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.recordGrid = new WinFormControl.UDataGridView(); + this.countLbl = new WinFormControl.ULabel(); + this.uLabel3 = new WinFormControl.ULabel(); + this.uLabel2 = new WinFormControl.ULabel(); + this.numberLbl = new WinFormControl.ULabel(); + this.zeroBtn = new WinFormControl.NButton(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.orderGrid = new WinFormControl.UDataGridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.uLabel4 = new WinFormControl.ULabel(); + this.uLabel5 = new WinFormControl.ULabel(); + this.orderLbl = new WinFormControl.ULabel(); + this.hotNumLbl = new WinFormControl.ULabel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.L_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_Finish = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_HotFadeNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_End = new System.Windows.Forms.DataGridViewButtonColumn(); + ((System.ComponentModel.ISupportInitialize)(this.recordGrid)).BeginInit(); + this.panel3.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).BeginInit(); + this.panel1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.SuspendLayout(); + // + // queryBtn + // + this.queryBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.queryBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.queryBtn.Font = new System.Drawing.Font("宋体", 12F); + this.queryBtn.ForeColor = System.Drawing.Color.White; + this.queryBtn.Location = new System.Drawing.Point(283, 18); + this.queryBtn.Name = "queryBtn"; + this.queryBtn.PlaySound = false; + this.queryBtn.Size = new System.Drawing.Size(113, 45); + this.queryBtn.SoundType = WinFormControl.SoundType.Click; + this.queryBtn.TabIndex = 16; + this.queryBtn.Text = "查 询"; + this.queryBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.queryBtn.UseVisualStyleBackColor = false; + this.queryBtn.Click += new System.EventHandler(this.queryBtn_Click); + // + // datePicker + // + this.datePicker.Font = new System.Drawing.Font("宋体", 15F); + this.datePicker.Location = new System.Drawing.Point(121, 26); + this.datePicker.Name = "datePicker"; + this.datePicker.ReadOnly = true; + this.datePicker.Size = new System.Drawing.Size(156, 30); + this.datePicker.TabIndex = 14; + this.datePicker.MouseDown += new System.Windows.Forms.MouseEventHandler(this.datePicker_MouseDown); + // + // colseBtn + // + this.colseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.colseBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.colseBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.colseBtn.Font = new System.Drawing.Font("宋体", 12F); + this.colseBtn.ForeColor = System.Drawing.Color.White; + this.colseBtn.Location = new System.Drawing.Point(897, 16); + this.colseBtn.Name = "colseBtn"; + this.colseBtn.PlaySound = false; + this.colseBtn.Size = new System.Drawing.Size(113, 45); + this.colseBtn.SoundType = WinFormControl.SoundType.Click; + this.colseBtn.TabIndex = 13; + this.colseBtn.Text = "关 闭"; + this.colseBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.colseBtn.UseVisualStyleBackColor = false; + this.colseBtn.Click += new System.EventHandler(this.colseBtn_Click); + // + // uTimerLabel1 + // + this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uTimerLabel1.AutoSize = true; + this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; + this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 13F); + this.uTimerLabel1.Format = "M月d日 H:mm:ss"; + this.uTimerLabel1.Location = new System.Drawing.Point(739, 29); + this.uTimerLabel1.Name = "uTimerLabel1"; + this.uTimerLabel1.Size = new System.Drawing.Size(152, 18); + this.uTimerLabel1.TabIndex = 10; + this.uTimerLabel1.Text = "6月13日 11:00:49"; + // + // 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(12, 31); + this.uLabel1.Name = "uLabel1"; + this.uLabel1.Size = new System.Drawing.Size(109, 20); + this.uLabel1.TabIndex = 15; + this.uLabel1.Text = "宰杀日期:"; + // + // numPad + // + this.numPad.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.numPad.Location = new System.Drawing.Point(-1, 220); + this.numPad.Name = "numPad"; + this.numPad.Size = new System.Drawing.Size(421, 278); + this.numPad.TabIndex = 0; + // + // R_C5 + // + this.R_C5.DataPropertyName = "Number5"; + this.R_C5.HeaderText = "列5"; + this.R_C5.Name = "R_C5"; + this.R_C5.ReadOnly = true; + this.R_C5.Width = 80; + // + // R_C4 + // + this.R_C4.DataPropertyName = "Number4"; + this.R_C4.HeaderText = "列4"; + this.R_C4.Name = "R_C4"; + this.R_C4.ReadOnly = true; + this.R_C4.Width = 80; + // + // R_C3 + // + this.R_C3.DataPropertyName = "Number3"; + this.R_C3.HeaderText = "列3"; + this.R_C3.Name = "R_C3"; + this.R_C3.ReadOnly = true; + this.R_C3.Width = 80; + // + // R_C2 + // + this.R_C2.DataPropertyName = "Number2"; + this.R_C2.HeaderText = "列2"; + this.R_C2.Name = "R_C2"; + this.R_C2.ReadOnly = true; + this.R_C2.Width = 80; + // + // R_C1 + // + this.R_C1.DataPropertyName = "Number1"; + this.R_C1.HeaderText = "列1"; + this.R_C1.Name = "R_C1"; + this.R_C1.ReadOnly = true; + this.R_C1.Width = 80; + // + // recordGrid + // + this.recordGrid.AllowUserToAddRows = false; + this.recordGrid.AllowUserToDeleteRows = false; + this.recordGrid.AllowUserToResizeColumns = false; + this.recordGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.recordGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.recordGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.recordGrid.BackgroundColor = System.Drawing.Color.White; + this.recordGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.recordGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.recordGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.recordGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.R_C1, + this.R_C2, + this.R_C3, + this.R_C4, + this.R_C5}); + this.recordGrid.Location = new System.Drawing.Point(-1, -1); + this.recordGrid.MultiSelect = false; + this.recordGrid.Name = "recordGrid"; + this.recordGrid.ReadOnly = true; + this.recordGrid.RowHeadersVisible = false; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15F); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.recordGrid.RowsDefaultCellStyle = dataGridViewCellStyle3; + this.recordGrid.RowTemplate.Height = 50; + this.recordGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.recordGrid.Size = new System.Drawing.Size(421, 153); + this.recordGrid.TabIndex = 1; + // + // countLbl + // + this.countLbl.AutoSize = true; + this.countLbl.BackColor = System.Drawing.Color.Transparent; + this.countLbl.Font = new System.Drawing.Font("宋体", 15F); + this.countLbl.ForeColor = System.Drawing.Color.Red; + this.countLbl.Location = new System.Drawing.Point(14, 9); + this.countLbl.Name = "countLbl"; + this.countLbl.Size = new System.Drawing.Size(19, 20); + this.countLbl.TabIndex = 2; + this.countLbl.Text = "0"; + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.Transparent; + this.uLabel3.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel3.ForeColor = System.Drawing.Color.Red; + this.uLabel3.Location = new System.Drawing.Point(200, 9); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(29, 20); + this.uLabel3.TabIndex = 5; + this.uLabel3.Text = "头"; + // + // uLabel2 + // + this.uLabel2.AutoSize = true; + this.uLabel2.BackColor = System.Drawing.Color.Transparent; + this.uLabel2.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel2.ForeColor = System.Drawing.Color.Red; + this.uLabel2.Location = new System.Drawing.Point(55, 9); + this.uLabel2.Name = "uLabel2"; + this.uLabel2.Size = new System.Drawing.Size(29, 20); + this.uLabel2.TabIndex = 3; + this.uLabel2.Text = "次"; + // + // numberLbl + // + this.numberLbl.AutoSize = true; + this.numberLbl.BackColor = System.Drawing.Color.Transparent; + this.numberLbl.Font = new System.Drawing.Font("宋体", 15F); + this.numberLbl.ForeColor = System.Drawing.Color.Red; + this.numberLbl.Location = new System.Drawing.Point(159, 9); + this.numberLbl.Name = "numberLbl"; + this.numberLbl.Size = new System.Drawing.Size(19, 20); + this.numberLbl.TabIndex = 4; + this.numberLbl.Text = "0"; + // + // zeroBtn + // + this.zeroBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.zeroBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.zeroBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.zeroBtn.Font = new System.Drawing.Font("宋体", 15F); + this.zeroBtn.ForeColor = System.Drawing.Color.White; + this.zeroBtn.Location = new System.Drawing.Point(17, 157); + this.zeroBtn.Name = "zeroBtn"; + this.zeroBtn.PlaySound = true; + this.zeroBtn.Size = new System.Drawing.Size(100, 60); + this.zeroBtn.SoundType = WinFormControl.SoundType.Click; + this.zeroBtn.TabIndex = 7; + this.zeroBtn.Text = "0"; + this.zeroBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.zeroBtn.UseVisualStyleBackColor = false; + this.zeroBtn.Click += new System.EventHandler(this.NumberBtnClick); + // + // panel3 + // + this.panel3.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.panel3.Controls.Add(this.countLbl); + this.panel3.Controls.Add(this.uLabel3); + this.panel3.Controls.Add(this.uLabel2); + this.panel3.Controls.Add(this.numberLbl); + this.panel3.Location = new System.Drawing.Point(157, 158); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(239, 38); + this.panel3.TabIndex = 6; + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel2.Controls.Add(this.zeroBtn); + this.panel2.Controls.Add(this.panel3); + this.panel2.Controls.Add(this.recordGrid); + this.panel2.Controls.Add(this.numPad); + this.panel2.Location = new System.Drawing.Point(589, 72); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(421, 503); + this.panel2.TabIndex = 12; + // + // orderGrid + // + this.orderGrid.AllowUserToAddRows = false; + this.orderGrid.AllowUserToDeleteRows = false; + this.orderGrid.AllowUserToResizeColumns = false; + this.orderGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + this.orderGrid.BackgroundColor = System.Drawing.Color.White; + this.orderGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + this.orderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.orderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.L_ID, + this.L_OrderDetail_ID, + this.L_Finish, + this.L_Order, + this.L_PlanNumber, + this.L_HotFadeNumber, + this.L_End}); + this.orderGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.orderGrid.Location = new System.Drawing.Point(0, 0); + this.orderGrid.MultiSelect = false; + this.orderGrid.Name = "orderGrid"; + this.orderGrid.ReadOnly = true; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.RowHeadersDefaultCellStyle = dataGridViewCellStyle7; + this.orderGrid.RowHeadersVisible = false; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 15F); + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle8; + this.orderGrid.RowTemplate.Height = 80; + this.orderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.orderGrid.Size = new System.Drawing.Size(557, 501); + this.orderGrid.TabIndex = 2; + this.orderGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellClick); + this.orderGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellContentClick); + this.orderGrid.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.orderGrid_RowPrePaint); + // + // panel1 + // + this.panel1.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.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.orderGrid); + this.panel1.Location = new System.Drawing.Point(12, 72); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(559, 503); + this.panel1.TabIndex = 11; + // + // uLabel4 + // + this.uLabel4.AutoSize = true; + this.uLabel4.BackColor = System.Drawing.Color.Transparent; + this.uLabel4.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel4.ForeColor = System.Drawing.SystemColors.ControlText; + this.uLabel4.Location = new System.Drawing.Point(3, 18); + this.uLabel4.Name = "uLabel4"; + this.uLabel4.Size = new System.Drawing.Size(69, 20); + this.uLabel4.TabIndex = 17; + this.uLabel4.Text = "顺序:"; + // + // uLabel5 + // + this.uLabel5.AutoSize = true; + this.uLabel5.BackColor = System.Drawing.Color.Transparent; + this.uLabel5.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel5.ForeColor = System.Drawing.SystemColors.ControlText; + this.uLabel5.Location = new System.Drawing.Point(155, 18); + this.uLabel5.Name = "uLabel5"; + this.uLabel5.Size = new System.Drawing.Size(109, 20); + this.uLabel5.TabIndex = 19; + this.uLabel5.Text = "烫褪合计:"; + // + // orderLbl + // + this.orderLbl.AutoSize = true; + this.orderLbl.BackColor = System.Drawing.Color.Transparent; + this.orderLbl.Font = new System.Drawing.Font("宋体", 23F); + this.orderLbl.ForeColor = System.Drawing.Color.Red; + this.orderLbl.Location = new System.Drawing.Point(72, 10); + this.orderLbl.Name = "orderLbl"; + this.orderLbl.Size = new System.Drawing.Size(30, 31); + this.orderLbl.TabIndex = 18; + this.orderLbl.Text = "0"; + // + // hotNumLbl + // + this.hotNumLbl.AutoSize = true; + this.hotNumLbl.BackColor = System.Drawing.Color.Transparent; + this.hotNumLbl.Font = new System.Drawing.Font("宋体", 23F); + this.hotNumLbl.ForeColor = System.Drawing.Color.Red; + this.hotNumLbl.Location = new System.Drawing.Point(249, 10); + this.hotNumLbl.Name = "hotNumLbl"; + this.hotNumLbl.Size = new System.Drawing.Size(30, 31); + this.hotNumLbl.TabIndex = 20; + this.hotNumLbl.Text = "0"; + // + // panel4 + // + this.panel4.Controls.Add(this.uLabel4); + this.panel4.Controls.Add(this.hotNumLbl); + this.panel4.Controls.Add(this.uLabel5); + this.panel4.Controls.Add(this.orderLbl); + this.panel4.Location = new System.Drawing.Point(404, 13); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(329, 55); + this.panel4.TabIndex = 3; + // + // L_ID + // + this.L_ID.DataPropertyName = "ID"; + this.L_ID.HeaderText = "ID"; + this.L_ID.Name = "L_ID"; + this.L_ID.ReadOnly = true; + this.L_ID.Visible = false; + // + // L_OrderDetail_ID + // + this.L_OrderDetail_ID.DataPropertyName = "OrderDetail_ID"; + this.L_OrderDetail_ID.HeaderText = "OrderDetail_ID"; + this.L_OrderDetail_ID.Name = "L_OrderDetail_ID"; + this.L_OrderDetail_ID.ReadOnly = true; + this.L_OrderDetail_ID.Visible = false; + // + // L_Finish + // + this.L_Finish.DataPropertyName = "Finish"; + this.L_Finish.HeaderText = "Finish"; + this.L_Finish.Name = "L_Finish"; + this.L_Finish.ReadOnly = true; + this.L_Finish.Visible = false; + // + // L_Order + // + this.L_Order.DataPropertyName = "Order"; + this.L_Order.HeaderText = "顺序"; + this.L_Order.Name = "L_Order"; + this.L_Order.ReadOnly = true; + // + // L_PlanNumber + // + this.L_PlanNumber.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.L_PlanNumber.DataPropertyName = "PlanNumber"; + this.L_PlanNumber.HeaderText = "头数"; + this.L_PlanNumber.MinimumWidth = 100; + this.L_PlanNumber.Name = "L_PlanNumber"; + this.L_PlanNumber.ReadOnly = true; + // + // L_HotFadeNumber + // + this.L_HotFadeNumber.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.L_HotFadeNumber.DataPropertyName = "HotFadeNumber"; + this.L_HotFadeNumber.HeaderText = "烫褪头数"; + this.L_HotFadeNumber.MinimumWidth = 100; + this.L_HotFadeNumber.Name = "L_HotFadeNumber"; + this.L_HotFadeNumber.ReadOnly = true; + // + // L_End + // + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.L_End.DefaultCellStyle = dataGridViewCellStyle6; + this.L_End.HeaderText = "结束"; + this.L_End.MinimumWidth = 160; + this.L_End.Name = "L_End"; + this.L_End.ReadOnly = true; + this.L_End.Text = "结束"; + this.L_End.UseColumnTextForButtonValue = true; + this.L_End.Width = 160; + // + // HotPickSelector + // + 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(1022, 591); + this.Controls.Add(this.panel4); + this.Controls.Add(this.queryBtn); + this.Controls.Add(this.datePicker); + this.Controls.Add(this.colseBtn); + this.Controls.Add(this.uTimerLabel1); + this.Controls.Add(this.uLabel1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Name = "HotPickSelector"; + this.Text = "烫毛分线"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + ((System.ComponentModel.ISupportInitialize)(this.recordGrid)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private WinFormControl.NButton queryBtn; + private System.Windows.Forms.TextBox datePicker; + private WinFormControl.NButton colseBtn; + private WinFormControl.UTimerLabel uTimerLabel1; + private WinFormControl.ULabel uLabel1; + private System.Windows.Forms.FlowLayoutPanel numPad; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C5; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C4; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C3; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C2; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C1; + private WinFormControl.UDataGridView recordGrid; + private WinFormControl.ULabel countLbl; + private WinFormControl.ULabel uLabel3; + private WinFormControl.ULabel uLabel2; + private WinFormControl.ULabel numberLbl; + private WinFormControl.NButton zeroBtn; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel2; + private WinFormControl.UDataGridView orderGrid; + private System.Windows.Forms.Panel panel1; + private WinFormControl.ULabel uLabel4; + private WinFormControl.ULabel uLabel5; + private WinFormControl.ULabel orderLbl; + private WinFormControl.ULabel hotNumLbl; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.DataGridViewTextBoxColumn L_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn L_OrderDetail_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn L_Finish; + private System.Windows.Forms.DataGridViewTextBoxColumn L_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn L_PlanNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn L_HotFadeNumber; + private System.Windows.Forms.DataGridViewButtonColumn L_End; + + } +} \ No newline at end of file diff --git a/ButcherManage.Form/HotPickSelector_/HotPickSelector.cs b/ButcherManage.Form/HotPickSelector_/HotPickSelector.cs new file mode 100644 index 0000000..deafcb2 --- /dev/null +++ b/ButcherManage.Form/HotPickSelector_/HotPickSelector.cs @@ -0,0 +1,201 @@ +using ButcherManage.BO; +using ButcherManage.BO.Enums; +using ButcherManage.BO.LocalBL; +using ButcherManage.BO.Utils; +using ButcherManage.Dialogs; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WinFormControl; + +namespace ButcherManage.HotPickSelector_ +{ + public partial class HotPickSelector : Form, IWithRoleForm + { + #region IWithRoleForm + public List RoleName + { + get { return new List { (short)设备类别.烫毛分线 }; } + } + + public Form Generate() + { + return this; + } + #endregion + + List list; + List records; + DateTime date = DateTime.Today; + HotPick current; + + public HotPickSelector() + { + InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + datePicker.Text = date.ToString("yyyy-MM-dd"); + BindGrid(); + FillNumberPad(); + } + + void RefreshRecordGrid()//bindgrid、numberclick + { + if (current == null) + return; + records = HotPickBL.GetSecondOrderDetails(current.ID); + var row = records.Count % 5; + if (records.Count % 5 == 0) + { + records.Add(new HotPick_Detail() { SecondOrder_ID = current.ID }); + row = 0; + } + BindRecorGrid(); + BindLabel(); + recordGrid.Rows[records.Count / 5].Cells[row].Selected = true; + } + + void BindLabel() + { + countLbl.Text = records.Where(x => x.Number > 0).Count().ToString(); + numberLbl.Text = records.Sum(x => x.Number).ToString(); + hotNumLbl.Text = list.Sum(x => x.HotFadeNumber).ToString(); + } + + private void BindGrid()//onload、query、finish + { + list = HotPickBL.GetSecondOrderList(date).OrderBy(x => x.Order).OrderBy(x => x.Finish).ToList(); + orderGrid.DataSource = list; + + current = list.FirstOrDefault(); + foreach (DataGridViewRow row in orderGrid.Rows) + { + if ((bool)row.Cells["L_Finish"].Value) + row.Cells[orderGrid.Columns.Count - 1] = new DataGridViewTextBoxCell(); + } + orderGrid.Refresh(); + orderLbl.Text = current == null ? "0" : current.Order.ToString(); + RefreshRecordGrid(); + } + + private void FillNumberPad() + { + for (var i = 1; i < 10; i++) + CreateBtn(i.ToString()); + } + + void CreateBtn(string content) + { + var btn = new NButton() { Width = 100, Height = 60, Text = content, Font = new Font("宋体", 15), Margin = new Padding(18, 10, 18, 20), PlaySound = true }; + btn.Click += NumberBtnClick; + numPad.Controls.Add(btn); + } + + private void NumberBtnClick(object sender, EventArgs e) + { + if (current == null) + { + NMessageBox.ShowDialog("没有待处理的数据"); + return; + } + var number = int.Parse((sender as NButton).Text); + var cell = recordGrid.CurrentCell; + if (cell.Value == null && number == 0) + return; + var idx = cell.RowIndex * 5 + cell.ColumnIndex; + var detail = new HotPick_Detail(); + if (idx > records.Count - 1) + { + if (cell.RowIndex != records.Count / 5 || cell.ColumnIndex != records.Count % 5) + cell = recordGrid.Rows[records.Count / 5].Cells[records.Count % 5]; + detail.SecondOrder_ID = current.ID; + detail.Number = number; + records.Add(detail); + } + else + { + detail = records[idx]; + detail.Number = number; + } + HotPickBL.Insert(detail, current); + cell.Value = number; + var row = records.Count % 5; + if (records[records.Count - 1].Number == null) + row -= 1; + if (records.Count % 5 == 0) + { + records.Add(new HotPick_Detail() { SecondOrder_ID = current.ID }); + row = 0; + BindRecorGrid(); + } + recordGrid.Rows[records.Count / 5].Cells[row].Selected = true; + var v = records.Sum(x => x.Number ?? 0); + orderGrid.CurrentRow.Cells["L_HotFadeNumber"].Value = v; + current.HotFadeNumber = v; + BindLabel(); + } + + void BindRecorGrid() + { + recordGrid.DataSource = EntityExpand.Build(records); + recordGrid.Refresh(); + } + + private void colseBtn_Click(object sender, EventArgs e) + { + Close(); + } + + private void orderGrid_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex < 0) + return; + var id = (long)orderGrid.CurrentRow.Cells[1].Value; + if (id == current.OrderDetail_ID) + return; + current = list.First(x => x.OrderDetail_ID == id); + orderLbl.Text = current.Order.ToString(); + RefreshRecordGrid(); + } + + private void orderGrid_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex != orderGrid.Columns.Count - 1 || e.RowIndex == -1) + return; + HotPickBL.SetFinish(current); + BindGrid(); + } + + private void datePicker_MouseDown(object sender, MouseEventArgs e) + { + var cs = new CalendarSelecter(); + if (cs.ShowDialog() == true) + { + date = cs.Result; + datePicker.Text = date.ToString("yyyy-MM-dd"); + } + } + + private void queryBtn_Click(object sender, EventArgs e) + { + BindGrid(); + } + + private void orderGrid_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + DataGridViewRow dgrSingle = orderGrid.Rows[e.RowIndex]; + var v = (bool)dgrSingle.Cells["L_Finish"].Value; + if (v) + dgrSingle.DefaultCellStyle.BackColor = Color.YellowGreen; + } + } +} diff --git a/ButcherManage.Form/HotPickSelector_/HotPickSelector.resx b/ButcherManage.Form/HotPickSelector_/HotPickSelector.resx new file mode 100644 index 0000000..703eb89 --- /dev/null +++ b/ButcherManage.Form/HotPickSelector_/HotPickSelector.resx @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.Designer.cs b/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.Designer.cs new file mode 100644 index 0000000..5b89674 --- /dev/null +++ b/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.Designer.cs @@ -0,0 +1,629 @@ +namespace ButcherManage.OrderConfirm_ +{ + partial class OrderConfirmForm + { + /// + /// 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 dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + this.queryBtn = new WinFormControl.NButton(); + this.datePicker = new System.Windows.Forms.TextBox(); + this.colseBtn = new WinFormControl.NButton(); + this.uTimerLabel1 = new WinFormControl.UTimerLabel(); + this.uLabel1 = new WinFormControl.ULabel(); + this.numPad = new System.Windows.Forms.FlowLayoutPanel(); + this.R_C5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.R_C1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.recordGrid = new WinFormControl.UDataGridView(); + this.countLbl = new WinFormControl.ULabel(); + this.uLabel3 = new WinFormControl.ULabel(); + this.uLabel2 = new WinFormControl.ULabel(); + this.numberLbl = new WinFormControl.ULabel(); + this.zeroBtn = new WinFormControl.NButton(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.orderGrid = new WinFormControl.UDataGridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.finishNumberLabel = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.setTop = new System.Windows.Forms.CheckBox(); + this.orderLabel = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.L_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_OrderState = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_IsHurryButcher = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_SecondarySplit = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_ConfirmNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_Start = new System.Windows.Forms.DataGridViewButtonColumn(); + this.L_End = new System.Windows.Forms.DataGridViewButtonColumn(); + ((System.ComponentModel.ISupportInitialize)(this.recordGrid)).BeginInit(); + this.panel3.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).BeginInit(); + this.panel1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.SuspendLayout(); + // + // queryBtn + // + this.queryBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.queryBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.queryBtn.Font = new System.Drawing.Font("宋体", 12F); + this.queryBtn.ForeColor = System.Drawing.Color.White; + this.queryBtn.Location = new System.Drawing.Point(283, 16); + this.queryBtn.Name = "queryBtn"; + this.queryBtn.PlaySound = false; + this.queryBtn.Size = new System.Drawing.Size(113, 45); + this.queryBtn.SoundType = WinFormControl.SoundType.Click; + this.queryBtn.TabIndex = 16; + this.queryBtn.Text = "查 询"; + this.queryBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.queryBtn.UseVisualStyleBackColor = false; + this.queryBtn.Click += new System.EventHandler(this.queryBtn_Click); + // + // datePicker + // + this.datePicker.Font = new System.Drawing.Font("宋体", 15F); + this.datePicker.Location = new System.Drawing.Point(121, 24); + this.datePicker.Name = "datePicker"; + this.datePicker.ReadOnly = true; + this.datePicker.Size = new System.Drawing.Size(156, 30); + this.datePicker.TabIndex = 14; + this.datePicker.MouseDown += new System.Windows.Forms.MouseEventHandler(this.datePicker_MouseDown); + // + // colseBtn + // + this.colseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.colseBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.colseBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.colseBtn.Font = new System.Drawing.Font("宋体", 12F); + this.colseBtn.ForeColor = System.Drawing.Color.White; + this.colseBtn.Location = new System.Drawing.Point(958, 16); + this.colseBtn.Name = "colseBtn"; + this.colseBtn.PlaySound = false; + this.colseBtn.Size = new System.Drawing.Size(113, 45); + this.colseBtn.SoundType = WinFormControl.SoundType.Click; + this.colseBtn.TabIndex = 13; + this.colseBtn.Text = "关 闭"; + this.colseBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.colseBtn.UseVisualStyleBackColor = false; + this.colseBtn.Click += new System.EventHandler(this.colseBtn_Click); + // + // uTimerLabel1 + // + this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uTimerLabel1.AutoSize = true; + this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; + this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 13F); + this.uTimerLabel1.Format = "M月d日 H:mm:ss"; + this.uTimerLabel1.Location = new System.Drawing.Point(803, 29); + this.uTimerLabel1.Name = "uTimerLabel1"; + this.uTimerLabel1.Size = new System.Drawing.Size(152, 18); + this.uTimerLabel1.TabIndex = 10; + this.uTimerLabel1.Text = "6月13日 21:39:23"; + // + // 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(12, 29); + this.uLabel1.Name = "uLabel1"; + this.uLabel1.Size = new System.Drawing.Size(109, 20); + this.uLabel1.TabIndex = 15; + this.uLabel1.Text = "宰杀日期:"; + // + // numPad + // + this.numPad.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.numPad.Location = new System.Drawing.Point(-1, 220); + this.numPad.Name = "numPad"; + this.numPad.Size = new System.Drawing.Size(421, 278); + this.numPad.TabIndex = 0; + // + // R_C5 + // + this.R_C5.DataPropertyName = "Number5"; + this.R_C5.HeaderText = "列5"; + this.R_C5.Name = "R_C5"; + this.R_C5.ReadOnly = true; + this.R_C5.Width = 80; + // + // R_C4 + // + this.R_C4.DataPropertyName = "Number4"; + this.R_C4.HeaderText = "列4"; + this.R_C4.Name = "R_C4"; + this.R_C4.ReadOnly = true; + this.R_C4.Width = 80; + // + // R_C3 + // + this.R_C3.DataPropertyName = "Number3"; + this.R_C3.HeaderText = "列3"; + this.R_C3.Name = "R_C3"; + this.R_C3.ReadOnly = true; + this.R_C3.Width = 80; + // + // R_C2 + // + this.R_C2.DataPropertyName = "Number2"; + this.R_C2.HeaderText = "列2"; + this.R_C2.Name = "R_C2"; + this.R_C2.ReadOnly = true; + this.R_C2.Width = 80; + // + // R_C1 + // + this.R_C1.DataPropertyName = "Number1"; + this.R_C1.HeaderText = "列1"; + this.R_C1.Name = "R_C1"; + this.R_C1.ReadOnly = true; + this.R_C1.Width = 80; + // + // recordGrid + // + this.recordGrid.AllowUserToAddRows = false; + this.recordGrid.AllowUserToDeleteRows = false; + this.recordGrid.AllowUserToResizeColumns = false; + this.recordGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.recordGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.recordGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.recordGrid.BackgroundColor = System.Drawing.Color.White; + this.recordGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.recordGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.recordGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.recordGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.R_C1, + this.R_C2, + this.R_C3, + this.R_C4, + this.R_C5}); + this.recordGrid.Location = new System.Drawing.Point(-1, -1); + this.recordGrid.MultiSelect = false; + this.recordGrid.Name = "recordGrid"; + this.recordGrid.ReadOnly = true; + this.recordGrid.RowHeadersVisible = false; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15F); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.recordGrid.RowsDefaultCellStyle = dataGridViewCellStyle3; + this.recordGrid.RowTemplate.Height = 50; + this.recordGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.recordGrid.Size = new System.Drawing.Size(421, 153); + this.recordGrid.TabIndex = 1; + // + // countLbl + // + this.countLbl.AutoSize = true; + this.countLbl.BackColor = System.Drawing.Color.Transparent; + this.countLbl.Font = new System.Drawing.Font("宋体", 15F); + this.countLbl.ForeColor = System.Drawing.Color.Red; + this.countLbl.Location = new System.Drawing.Point(14, 9); + this.countLbl.Name = "countLbl"; + this.countLbl.Size = new System.Drawing.Size(19, 20); + this.countLbl.TabIndex = 2; + this.countLbl.Text = "0"; + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.Transparent; + this.uLabel3.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel3.ForeColor = System.Drawing.Color.Red; + this.uLabel3.Location = new System.Drawing.Point(200, 9); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(29, 20); + this.uLabel3.TabIndex = 5; + this.uLabel3.Text = "头"; + // + // uLabel2 + // + this.uLabel2.AutoSize = true; + this.uLabel2.BackColor = System.Drawing.Color.Transparent; + this.uLabel2.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel2.ForeColor = System.Drawing.Color.Red; + this.uLabel2.Location = new System.Drawing.Point(55, 9); + this.uLabel2.Name = "uLabel2"; + this.uLabel2.Size = new System.Drawing.Size(29, 20); + this.uLabel2.TabIndex = 3; + this.uLabel2.Text = "次"; + // + // numberLbl + // + this.numberLbl.AutoSize = true; + this.numberLbl.BackColor = System.Drawing.Color.Transparent; + this.numberLbl.Font = new System.Drawing.Font("宋体", 15F); + this.numberLbl.ForeColor = System.Drawing.Color.Red; + this.numberLbl.Location = new System.Drawing.Point(159, 9); + this.numberLbl.Name = "numberLbl"; + this.numberLbl.Size = new System.Drawing.Size(19, 20); + this.numberLbl.TabIndex = 4; + this.numberLbl.Text = "0"; + // + // zeroBtn + // + this.zeroBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.zeroBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.zeroBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.zeroBtn.Font = new System.Drawing.Font("宋体", 15F); + this.zeroBtn.ForeColor = System.Drawing.Color.White; + this.zeroBtn.Location = new System.Drawing.Point(17, 157); + this.zeroBtn.Name = "zeroBtn"; + this.zeroBtn.PlaySound = true; + this.zeroBtn.Size = new System.Drawing.Size(100, 60); + this.zeroBtn.SoundType = WinFormControl.SoundType.Click; + this.zeroBtn.TabIndex = 7; + this.zeroBtn.Text = "0"; + this.zeroBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.zeroBtn.UseVisualStyleBackColor = false; + this.zeroBtn.Click += new System.EventHandler(this.NumberBtnClick); + // + // panel3 + // + this.panel3.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.panel3.Controls.Add(this.countLbl); + this.panel3.Controls.Add(this.uLabel3); + this.panel3.Controls.Add(this.uLabel2); + this.panel3.Controls.Add(this.numberLbl); + this.panel3.Location = new System.Drawing.Point(157, 158); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(239, 38); + this.panel3.TabIndex = 6; + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel2.Controls.Add(this.zeroBtn); + this.panel2.Controls.Add(this.panel3); + this.panel2.Controls.Add(this.recordGrid); + this.panel2.Controls.Add(this.numPad); + this.panel2.Location = new System.Drawing.Point(650, 72); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(421, 503); + this.panel2.TabIndex = 12; + // + // orderGrid + // + this.orderGrid.AllowUserToAddRows = false; + this.orderGrid.AllowUserToDeleteRows = false; + this.orderGrid.AllowUserToResizeColumns = false; + this.orderGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + this.orderGrid.BackgroundColor = System.Drawing.Color.White; + this.orderGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + this.orderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.orderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.L_ID, + this.L_OrderState, + this.L_IsHurryButcher, + this.L_SecondarySplit, + this.L_Order, + this.L_B3WeighBill_ID, + this.L_LiveColonyHouse_Name, + this.L_PlanNumber, + this.L_ConfirmNumber, + this.L_Start, + this.L_End}); + this.orderGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.orderGrid.Location = new System.Drawing.Point(0, 0); + this.orderGrid.MultiSelect = false; + this.orderGrid.Name = "orderGrid"; + this.orderGrid.ReadOnly = true; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.RowHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.orderGrid.RowHeadersVisible = false; + dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 15F); + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle9; + this.orderGrid.RowTemplate.Height = 80; + this.orderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.orderGrid.Size = new System.Drawing.Size(618, 501); + this.orderGrid.TabIndex = 2; + this.orderGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellClick); + this.orderGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellContentClick); + this.orderGrid.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.orderGrid_RowPrePaint); + // + // panel1 + // + this.panel1.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.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.orderGrid); + this.panel1.Location = new System.Drawing.Point(12, 72); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(620, 503); + this.panel1.TabIndex = 11; + // + // panel4 + // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel4.Controls.Add(this.finishNumberLabel); + this.panel4.Controls.Add(this.label4); + this.panel4.Controls.Add(this.setTop); + this.panel4.Controls.Add(this.orderLabel); + this.panel4.Controls.Add(this.label2); + this.panel4.Location = new System.Drawing.Point(402, 12); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(395, 56); + this.panel4.TabIndex = 19; + // + // finishNumberLabel + // + this.finishNumberLabel.AutoSize = true; + this.finishNumberLabel.Font = new System.Drawing.Font("宋体", 23F); + this.finishNumberLabel.ForeColor = System.Drawing.Color.Red; + this.finishNumberLabel.Location = new System.Drawing.Point(224, 12); + this.finishNumberLabel.Name = "finishNumberLabel"; + this.finishNumberLabel.Size = new System.Drawing.Size(30, 31); + this.finishNumberLabel.TabIndex = 66; + this.finishNumberLabel.Text = "0"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("宋体", 15F); + this.label4.Location = new System.Drawing.Point(126, 18); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(109, 20); + this.label4.TabIndex = 65; + this.label4.Text = "已杀头数:"; + // + // setTop + // + this.setTop.AutoSize = true; + this.setTop.Font = new System.Drawing.Font("宋体", 15F); + this.setTop.Location = new System.Drawing.Point(307, 16); + this.setTop.Name = "setTop"; + this.setTop.Size = new System.Drawing.Size(68, 24); + this.setTop.TabIndex = 64; + this.setTop.Text = "置顶"; + this.setTop.UseVisualStyleBackColor = true; + // + // orderLabel + // + this.orderLabel.AutoSize = true; + this.orderLabel.Font = new System.Drawing.Font("宋体", 23F); + this.orderLabel.ForeColor = System.Drawing.Color.Red; + this.orderLabel.Location = new System.Drawing.Point(63, 10); + this.orderLabel.Name = "orderLabel"; + this.orderLabel.Size = new System.Drawing.Size(30, 31); + this.orderLabel.TabIndex = 63; + this.orderLabel.Text = "0"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 15F); + this.label2.Location = new System.Drawing.Point(5, 18); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(69, 20); + this.label2.TabIndex = 62; + this.label2.Text = "顺序:"; + // + // L_ID + // + this.L_ID.DataPropertyName = "ID"; + this.L_ID.HeaderText = "ID"; + this.L_ID.Name = "L_ID"; + this.L_ID.ReadOnly = true; + this.L_ID.Visible = false; + // + // L_OrderState + // + this.L_OrderState.DataPropertyName = "OrderState"; + this.L_OrderState.HeaderText = "OrderState"; + this.L_OrderState.Name = "L_OrderState"; + this.L_OrderState.ReadOnly = true; + this.L_OrderState.Visible = false; + // + // L_IsHurryButcher + // + this.L_IsHurryButcher.DataPropertyName = "IsHurryButcher"; + this.L_IsHurryButcher.HeaderText = "IsHurryButcher"; + this.L_IsHurryButcher.Name = "L_IsHurryButcher"; + this.L_IsHurryButcher.ReadOnly = true; + this.L_IsHurryButcher.Visible = false; + // + // L_SecondarySplit + // + this.L_SecondarySplit.DataPropertyName = "SecondarySplit"; + this.L_SecondarySplit.HeaderText = "SecondarySplit"; + this.L_SecondarySplit.Name = "L_SecondarySplit"; + this.L_SecondarySplit.ReadOnly = true; + this.L_SecondarySplit.Visible = false; + // + // L_Order + // + this.L_Order.DataPropertyName = "Order"; + this.L_Order.HeaderText = "顺序"; + this.L_Order.Name = "L_Order"; + this.L_Order.ReadOnly = true; + this.L_Order.Width = 80; + // + // L_B3WeighBill_ID + // + this.L_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID"; + this.L_B3WeighBill_ID.HeaderText = "磅单号"; + this.L_B3WeighBill_ID.Name = "L_B3WeighBill_ID"; + this.L_B3WeighBill_ID.ReadOnly = true; + // + // L_LiveColonyHouse_Name + // + this.L_LiveColonyHouse_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.L_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name"; + this.L_LiveColonyHouse_Name.HeaderText = "圈舍"; + this.L_LiveColonyHouse_Name.MinimumWidth = 200; + this.L_LiveColonyHouse_Name.Name = "L_LiveColonyHouse_Name"; + this.L_LiveColonyHouse_Name.ReadOnly = true; + // + // L_PlanNumber + // + this.L_PlanNumber.DataPropertyName = "PlanNumber"; + this.L_PlanNumber.HeaderText = "排宰头数"; + this.L_PlanNumber.Name = "L_PlanNumber"; + this.L_PlanNumber.ReadOnly = true; + // + // L_ConfirmNumber + // + this.L_ConfirmNumber.DataPropertyName = "ConfirmNumber"; + this.L_ConfirmNumber.HeaderText = "确认头数"; + this.L_ConfirmNumber.Name = "L_ConfirmNumber"; + this.L_ConfirmNumber.ReadOnly = true; + // + // L_Start + // + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.L_Start.DefaultCellStyle = dataGridViewCellStyle6; + this.L_Start.HeaderText = "开始"; + this.L_Start.Name = "L_Start"; + this.L_Start.ReadOnly = true; + this.L_Start.Text = "开始"; + this.L_Start.Width = 140; + // + // L_End + // + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.L_End.DefaultCellStyle = dataGridViewCellStyle7; + this.L_End.HeaderText = "结束"; + this.L_End.Name = "L_End"; + this.L_End.ReadOnly = true; + this.L_End.Text = "结束"; + this.L_End.UseColumnTextForButtonValue = true; + this.L_End.Width = 140; + // + // OrderConfirmForm + // + 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(1083, 591); + this.Controls.Add(this.panel4); + this.Controls.Add(this.queryBtn); + this.Controls.Add(this.datePicker); + this.Controls.Add(this.colseBtn); + this.Controls.Add(this.uTimerLabel1); + this.Controls.Add(this.uLabel1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.ImeMode = System.Windows.Forms.ImeMode.Disable; + this.KeyPreview = true; + this.Name = "OrderConfirmForm"; + this.Text = "上线确认"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.OrderConfirmForm_KeyPress); + ((System.ComponentModel.ISupportInitialize)(this.recordGrid)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private WinFormControl.NButton queryBtn; + private System.Windows.Forms.TextBox datePicker; + private WinFormControl.NButton colseBtn; + private WinFormControl.UTimerLabel uTimerLabel1; + private WinFormControl.ULabel uLabel1; + private System.Windows.Forms.FlowLayoutPanel numPad; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C5; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C4; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C3; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C2; + private System.Windows.Forms.DataGridViewTextBoxColumn R_C1; + private WinFormControl.UDataGridView recordGrid; + private WinFormControl.ULabel countLbl; + private WinFormControl.ULabel uLabel3; + private WinFormControl.ULabel uLabel2; + private WinFormControl.ULabel numberLbl; + private WinFormControl.NButton zeroBtn; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel2; + private WinFormControl.UDataGridView orderGrid; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label finishNumberLabel; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox setTop; + private System.Windows.Forms.Label orderLabel; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.DataGridViewTextBoxColumn L_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn L_OrderState; + private System.Windows.Forms.DataGridViewTextBoxColumn L_IsHurryButcher; + private System.Windows.Forms.DataGridViewTextBoxColumn L_SecondarySplit; + private System.Windows.Forms.DataGridViewTextBoxColumn L_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn L_B3WeighBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn L_LiveColonyHouse_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn L_PlanNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn L_ConfirmNumber; + private System.Windows.Forms.DataGridViewButtonColumn L_Start; + private System.Windows.Forms.DataGridViewButtonColumn L_End; + } +} \ No newline at end of file diff --git a/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.cs b/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.cs new file mode 100644 index 0000000..f8ffdb7 --- /dev/null +++ b/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.cs @@ -0,0 +1,285 @@ +using ButcherManage.BO; +using ButcherManage.BO.Bill; +using ButcherManage.BO.Enums; +using ButcherManage.BO.LocalBL; +using ButcherManage.BO.Utils; +using ButcherManage.Dialogs; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WinFormControl; + +namespace ButcherManage.OrderConfirm_ +{ + public partial class OrderConfirmForm : Form, IWithRoleForm + { + #region IWithRoleForm + public List RoleName + { + get { return new List { (short)设备类别.上线确认 }; } + } + + public Form Generate() + { + return this; + } + #endregion + + IList list; + List records; + DateTime date = DateTime.Today; + OrderDetail current; + + public OrderConfirmForm() + { + InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + datePicker.Text = date.ToString("yyyy-MM-dd"); + BindGrid(); + FillNumberPad(); + } + + void RefreshRecordGrid() + { + if (current == null) + return; + records = OrderConfirmBL.GetRecords(current.ID); + var row = records.Count % 5; + if (records.Count % 5 == 0) + { + records.Add(new OrderConfirmDetail() { OrderDetail_ID = current.ID }); + row = 0; + } + BindRecorGrid(); + BindLabel(); + recordGrid.Rows[records.Count / 5].Cells[row].Selected = true; + } + + void BindLabel() + { + countLbl.Text = records.Where(x => x.Number > 0).Count().ToString(); + numberLbl.Text = records.Sum(x => x.Number).ToString(); + } + + private void BindGrid() + { + list = OrderConfirmBL.GetOrderDetail(date).OrderBy(x => x.Order).OrderBy(x => x.Doing).ToList(); + orderGrid.DataSource = list; + + current = list.FirstOrDefault(); + foreach (DataGridViewRow row in orderGrid.Rows) + { + var state = (int)row.Cells["L_OrderState"].Value; + if (state == 20) + { + row.Cells[orderGrid.Columns.Count - 1] = new DataGridViewTextBoxCell(); + row.Cells[orderGrid.Columns.Count - 2] = new DataGridViewTextBoxCell(); + } + else + { + row.Cells[orderGrid.Columns.Count - 2].Value = state == 0 ? "开始" : "取消"; + if (state == 10) + { + var btnCell = ((DataGridViewButtonCell)row.Cells[orderGrid.Columns.Count - 2]); + btnCell.Style.BackColor = Color.LightSkyBlue; + btnCell.Style.SelectionBackColor = Color.LightSkyBlue; + } + } + } + orderGrid.Refresh(); + orderLabel.Text = current == null ? "0" : current.Order.ToString(); + finishNumberLabel.Text = list.Where(x => x.OrderState == 20).Sum(x => x.PlanNumber).ToString(); + RefreshRecordGrid(); + } + + private void FillNumberPad() + { + for (var i = 1; i < 10; i++) + CreateBtn(i.ToString()); + } + + void CreateBtn(string content) + { + var btn = new NButton() { Width = 100, Height = 60, Text = content, Font = new Font("宋体", 15), Margin = new Padding(18, 10, 18, 20), PlaySound = true }; + btn.Click += NumberBtnClick; + numPad.Controls.Add(btn); + } + + private void NumberBtnClick(object sender, EventArgs e) + { + if (current == null) + { + NMessageBox.ShowDialog("没有待处理的数据"); + return; + } + var number = int.Parse((sender as NButton).Text); + var cell = recordGrid.CurrentCell; + if (cell.Value == null && number == 0) + return; + var idx = cell.RowIndex * 5 + cell.ColumnIndex; + var detail = new OrderConfirmDetail(); + if (idx > records.Count - 1) + { + if (cell.RowIndex != records.Count / 5 || cell.ColumnIndex != records.Count % 5) + cell = recordGrid.Rows[records.Count / 5].Cells[records.Count % 5]; + detail.OrderDetail_ID = current.ID; + detail.Number = number; + records.Add(detail); + } + else + { + detail = records[idx]; + detail.Number = number; + } + OrderConfirmBL.SaveRecord(detail); + cell.Value = number; + var row = records.Count % 5; + if (records[records.Count - 1].Number == null) + row -= 1; + if (records.Count % 5 == 0) + { + records.Add(new OrderConfirmDetail() { OrderDetail_ID = current.ID }); + row = 0; + BindRecorGrid(); + } + recordGrid.Rows[records.Count / 5].Cells[row].Selected = true; + var v = records.Sum(x => x.Number ?? 0); + orderGrid.CurrentRow.Cells["L_ConfirmNumber"].Value = v; + current.ConfirmNumber = v; + BindLabel(); + } + + void BindRecorGrid() + { + recordGrid.DataSource = EntityExpand.Build(records); + recordGrid.Refresh(); + } + + private void colseBtn_Click(object sender, EventArgs e) + { + Close(); + } + + private void orderGrid_CellClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex < 0) + return; + var id = (long)orderGrid.CurrentRow.Cells[0].Value; + if (id == current.ID) + return; + current = list.First(x => x.ID == id); + orderLabel.Text = current.Order.ToString(); + RefreshRecordGrid(); + } + + private void orderGrid_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < orderGrid.Columns.Count - 2 || e.RowIndex == -1) + return; + if (e.ColumnIndex == orderGrid.Columns.Count - 1) + OrderConfirmBL.SetOrderState(current.ID, 20); + else + { + OrderConfirmBL.SetOrderState(current.ID, current.OrderState == 0 ? 10 : 0); + finishNumberLabel.Text = list.Where(x => x.OrderState == 20).Sum(x => x.PlanNumber).ToString(); + } + BindGrid(); + } + + private void datePicker_MouseDown(object sender, MouseEventArgs e) + { + var cs = new CalendarSelecter(); + if (cs.ShowDialog() == true) + { + date = cs.Result; + datePicker.Text = date.ToString("yyyy-MM-dd"); + } + } + + private void queryBtn_Click(object sender, EventArgs e) + { + BindGrid(); + } + + private void orderGrid_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + DataGridViewRow dgrSingle = orderGrid.Rows[e.RowIndex]; + if ((bool)dgrSingle.Cells["L_SecondarySplit"].Value) + dgrSingle.DefaultCellStyle.BackColor = Color.YellowGreen; + else if ((bool)dgrSingle.Cells["L_IsHurryButcher"].Value) + dgrSingle.DefaultCellStyle.BackColor = Color.LightBlue; + } + + string code = string.Empty; + bool start = false; + private void OrderConfirmForm_KeyPress(object sender, KeyPressEventArgs e) + { + switch (e.KeyChar) + { + case (char)Keys.S: + start = true; + code = string.Empty; + break; + case (char)Keys.E: + if (!start) + break; + InsertDetail(); + start = false; + code = string.Empty; + break; + default: + if (start) + code += e.KeyChar.ToString(); + break; + } + } + + void InsertDetail() + { + long id = 0; + if (!long.TryParse(code, out id)) + throw new Exception(string.Format("接收扫码输入错误 {0}", code)); + var entity = OrderConfirmBL.GetHurryRecord(id); + if (entity.ToOrderDetail_ID.HasValue) + throw new Exception("该条码已插入过,不能重复插入"); + var currentOrder = 0; + if (!setTop.Checked) + { + if (current != null) + currentOrder = OrderConfirmBL.GetCurrentOrder(current.ID); + else + currentOrder = OrderConfirmBL.GetMaxOrder(date); + currentOrder++; + } + else + { + setTop.Checked = false; + var l = list.OrderBy(x => x.Order).OrderBy(x => x.Doing).FirstOrDefault(); + if (l != null) + currentOrder = l.Order; + else + currentOrder = 1; + } + var order = new OrderDetail(); + order.Order = currentOrder; + order.LiveColonyHouse_Name = entity.LiveColonyHouse_Name; + order.PlanNumber = entity.HurryNumber; + order.WeightBill_ID = entity.WeightBill_ID; + order.B3WeighBill_ID = entity.B3WeighBill_ID; + order.Date = date; + order.IsHurryButcher = true; + OrderConfirmBL.InsertByHurryRecord(order, id); + BindGrid(); + } + } +} diff --git a/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.resx b/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.resx new file mode 100644 index 0000000..6781870 --- /dev/null +++ b/ButcherManage.Form/OrderConfirm_/OrderConfirmForm.resx @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.Designer.cs b/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.Designer.cs index be9a308..f7cc676 100644 --- a/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.Designer.cs +++ b/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.Designer.cs @@ -28,25 +28,17 @@ /// 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 dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = 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 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.orderGrid = new WinFormControl.UDataGridView(); - this.L_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.L_ConfirmState = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.L_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.L_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.L_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.L_AlreadyNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.L_Start = new System.Windows.Forms.DataGridViewButtonColumn(); - this.L_End = new System.Windows.Forms.DataGridViewButtonColumn(); this.panel2 = new System.Windows.Forms.Panel(); this.zeroBtn = new WinFormControl.NButton(); this.panel3 = new System.Windows.Forms.Panel(); @@ -68,6 +60,14 @@ this.queryBtn = new WinFormControl.NButton(); this.uLabel4 = new WinFormControl.ULabel(); this.orderLbl = new WinFormControl.ULabel(); + this.L_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_ConfirmState = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_AlreadyNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.L_Start = new System.Windows.Forms.DataGridViewButtonColumn(); + this.L_End = new System.Windows.Forms.DataGridViewButtonColumn(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.orderGrid)).BeginInit(); this.panel2.SuspendLayout(); @@ -93,15 +93,15 @@ this.orderGrid.AllowUserToDeleteRows = false; this.orderGrid.AllowUserToResizeColumns = false; this.orderGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.orderGrid.BackgroundColor = System.Drawing.Color.White; this.orderGrid.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.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.orderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.L_ID, @@ -117,18 +117,18 @@ this.orderGrid.MultiSelect = false; this.orderGrid.Name = "orderGrid"; this.orderGrid.ReadOnly = true; - dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.orderGrid.RowHeadersDefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.RowHeadersDefaultCellStyle = dataGridViewCellStyle5; this.orderGrid.RowHeadersVisible = false; - dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 15F); - dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle15; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 15F); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; this.orderGrid.RowTemplate.Height = 80; this.orderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGrid.Size = new System.Drawing.Size(557, 501); @@ -137,77 +137,6 @@ this.orderGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellContentClick); this.orderGrid.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.orderGrid_RowPrePaint); // - // L_ID - // - this.L_ID.DataPropertyName = "ID"; - this.L_ID.HeaderText = "ID"; - this.L_ID.Name = "L_ID"; - this.L_ID.ReadOnly = true; - this.L_ID.Visible = false; - // - // L_ConfirmState - // - this.L_ConfirmState.DataPropertyName = "ConfirmState"; - this.L_ConfirmState.HeaderText = "ConfirmState"; - this.L_ConfirmState.Name = "L_ConfirmState"; - this.L_ConfirmState.ReadOnly = true; - this.L_ConfirmState.Visible = false; - // - // L_Order - // - this.L_Order.DataPropertyName = "Order"; - this.L_Order.HeaderText = "顺序"; - this.L_Order.Name = "L_Order"; - this.L_Order.ReadOnly = true; - // - // L_PlanNumber - // - this.L_PlanNumber.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; - this.L_PlanNumber.DataPropertyName = "PlanNumber"; - this.L_PlanNumber.HeaderText = "排宰头数"; - this.L_PlanNumber.Name = "L_PlanNumber"; - this.L_PlanNumber.ReadOnly = true; - // - // L_LiveColonyHouse_Name - // - this.L_LiveColonyHouse_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.L_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name"; - this.L_LiveColonyHouse_Name.HeaderText = "圈舍"; - this.L_LiveColonyHouse_Name.MinimumWidth = 200; - this.L_LiveColonyHouse_Name.Name = "L_LiveColonyHouse_Name"; - this.L_LiveColonyHouse_Name.ReadOnly = true; - // - // L_AlreadyNumber - // - this.L_AlreadyNumber.DataPropertyName = "AlreadyNumber"; - this.L_AlreadyNumber.HeaderText = "确认头数"; - this.L_AlreadyNumber.Name = "L_AlreadyNumber"; - this.L_AlreadyNumber.ReadOnly = true; - // - // L_Start - // - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle12.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); - this.L_Start.DefaultCellStyle = dataGridViewCellStyle12; - this.L_Start.HeaderText = "开始"; - this.L_Start.Name = "L_Start"; - this.L_Start.ReadOnly = true; - this.L_Start.Text = "开始"; - this.L_Start.UseColumnTextForButtonValue = true; - this.L_Start.Width = 140; - // - // L_End - // - dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle13.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); - this.L_End.DefaultCellStyle = dataGridViewCellStyle13; - this.L_End.HeaderText = "结束"; - this.L_End.Name = "L_End"; - this.L_End.ReadOnly = true; - this.L_End.Text = "结束"; - this.L_End.UseColumnTextForButtonValue = true; - this.L_End.Width = 140; - // // panel2 // this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -306,16 +235,16 @@ this.recordGrid.AllowUserToDeleteRows = false; this.recordGrid.AllowUserToResizeColumns = false; this.recordGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.recordGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.recordGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; this.recordGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); this.recordGrid.BackgroundColor = System.Drawing.Color.White; this.recordGrid.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.recordGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.recordGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; this.recordGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.recordGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.R_C1, @@ -328,9 +257,9 @@ this.recordGrid.Name = "recordGrid"; this.recordGrid.ReadOnly = true; this.recordGrid.RowHeadersVisible = false; - dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 15F); - dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.recordGrid.RowsDefaultCellStyle = dataGridViewCellStyle18; + dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 15F); + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.recordGrid.RowsDefaultCellStyle = dataGridViewCellStyle9; this.recordGrid.RowTemplate.Height = 50; this.recordGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; this.recordGrid.Size = new System.Drawing.Size(421, 153); @@ -413,7 +342,7 @@ this.uTimerLabel1.Name = "uTimerLabel1"; this.uTimerLabel1.Size = new System.Drawing.Size(152, 18); this.uTimerLabel1.TabIndex = 0; - this.uTimerLabel1.Text = "6月11日 15:37:03"; + this.uTimerLabel1.Text = "6月13日 16:44:14"; // // datePicker // @@ -477,6 +406,76 @@ this.orderLbl.TabIndex = 9; this.orderLbl.Text = "0"; // + // L_ID + // + this.L_ID.DataPropertyName = "ID"; + this.L_ID.HeaderText = "ID"; + this.L_ID.Name = "L_ID"; + this.L_ID.ReadOnly = true; + this.L_ID.Visible = false; + // + // L_ConfirmState + // + this.L_ConfirmState.DataPropertyName = "ConfirmState"; + this.L_ConfirmState.HeaderText = "ConfirmState"; + this.L_ConfirmState.Name = "L_ConfirmState"; + this.L_ConfirmState.ReadOnly = true; + this.L_ConfirmState.Visible = false; + // + // L_Order + // + this.L_Order.DataPropertyName = "Order"; + this.L_Order.HeaderText = "顺序"; + this.L_Order.Name = "L_Order"; + this.L_Order.ReadOnly = true; + // + // L_PlanNumber + // + this.L_PlanNumber.DataPropertyName = "PlanNumber"; + this.L_PlanNumber.HeaderText = "排宰头数"; + this.L_PlanNumber.Name = "L_PlanNumber"; + this.L_PlanNumber.ReadOnly = true; + // + // L_LiveColonyHouse_Name + // + this.L_LiveColonyHouse_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.L_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name"; + this.L_LiveColonyHouse_Name.HeaderText = "圈舍"; + this.L_LiveColonyHouse_Name.MinimumWidth = 200; + this.L_LiveColonyHouse_Name.Name = "L_LiveColonyHouse_Name"; + this.L_LiveColonyHouse_Name.ReadOnly = true; + // + // L_AlreadyNumber + // + this.L_AlreadyNumber.DataPropertyName = "AlreadyNumber"; + this.L_AlreadyNumber.HeaderText = "确认头数"; + this.L_AlreadyNumber.Name = "L_AlreadyNumber"; + this.L_AlreadyNumber.ReadOnly = true; + // + // L_Start + // + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.L_Start.DefaultCellStyle = dataGridViewCellStyle3; + this.L_Start.HeaderText = "开始"; + this.L_Start.Name = "L_Start"; + this.L_Start.ReadOnly = true; + this.L_Start.Text = "开始"; + this.L_Start.UseColumnTextForButtonValue = true; + this.L_Start.Width = 140; + // + // L_End + // + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.L_End.DefaultCellStyle = dataGridViewCellStyle4; + this.L_End.HeaderText = "结束"; + this.L_End.Name = "L_End"; + this.L_End.ReadOnly = true; + this.L_End.Text = "结束"; + this.L_End.UseColumnTextForButtonValue = true; + this.L_End.Width = 140; + // // PickOutConfirm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -529,6 +528,8 @@ private System.Windows.Forms.TextBox datePicker; private WinFormControl.ULabel uLabel1; private WinFormControl.NButton queryBtn; + private WinFormControl.ULabel uLabel4; + private WinFormControl.ULabel orderLbl; private System.Windows.Forms.DataGridViewTextBoxColumn L_ID; private System.Windows.Forms.DataGridViewTextBoxColumn L_ConfirmState; private System.Windows.Forms.DataGridViewTextBoxColumn L_Order; @@ -537,7 +538,5 @@ private System.Windows.Forms.DataGridViewTextBoxColumn L_AlreadyNumber; private System.Windows.Forms.DataGridViewButtonColumn L_Start; private System.Windows.Forms.DataGridViewButtonColumn L_End; - private WinFormControl.ULabel uLabel4; - private WinFormControl.ULabel orderLbl; } } \ No newline at end of file diff --git a/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.cs b/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.cs index 5c7a1d4..d0aff1a 100644 --- a/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.cs +++ b/ButcherManage.Form/PickOutConfirm_/PickOutConfirm.cs @@ -173,7 +173,7 @@ namespace ButcherManage.PickOutConfirm_ void BindRecorGrid() { - recordGrid.DataSource = Expand.Build(records); + recordGrid.DataSource = EntityExpand.Build(records); recordGrid.Refresh(); } @@ -241,36 +241,4 @@ namespace ButcherManage.PickOutConfirm_ dgrSingle.DefaultCellStyle.BackColor = Color.YellowGreen; } } - - class Expand - { - public int? Number1 { get; set; } - - public int? Number2 { get; set; } - - public int? Number3 { get; set; } - - public int? Number4 { get; set; } - - public int? Number5 { get; set; } - - public static List Build(List list) - { - var result = new List(); - var t = typeof(Expand); - for (var i = 0; i < list.Count; ) - { - var entity = new Expand(); - result.Add(entity); - for (var j = 1; j <= 5; j++) - { - t.GetProperty(string.Format("Number{0}", j)).SetValue(entity, list[i].Number); - i++; - if (i == list.Count) - break; - } - } - return result; - } - } } diff --git a/ButcherManage.Login/Login.xaml b/ButcherManage.Login/Login.xaml index cbedfe7..bf01399 100644 --- a/ButcherManage.Login/Login.xaml +++ b/ButcherManage.Login/Login.xaml @@ -16,7 +16,7 @@