diff --git a/BO/BO.csproj b/BO/BO.csproj index 21ceb9a..97a3412 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -72,6 +72,7 @@ + diff --git a/BO/BO/Bill/SecondOrder/SecondOrder.cs b/BO/BO/Bill/SecondOrder/SecondOrder.cs index 04b1c26..8306637 100644 --- a/BO/BO/Bill/SecondOrder/SecondOrder.cs +++ b/BO/BO/Bill/SecondOrder/SecondOrder.cs @@ -13,7 +13,7 @@ namespace BO.BO.Bill public int? Order { get; set; } - public new int? PlanNumber { get; set; } + public int? PlanNumber { get; set; } public int HotFadeNumber { get; set; } diff --git a/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs index e29b24e..42a9411 100644 --- a/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs +++ b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs @@ -18,5 +18,7 @@ namespace BO.BO public string Farmer_Name { get; set; } public int? Number { get; set; } + + public decimal? Weight { get; set; } } } diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 81aa178..98efbca 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -19,9 +19,9 @@ namespace BO.Utils public static class AfterLoginUtil { //#if debug - static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\B3Service\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), - new Tuple("过磅员",@"C:\B3Service\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), - new Tuple("验质员",@"C:\B3Service\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder")}; + static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), + new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), + new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder")}; //#endif //#if !debug // static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"ButcherOrder"), diff --git a/BO/Utils/BillRpc/OrderDetailRpc.cs b/BO/Utils/BillRpc/OrderDetailRpc.cs index 9e6a3c7..f890a97 100644 --- a/BO/Utils/BillRpc/OrderDetailRpc.cs +++ b/BO/Utils/BillRpc/OrderDetailRpc.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.Script.Serialization; +using BO.Utils; namespace BO.Utils.BillRpc { @@ -16,6 +17,7 @@ namespace BO.Utils.BillRpc { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetNeedOrderWeightBill"; var result = RpcFacade.Call(method, date); + result = result.ESerializeDateTime(); return serializer.Deserialize>(result); } @@ -23,6 +25,7 @@ namespace BO.Utils.BillRpc { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetBackWeightBillInfo"; var result = RpcFacade.Call(method, weightId, orerID); + result = result.ESerializeDateTime(); return serializer.Deserialize(result); } @@ -36,6 +39,7 @@ namespace BO.Utils.BillRpc { const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetOrderDetail"; var result = RpcFacade.Call(method); + result = result.ESerializeDateTime(); return serializer.Deserialize>(result); } diff --git a/BO/Utils/BillRpc/SecondOrderRpc.cs b/BO/Utils/BillRpc/SecondOrderRpc.cs index 97a4bee..f530abe 100644 --- a/BO/Utils/BillRpc/SecondOrderRpc.cs +++ b/BO/Utils/BillRpc/SecondOrderRpc.cs @@ -50,6 +50,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); } } diff --git a/BO/Utils/BillRpc/WeightBillRpc.cs b/BO/Utils/BillRpc/WeightBillRpc.cs index f2457c8..41a561b 100644 --- a/BO/Utils/BillRpc/WeightBillRpc.cs +++ b/BO/Utils/BillRpc/WeightBillRpc.cs @@ -89,6 +89,7 @@ namespace BO.Utils.BillRpc objDetail.Set("Farmer_ID", detail.Farmer_ID); objDetail.Set("Farmer_Name", detail.Farmer_Name); objDetail.Set("Number", detail.Number); + objDetail.Set("Weight", detail.Weight); farmerDetils.Add(objDetail); } diff --git a/BO/Utils/ConvertUtil.cs b/BO/Utils/ConvertUtil.cs new file mode 100644 index 0000000..84e0bc6 --- /dev/null +++ b/BO/Utils/ConvertUtil.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace BO.Utils +{ + public static class ConvertUtil + { + public static string ESerializeDateTime(this string json) + { + return Regex.Replace(json, @"\\/Date\((\d+)\)\\/", match => + { + DateTime dt = new DateTime(1970, 1, 1); + dt = dt.AddMilliseconds(long.Parse(match.Groups[1].Value)); + dt = dt.ToLocalTime(); + return dt.ToString("yyyy-MM-dd HH:mm:ss"); + }); + } + } +} diff --git a/ButcherWeight/WeightContext.cs b/ButcherWeight/WeightContext.cs index 71758d7..7a760b6 100644 --- a/ButcherWeight/WeightContext.cs +++ b/ButcherWeight/WeightContext.cs @@ -12,7 +12,7 @@ namespace ButcherWeight public static class WeightContext { //#if debug - private static string loginConfigPath = @"C:\B3Service\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml"; + private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml"; //#endif //#if !debug // private static string loginConfigPath = Application.StartupPath + "\\WeightSetting.xml"; diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs index 6c7bd78..4d1d9f9 100644 --- a/ButcherWeight/WeightForm.Designer.cs +++ b/ButcherWeight/WeightForm.Designer.cs @@ -30,21 +30,21 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - 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 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 dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.enableCheckBox = new System.Windows.Forms.CheckBox(); this.weightSet = new System.Windows.Forms.Button(); @@ -91,6 +91,14 @@ this.panel3 = new System.Windows.Forms.Panel(); this.farmerSelect = new BWP.WinFormControl.UComboBox(); this.farmerGrid = new System.Windows.Forms.DataGridView(); + this.F_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Farmer_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Farmer_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label3 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.weightGrid = new System.Windows.Forms.DataGridView(); @@ -137,19 +145,11 @@ this.panel5 = new System.Windows.Forms.Panel(); this.weightLabel = new System.Windows.Forms.Label(); this.weightSerialPort = new System.IO.Ports.SerialPort(this.components); - this.qCarSelect = new BWP.WinFormControl.UComboBox(); this.label4 = new System.Windows.Forms.Label(); - this.qSupplierSelect = new BWP.WinFormControl.UComboBox(); this.label5 = new System.Windows.Forms.Label(); this.queryBtn = new System.Windows.Forms.Button(); - this.F_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_Farmer_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_Farmer_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.F_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.qSupplierSelect = new BWP.WinFormControl.UComboBox(); + this.qCarSelect = new BWP.WinFormControl.UComboBox(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); @@ -692,7 +692,7 @@ this.farmerSelect.EnableTopItem = true; this.farmerSelect.Font = new System.Drawing.Font("宋体", 12F); this.farmerSelect.FormattingEnabled = true; - this.farmerSelect.Location = new System.Drawing.Point(190, 93); + this.farmerSelect.Location = new System.Drawing.Point(202, 93); this.farmerSelect.Name = "farmerSelect"; this.farmerSelect.Range = 10; this.farmerSelect.Size = new System.Drawing.Size(135, 27); @@ -702,19 +702,20 @@ // farmerGrid // this.farmerGrid.AllowUserToAddRows = false; + this.farmerGrid.AllowUserToDeleteRows = false; this.farmerGrid.AllowUserToResizeColumns = false; this.farmerGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle31.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle31; this.farmerGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle32.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle32.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle32.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle32.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle32.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle32; this.farmerGrid.ColumnHeadersHeight = 24; this.farmerGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.farmerGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -730,13 +731,70 @@ this.farmerGrid.MultiSelect = false; this.farmerGrid.Name = "farmerGrid"; this.farmerGrid.RowHeadersVisible = false; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle33.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle33; this.farmerGrid.RowTemplate.Height = 23; this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.farmerGrid.Size = new System.Drawing.Size(400, 112); this.farmerGrid.TabIndex = 8; // + // F_ID + // + this.F_ID.DataPropertyName = "ID"; + this.F_ID.HeaderText = "ID"; + this.F_ID.Name = "F_ID"; + this.F_ID.Visible = false; + // + // F_B3ID + // + this.F_B3ID.DataPropertyName = "B3ID"; + this.F_B3ID.HeaderText = "B3ID"; + this.F_B3ID.Name = "F_B3ID"; + this.F_B3ID.Visible = false; + // + // F_WeightBill_ID + // + this.F_WeightBill_ID.DataPropertyName = "WeightBill_ID"; + this.F_WeightBill_ID.HeaderText = "WeightBill_ID"; + this.F_WeightBill_ID.Name = "F_WeightBill_ID"; + this.F_WeightBill_ID.Visible = false; + // + // F_Farmer_ID + // + this.F_Farmer_ID.DataPropertyName = "Farmer_ID"; + this.F_Farmer_ID.HeaderText = "Farmer_ID"; + this.F_Farmer_ID.Name = "F_Farmer_ID"; + this.F_Farmer_ID.Visible = false; + // + // F_Index + // + this.F_Index.DataPropertyName = "Index"; + this.F_Index.HeaderText = "序号"; + this.F_Index.Name = "F_Index"; + this.F_Index.ReadOnly = true; + this.F_Index.Width = 80; + // + // F_Farmer_Name + // + this.F_Farmer_Name.DataPropertyName = "Farmer_Name"; + this.F_Farmer_Name.HeaderText = "养殖户"; + this.F_Farmer_Name.Name = "F_Farmer_Name"; + this.F_Farmer_Name.ReadOnly = true; + this.F_Farmer_Name.Width = 120; + // + // F_Number + // + this.F_Number.DataPropertyName = "Number"; + this.F_Number.HeaderText = "头数"; + this.F_Number.Name = "F_Number"; + this.F_Number.Width = 80; + // + // F_Weight + // + this.F_Weight.DataPropertyName = "Weight"; + this.F_Weight.HeaderText = "重量"; + this.F_Weight.Name = "F_Weight"; + // // label3 // this.label3.AutoSize = true; @@ -763,17 +821,17 @@ this.weightGrid.AllowUserToAddRows = false; this.weightGrid.AllowUserToResizeColumns = false; this.weightGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle34.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle34; this.weightGrid.BackgroundColor = System.Drawing.Color.White; - 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.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle35.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle35.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle35.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle35.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle35.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle35.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle35; this.weightGrid.ColumnHeadersHeight = 24; this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -789,8 +847,8 @@ this.weightGrid.MultiSelect = false; this.weightGrid.Name = "weightGrid"; this.weightGrid.RowHeadersVisible = false; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle36.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle36; this.weightGrid.RowTemplate.Height = 23; this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.weightGrid.Size = new System.Drawing.Size(400, 90); @@ -871,17 +929,17 @@ this.houseGird.AllowUserToDeleteRows = false; this.houseGird.AllowUserToResizeColumns = false; this.houseGird.AllowUserToResizeRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle37; this.houseGird.BackgroundColor = System.Drawing.Color.White; - 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.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle38.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle38.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle38.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle38.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle38.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle38; this.houseGird.ColumnHeadersHeight = 24; this.houseGird.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.houseGird.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -896,8 +954,8 @@ this.houseGird.MultiSelect = false; this.houseGird.Name = "houseGird"; this.houseGird.RowHeadersVisible = false; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle39; this.houseGird.RowTemplate.Height = 23; this.houseGird.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.houseGird.Size = new System.Drawing.Size(400, 90); @@ -960,17 +1018,17 @@ this.abnormalGrid.AllowUserToDeleteRows = false; this.abnormalGrid.AllowUserToResizeColumns = false; this.abnormalGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle40; this.abnormalGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle41.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle41.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle41.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle41.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle41.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle41; this.abnormalGrid.ColumnHeadersHeight = 24; this.abnormalGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.abnormalGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -986,8 +1044,8 @@ this.abnormalGrid.MultiSelect = false; this.abnormalGrid.Name = "abnormalGrid"; this.abnormalGrid.RowHeadersVisible = false; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle42; this.abnormalGrid.RowTemplate.Height = 23; this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.abnormalGrid.Size = new System.Drawing.Size(400, 237); @@ -1056,17 +1114,17 @@ this.billGrid.AllowUserToDeleteRows = false; this.billGrid.AllowUserToResizeColumns = false; this.billGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle43.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle43; this.billGrid.BackgroundColor = System.Drawing.Color.White; - 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.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle44.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle44.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle44.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle44.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle44.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle44; this.billGrid.ColumnHeadersHeight = 24; this.billGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -1085,8 +1143,8 @@ this.billGrid.Name = "billGrid"; this.billGrid.ReadOnly = true; this.billGrid.RowHeadersVisible = false; - dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle15; + dataGridViewCellStyle45.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle45; this.billGrid.RowTemplate.Height = 23; this.billGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.billGrid.Size = new System.Drawing.Size(1250, 230); @@ -1224,19 +1282,6 @@ this.weightLabel.TabIndex = 12; this.weightLabel.Text = "0"; // - // qCarSelect - // - this.qCarSelect.CodeArgs = null; - this.qCarSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.qCarSelect.EnableTopItem = true; - this.qCarSelect.Font = new System.Drawing.Font("宋体", 12F); - this.qCarSelect.FormattingEnabled = true; - this.qCarSelect.Location = new System.Drawing.Point(64, 562); - this.qCarSelect.Name = "qCarSelect"; - this.qCarSelect.Range = 10; - this.qCarSelect.Size = new System.Drawing.Size(135, 27); - this.qCarSelect.TabIndex = 40; - // // label4 // this.label4.AutoSize = true; @@ -1247,19 +1292,6 @@ this.label4.TabIndex = 39; this.label4.Text = "车辆:"; // - // qSupplierSelect - // - this.qSupplierSelect.CodeArgs = null; - this.qSupplierSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.qSupplierSelect.EnableTopItem = true; - this.qSupplierSelect.Font = new System.Drawing.Font("宋体", 12F); - this.qSupplierSelect.FormattingEnabled = true; - this.qSupplierSelect.Location = new System.Drawing.Point(279, 562); - this.qSupplierSelect.Name = "qSupplierSelect"; - this.qSupplierSelect.Range = 10; - this.qSupplierSelect.Size = new System.Drawing.Size(135, 27); - this.qSupplierSelect.TabIndex = 42; - // // label5 // this.label5.AutoSize = true; @@ -1281,62 +1313,31 @@ this.queryBtn.UseVisualStyleBackColor = true; this.queryBtn.Click += new System.EventHandler(this.queryBtn_Click); // - // F_ID - // - this.F_ID.DataPropertyName = "ID"; - this.F_ID.HeaderText = "ID"; - this.F_ID.Name = "F_ID"; - this.F_ID.Visible = false; - // - // F_B3ID - // - this.F_B3ID.DataPropertyName = "B3ID"; - this.F_B3ID.HeaderText = "B3ID"; - this.F_B3ID.Name = "F_B3ID"; - this.F_B3ID.Visible = false; - // - // F_WeightBill_ID - // - this.F_WeightBill_ID.DataPropertyName = "WeightBill_ID"; - this.F_WeightBill_ID.HeaderText = "WeightBill_ID"; - this.F_WeightBill_ID.Name = "F_WeightBill_ID"; - this.F_WeightBill_ID.Visible = false; - // - // F_Farmer_ID - // - this.F_Farmer_ID.DataPropertyName = "Farmer_ID"; - this.F_Farmer_ID.HeaderText = "Farmer_ID"; - this.F_Farmer_ID.Name = "F_Farmer_ID"; - this.F_Farmer_ID.Visible = false; - // - // F_Index - // - this.F_Index.DataPropertyName = "Index"; - this.F_Index.HeaderText = "序号"; - this.F_Index.Name = "F_Index"; - this.F_Index.ReadOnly = true; - this.F_Index.Width = 80; - // - // F_Farmer_Name - // - this.F_Farmer_Name.DataPropertyName = "Farmer_Name"; - this.F_Farmer_Name.HeaderText = "养殖户"; - this.F_Farmer_Name.Name = "F_Farmer_Name"; - this.F_Farmer_Name.ReadOnly = true; - this.F_Farmer_Name.Width = 120; - // - // F_Number + // qSupplierSelect // - this.F_Number.DataPropertyName = "Number"; - this.F_Number.HeaderText = "头数"; - this.F_Number.Name = "F_Number"; - this.F_Number.Width = 80; + this.qSupplierSelect.CodeArgs = null; + this.qSupplierSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.qSupplierSelect.EnableTopItem = true; + this.qSupplierSelect.Font = new System.Drawing.Font("宋体", 12F); + this.qSupplierSelect.FormattingEnabled = true; + this.qSupplierSelect.Location = new System.Drawing.Point(279, 562); + this.qSupplierSelect.Name = "qSupplierSelect"; + this.qSupplierSelect.Range = 10; + this.qSupplierSelect.Size = new System.Drawing.Size(135, 27); + this.qSupplierSelect.TabIndex = 42; // - // F_Weight + // qCarSelect // - this.F_Weight.DataPropertyName = "Weight"; - this.F_Weight.HeaderText = "重量"; - this.F_Weight.Name = "F_Weight"; + this.qCarSelect.CodeArgs = null; + this.qCarSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.qCarSelect.EnableTopItem = true; + this.qCarSelect.Font = new System.Drawing.Font("宋体", 12F); + this.qCarSelect.FormattingEnabled = true; + this.qCarSelect.Location = new System.Drawing.Point(64, 562); + this.qCarSelect.Name = "qCarSelect"; + this.qCarSelect.Range = 10; + this.qCarSelect.Size = new System.Drawing.Size(135, 27); + this.qCarSelect.TabIndex = 40; // // WeightForm // diff --git a/ButcherWeight/WeightForm.cs b/ButcherWeight/WeightForm.cs index 8af14b6..dd660c5 100644 --- a/ButcherWeight/WeightForm.cs +++ b/ButcherWeight/WeightForm.cs @@ -340,7 +340,9 @@ namespace ButcherWeight foreach (DataGridViewRow data in farmerGrid.Rows) { var detail = data.DataBoundItem as WeightBill_FarmerDetail; - _farmerDetails.First(x => x.Index == detail.Index).Number = detail.Number; + var first =_farmerDetails.First(x => x.Index == detail.Index); + first.Number = detail.Number; + first.Weight = detail.Weight; } foreach (DataGridViewRow data in weightGrid.Rows)