diff --git a/BO/BO/Bill/WeightBill/WeightBill.cs b/BO/BO/Bill/WeightBill/WeightBill.cs index e696ef9..ad4b2ba 100644 --- a/BO/BO/Bill/WeightBill/WeightBill.cs +++ b/BO/BO/Bill/WeightBill/WeightBill.cs @@ -117,5 +117,18 @@ namespace BO.BO public int SanctionNumber { get { return _sanctionDetails.Sum(x => (x.Number ?? 0)); } } public int? FirstWeightNumber { get; set; } + + public bool FinishWeight + { + get + { + if (Details.Any()) + { + var first = Details.First(); + return first.MaoWeight.HasValue && first.PiWeight.HasValue; + } + return false; + } + } } } diff --git a/BO/Utils/BillRpc/WeightBillRpc.cs b/BO/Utils/BillRpc/WeightBillRpc.cs index e3dce9f..485e304 100644 --- a/BO/Utils/BillRpc/WeightBillRpc.cs +++ b/BO/Utils/BillRpc/WeightBillRpc.cs @@ -179,6 +179,8 @@ namespace BO.Utils.BillRpc entity.HogGrade_Name = obj.Get("HogGrade_Name"); entity.ShackWeight = obj.Get("ShackWeight"); entity.ShackPrice = obj.Get("ShackPrice"); + entity.JingJianFee = obj.Get("JingJianFee"); + entity.DiscontMoney = obj.Get("DiscontMoney"); entity.AnimalTestNumber = obj.Get("AnimalTestNumber"); entity.AnimalTestDate = obj.Get("AnimalTestDate"); entity.AnimalTestMan = obj.Get("AnimalTestMan"); diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs index ec54233..375a71d 100644 --- a/ButcherWeight/WeightForm.Designer.cs +++ b/ButcherWeight/WeightForm.Designer.cs @@ -30,25 +30,25 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = 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 dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = 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 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 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = 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 dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = 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(); @@ -60,6 +60,10 @@ this.readPiBtn = new System.Windows.Forms.Button(); this.readMaoBtn = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); + this.discontInput = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.jingjianInput = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); this.zoneSelect = new BWP.WinFormControl.UComboBox(); this.hogGradeSelect = new BWP.WinFormControl.UComboBox(); this.label2 = new System.Windows.Forms.Label(); @@ -133,17 +137,6 @@ this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.billGrid = new System.Windows.Forms.DataGridView(); - this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_SanctionNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label15 = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); @@ -158,10 +151,18 @@ this.farmerMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.farmerDelete = new System.Windows.Forms.ToolStripMenuItem(); this.viewDetailBtn = new System.Windows.Forms.Button(); - this.jingjianInput = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.discontInput = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); + this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_SanctionNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); @@ -338,6 +339,42 @@ this.panel2.Size = new System.Drawing.Size(1251, 170); this.panel2.TabIndex = 2; // + // discontInput + // + this.discontInput.Font = new System.Drawing.Font("宋体", 14F); + this.discontInput.Location = new System.Drawing.Point(599, 49); + this.discontInput.Name = "discontInput"; + this.discontInput.Size = new System.Drawing.Size(135, 29); + this.discontInput.TabIndex = 41; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 14F); + this.label9.Location = new System.Drawing.Point(501, 55); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(85, 19); + this.label9.TabIndex = 40; + this.label9.Text = "猪场扣款"; + // + // jingjianInput + // + this.jingjianInput.Font = new System.Drawing.Font("宋体", 14F); + this.jingjianInput.Location = new System.Drawing.Point(599, 9); + this.jingjianInput.Name = "jingjianInput"; + this.jingjianInput.Size = new System.Drawing.Size(135, 29); + this.jingjianInput.TabIndex = 39; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("宋体", 14F); + this.label6.Location = new System.Drawing.Point(501, 15); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(66, 19); + this.label6.TabIndex = 38; + this.label6.Text = "经检费"; + // // zoneSelect // this.zoneSelect.CodeArgs = null; @@ -725,17 +762,17 @@ this.farmerGrid.AllowUserToDeleteRows = false; this.farmerGrid.AllowUserToResizeColumns = false; this.farmerGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle20; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.farmerGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle21; + 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; this.farmerGrid.ColumnHeadersHeight = 24; this.farmerGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.farmerGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -751,8 +788,8 @@ this.farmerGrid.MultiSelect = false; this.farmerGrid.Name = "farmerGrid"; this.farmerGrid.RowHeadersVisible = false; - dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle22; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle3; this.farmerGrid.RowTemplate.Height = 23; this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.farmerGrid.Size = new System.Drawing.Size(400, 112); @@ -842,17 +879,17 @@ this.weightGrid.AllowUserToAddRows = false; this.weightGrid.AllowUserToResizeColumns = false; this.weightGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle23; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.weightGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle24.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle24; + 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; this.weightGrid.ColumnHeadersHeight = 24; this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -868,8 +905,8 @@ this.weightGrid.MultiSelect = false; this.weightGrid.Name = "weightGrid"; this.weightGrid.RowHeadersVisible = false; - dataGridViewCellStyle28.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle9; this.weightGrid.RowTemplate.Height = 23; this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.weightGrid.Size = new System.Drawing.Size(400, 90); @@ -914,8 +951,8 @@ // D_MaoWeight // this.D_MaoWeight.DataPropertyName = "MaoWeight"; - dataGridViewCellStyle25.Format = "#0.######"; - this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle25; + dataGridViewCellStyle6.Format = "#0.######"; + this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle6; this.D_MaoWeight.HeaderText = "毛重"; this.D_MaoWeight.Name = "D_MaoWeight"; this.D_MaoWeight.ReadOnly = true; @@ -924,8 +961,8 @@ // D_PiWeight // this.D_PiWeight.DataPropertyName = "PiWeight"; - dataGridViewCellStyle26.Format = "#0.######"; - this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle26; + dataGridViewCellStyle7.Format = "#0.######"; + this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle7; this.D_PiWeight.HeaderText = "皮重"; this.D_PiWeight.Name = "D_PiWeight"; this.D_PiWeight.ReadOnly = true; @@ -934,8 +971,8 @@ // D_Weight // this.D_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle27.Format = "#0.######"; - this.D_Weight.DefaultCellStyle = dataGridViewCellStyle27; + dataGridViewCellStyle8.Format = "#0.######"; + this.D_Weight.DefaultCellStyle = dataGridViewCellStyle8; this.D_Weight.HeaderText = "重量"; this.D_Weight.Name = "D_Weight"; this.D_Weight.ReadOnly = true; @@ -956,17 +993,17 @@ this.houseGird.AllowUserToDeleteRows = false; this.houseGird.AllowUserToResizeColumns = false; this.houseGird.AllowUserToResizeRows = false; - dataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.houseGird.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle30.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle30.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle30.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle30.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle30; + 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.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.houseGird.ColumnHeadersHeight = 24; this.houseGird.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.houseGird.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -981,8 +1018,8 @@ this.houseGird.MultiSelect = false; this.houseGird.Name = "houseGird"; this.houseGird.RowHeadersVisible = false; - dataGridViewCellStyle31.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle31; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle12; this.houseGird.RowTemplate.Height = 23; this.houseGird.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.houseGird.Size = new System.Drawing.Size(400, 90); @@ -1045,17 +1082,17 @@ this.abnormalGrid.AllowUserToDeleteRows = false; this.abnormalGrid.AllowUserToResizeColumns = false; this.abnormalGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle32; + dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; this.abnormalGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle33.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle33.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle33.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle33.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle33.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle33; + 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.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; this.abnormalGrid.ColumnHeadersHeight = 24; this.abnormalGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.abnormalGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -1071,8 +1108,8 @@ this.abnormalGrid.MultiSelect = false; this.abnormalGrid.Name = "abnormalGrid"; this.abnormalGrid.RowHeadersVisible = false; - dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle34; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle15; this.abnormalGrid.RowTemplate.Height = 23; this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.abnormalGrid.Size = new System.Drawing.Size(400, 237); @@ -1141,21 +1178,22 @@ this.billGrid.AllowUserToDeleteRows = false; this.billGrid.AllowUserToResizeColumns = false; this.billGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35; + dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16; this.billGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle36.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle36.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17; this.billGrid.ColumnHeadersHeight = 24; this.billGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.M_ID, + this.M_FinishWeight, this.M_B3ID, this.M_Car_Name, this.M_Supplier_Name, @@ -1171,102 +1209,14 @@ this.billGrid.Name = "billGrid"; this.billGrid.ReadOnly = true; this.billGrid.RowHeadersVisible = false; - dataGridViewCellStyle38.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle38; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle19; this.billGrid.RowTemplate.Height = 23; this.billGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.billGrid.Size = new System.Drawing.Size(1250, 230); this.billGrid.TabIndex = 0; this.billGrid.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.billGrid_CellDoubleClick); // - // M_ID - // - this.M_ID.DataPropertyName = "ID"; - this.M_ID.HeaderText = "ID"; - this.M_ID.Name = "M_ID"; - this.M_ID.ReadOnly = true; - this.M_ID.Visible = false; - // - // M_B3ID - // - this.M_B3ID.DataPropertyName = "B3ID"; - this.M_B3ID.HeaderText = "过磅单号"; - this.M_B3ID.Name = "M_B3ID"; - this.M_B3ID.ReadOnly = true; - // - // M_Car_Name - // - this.M_Car_Name.DataPropertyName = "Car_Name"; - this.M_Car_Name.HeaderText = "车辆"; - this.M_Car_Name.Name = "M_Car_Name"; - this.M_Car_Name.ReadOnly = true; - this.M_Car_Name.Width = 120; - // - // M_Supplier_Name - // - this.M_Supplier_Name.DataPropertyName = "Supplier_Name"; - this.M_Supplier_Name.HeaderText = "供应商"; - this.M_Supplier_Name.Name = "M_Supplier_Name"; - this.M_Supplier_Name.ReadOnly = true; - this.M_Supplier_Name.Width = 120; - // - // M_Employee_Name - // - this.M_Employee_Name.DataPropertyName = "Employee_Name"; - this.M_Employee_Name.HeaderText = "业务员"; - this.M_Employee_Name.Name = "M_Employee_Name"; - this.M_Employee_Name.ReadOnly = true; - this.M_Employee_Name.Width = 110; - // - // M_PurchaseType_Name - // - this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name"; - this.M_PurchaseType_Name.HeaderText = "收购类型"; - this.M_PurchaseType_Name.Name = "M_PurchaseType_Name"; - this.M_PurchaseType_Name.ReadOnly = true; - this.M_PurchaseType_Name.Width = 110; - // - // M_Number - // - this.M_Number.DataPropertyName = "Number"; - this.M_Number.HeaderText = "收购头数"; - this.M_Number.Name = "M_Number"; - this.M_Number.ReadOnly = true; - this.M_Number.Width = 110; - // - // M_Weight - // - this.M_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle37.Format = "#0.######"; - this.M_Weight.DefaultCellStyle = dataGridViewCellStyle37; - this.M_Weight.HeaderText = "收购重量"; - this.M_Weight.Name = "M_Weight"; - this.M_Weight.ReadOnly = true; - this.M_Weight.Width = 120; - // - // M_HouseNames - // - this.M_HouseNames.DataPropertyName = "HouseNames"; - this.M_HouseNames.HeaderText = "圈舍"; - this.M_HouseNames.Name = "M_HouseNames"; - this.M_HouseNames.ReadOnly = true; - this.M_HouseNames.Width = 180; - // - // M_SanctionNumber - // - this.M_SanctionNumber.DataPropertyName = "SanctionNumber"; - this.M_SanctionNumber.HeaderText = "异常明细"; - this.M_SanctionNumber.Name = "M_SanctionNumber"; - this.M_SanctionNumber.ReadOnly = true; - // - // M_Remark - // - this.M_Remark.DataPropertyName = "Remark"; - this.M_Remark.HeaderText = "摘要"; - this.M_Remark.Name = "M_Remark"; - this.M_Remark.ReadOnly = true; - this.M_Remark.Width = 130; - // // label15 // this.label15.AutoSize = true; @@ -1402,41 +1352,101 @@ this.viewDetailBtn.UseVisualStyleBackColor = true; this.viewDetailBtn.Click += new System.EventHandler(this.viewDetailBtn_Click); // - // jingjianInput + // M_ID // - this.jingjianInput.Font = new System.Drawing.Font("宋体", 14F); - this.jingjianInput.Location = new System.Drawing.Point(599, 9); - this.jingjianInput.Name = "jingjianInput"; - this.jingjianInput.Size = new System.Drawing.Size(135, 29); - this.jingjianInput.TabIndex = 39; + this.M_ID.DataPropertyName = "ID"; + this.M_ID.HeaderText = "ID"; + this.M_ID.Name = "M_ID"; + this.M_ID.ReadOnly = true; + this.M_ID.Visible = false; // - // label6 + // M_FinishWeight // - this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("宋体", 14F); - this.label6.Location = new System.Drawing.Point(501, 15); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(66, 19); - this.label6.TabIndex = 38; - this.label6.Text = "经检费"; + this.M_FinishWeight.DataPropertyName = "FinishWeight"; + this.M_FinishWeight.HeaderText = "FinishWeight"; + this.M_FinishWeight.Name = "M_FinishWeight"; + this.M_FinishWeight.ReadOnly = true; + this.M_FinishWeight.Visible = false; // - // discontInput + // M_B3ID // - this.discontInput.Font = new System.Drawing.Font("宋体", 14F); - this.discontInput.Location = new System.Drawing.Point(599, 49); - this.discontInput.Name = "discontInput"; - this.discontInput.Size = new System.Drawing.Size(135, 29); - this.discontInput.TabIndex = 41; + this.M_B3ID.DataPropertyName = "B3ID"; + this.M_B3ID.HeaderText = "过磅单号"; + this.M_B3ID.Name = "M_B3ID"; + this.M_B3ID.ReadOnly = true; // - // label9 + // M_Car_Name // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("宋体", 14F); - this.label9.Location = new System.Drawing.Point(501, 55); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(85, 19); - this.label9.TabIndex = 40; - this.label9.Text = "猪场扣款"; + this.M_Car_Name.DataPropertyName = "Car_Name"; + this.M_Car_Name.HeaderText = "车辆"; + this.M_Car_Name.Name = "M_Car_Name"; + this.M_Car_Name.ReadOnly = true; + this.M_Car_Name.Width = 120; + // + // M_Supplier_Name + // + this.M_Supplier_Name.DataPropertyName = "Supplier_Name"; + this.M_Supplier_Name.HeaderText = "供应商"; + this.M_Supplier_Name.Name = "M_Supplier_Name"; + this.M_Supplier_Name.ReadOnly = true; + this.M_Supplier_Name.Width = 120; + // + // M_Employee_Name + // + this.M_Employee_Name.DataPropertyName = "Employee_Name"; + this.M_Employee_Name.HeaderText = "业务员"; + this.M_Employee_Name.Name = "M_Employee_Name"; + this.M_Employee_Name.ReadOnly = true; + this.M_Employee_Name.Width = 110; + // + // M_PurchaseType_Name + // + this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name"; + this.M_PurchaseType_Name.HeaderText = "收购类型"; + this.M_PurchaseType_Name.Name = "M_PurchaseType_Name"; + this.M_PurchaseType_Name.ReadOnly = true; + this.M_PurchaseType_Name.Width = 110; + // + // M_Number + // + this.M_Number.DataPropertyName = "Number"; + this.M_Number.HeaderText = "收购头数"; + this.M_Number.Name = "M_Number"; + this.M_Number.ReadOnly = true; + this.M_Number.Width = 110; + // + // M_Weight + // + this.M_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle18.Format = "#0.######"; + this.M_Weight.DefaultCellStyle = dataGridViewCellStyle18; + this.M_Weight.HeaderText = "收购重量"; + this.M_Weight.Name = "M_Weight"; + this.M_Weight.ReadOnly = true; + this.M_Weight.Width = 120; + // + // M_HouseNames + // + this.M_HouseNames.DataPropertyName = "HouseNames"; + this.M_HouseNames.HeaderText = "圈舍"; + this.M_HouseNames.Name = "M_HouseNames"; + this.M_HouseNames.ReadOnly = true; + this.M_HouseNames.Width = 180; + // + // M_SanctionNumber + // + this.M_SanctionNumber.DataPropertyName = "SanctionNumber"; + this.M_SanctionNumber.HeaderText = "异常明细"; + this.M_SanctionNumber.Name = "M_SanctionNumber"; + this.M_SanctionNumber.ReadOnly = true; + // + // M_Remark + // + this.M_Remark.DataPropertyName = "Remark"; + this.M_Remark.HeaderText = "摘要"; + this.M_Remark.Name = "M_Remark"; + this.M_Remark.ReadOnly = true; + this.M_Remark.Width = 130; // // WeightForm // @@ -1584,7 +1594,12 @@ private System.Windows.Forms.DataGridViewTextBoxColumn D_MaoWeight; private System.Windows.Forms.DataGridViewTextBoxColumn D_PiWeight; private System.Windows.Forms.DataGridViewTextBoxColumn D_Weight; + private System.Windows.Forms.TextBox discontInput; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox jingjianInput; + private System.Windows.Forms.Label label6; private System.Windows.Forms.DataGridViewTextBoxColumn M_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn M_FinishWeight; private System.Windows.Forms.DataGridViewTextBoxColumn M_B3ID; private System.Windows.Forms.DataGridViewTextBoxColumn M_Car_Name; private System.Windows.Forms.DataGridViewTextBoxColumn M_Supplier_Name; @@ -1595,9 +1610,5 @@ private System.Windows.Forms.DataGridViewTextBoxColumn M_HouseNames; private System.Windows.Forms.DataGridViewTextBoxColumn M_SanctionNumber; private System.Windows.Forms.DataGridViewTextBoxColumn M_Remark; - private System.Windows.Forms.TextBox discontInput; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox jingjianInput; - private System.Windows.Forms.Label label6; } } \ No newline at end of file diff --git a/ButcherWeight/WeightForm.cs b/ButcherWeight/WeightForm.cs index 79b7abd..0dba1d3 100644 --- a/ButcherWeight/WeightForm.cs +++ b/ButcherWeight/WeightForm.cs @@ -171,7 +171,12 @@ namespace ButcherWeight void BindWeightBill() { - billGrid.DataSource = dmoList.OrderByDescending(x => x.ID).ToList(); + billGrid.DataSource = dmoList.OrderByDescending(x => x.ID).OrderBy(x => x.FinishWeight).ToList(); + foreach (DataGridViewRow row in billGrid.Rows) + { + if ((bool)row.Cells["M_FinishWeight"].Value) + row.DefaultCellStyle.BackColor = Color.YellowGreen; + } billGrid.Refresh(); } diff --git a/ButcherWeight/WeightForm.resx b/ButcherWeight/WeightForm.resx index 93ca3c1..42ede96 100644 --- a/ButcherWeight/WeightForm.resx +++ b/ButcherWeight/WeightForm.resx @@ -213,6 +213,9 @@ True + + True + True