diff --git a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs index 444f915..aaffe05 100644 --- a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs +++ b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs @@ -57,5 +57,7 @@ namespace BO.BO.Bill public bool IsDrop { get; set; } public string BarCode { get; set; } + + public long? ProductBatch_ID { get; set; } } } diff --git a/WeighAndGrading/DataConfirm.Designer.cs b/WeighAndGrading/DataConfirm.Designer.cs index 8b56f5e..1ab615e 100644 --- a/WeighAndGrading/DataConfirm.Designer.cs +++ b/WeighAndGrading/DataConfirm.Designer.cs @@ -48,6 +48,11 @@ this.rightIndex = new BWP.WinFormControl.UTextBoxWithPad(); this.label4 = new System.Windows.Forms.Label(); this.orderGridView = new BWP.WinFormControl.UDataGridView(); + this.L_WeightID = 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_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.rightVScrollBar = new System.Windows.Forms.VScrollBar(); this.ttPanel = new System.Windows.Forms.FlowLayoutPanel(); this.mbPanel = new System.Windows.Forms.FlowLayoutPanel(); @@ -75,11 +80,8 @@ this.tangBtn = new System.Windows.Forms.Button(); this.maoBtn = new System.Windows.Forms.Button(); this.leftVScrollBar = new System.Windows.Forms.VScrollBar(); - this.L_WeightID = 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_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.batchSelect = new BWP.WinFormControl.UComboBox(); + this.label9 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.orderGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit(); this.SuspendLayout(); @@ -87,11 +89,11 @@ // leftBtn // this.leftBtn.Font = new System.Drawing.Font("宋体", 15F); - this.leftBtn.Location = new System.Drawing.Point(527, 17); + this.leftBtn.Location = new System.Drawing.Point(482, 17); this.leftBtn.Name = "leftBtn"; - this.leftBtn.Size = new System.Drawing.Size(149, 41); + this.leftBtn.Size = new System.Drawing.Size(71, 41); this.leftBtn.TabIndex = 5; - this.leftBtn.Text = "查询排宰顺序"; + this.leftBtn.Text = "查询"; this.leftBtn.UseVisualStyleBackColor = true; this.leftBtn.Click += new System.EventHandler(this.leftBtn_Click); // @@ -228,6 +230,46 @@ this.orderGridView.TabIndex = 13; this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick); // + // L_WeightID + // + this.L_WeightID.DataPropertyName = "WeightID"; + this.L_WeightID.HeaderText = "磅单号"; + this.L_WeightID.Name = "L_WeightID"; + this.L_WeightID.ReadOnly = true; + this.L_WeightID.Width = 90; + // + // 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 = 90; + // + // L_PlanNumber + // + this.L_PlanNumber.DataPropertyName = "PlanNumber"; + this.L_PlanNumber.HeaderText = "头数"; + this.L_PlanNumber.Name = "L_PlanNumber"; + this.L_PlanNumber.ReadOnly = true; + this.L_PlanNumber.Width = 90; + // + // L_HotFadeNumber + // + this.L_HotFadeNumber.DataPropertyName = "HotFadeNumber"; + this.L_HotFadeNumber.HeaderText = "烫褪"; + this.L_HotFadeNumber.Name = "L_HotFadeNumber"; + this.L_HotFadeNumber.ReadOnly = true; + this.L_HotFadeNumber.Width = 85; + // + // L_MaoNumber + // + this.L_MaoNumber.DataPropertyName = "MaoNumber"; + this.L_MaoNumber.HeaderText = "毛剥"; + this.L_MaoNumber.Name = "L_MaoNumber"; + this.L_MaoNumber.ReadOnly = true; + this.L_MaoNumber.Width = 85; + // // rightVScrollBar // this.rightVScrollBar.Location = new System.Drawing.Point(1419, 185); @@ -518,51 +560,36 @@ this.leftVScrollBar.Size = new System.Drawing.Size(40, 617); this.leftVScrollBar.TabIndex = 70; // - // L_WeightID - // - this.L_WeightID.DataPropertyName = "WeightID"; - this.L_WeightID.HeaderText = "磅单号"; - this.L_WeightID.Name = "L_WeightID"; - this.L_WeightID.ReadOnly = true; - this.L_WeightID.Width = 90; - // - // 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 = 90; - // - // L_PlanNumber - // - this.L_PlanNumber.DataPropertyName = "PlanNumber"; - this.L_PlanNumber.HeaderText = "头数"; - this.L_PlanNumber.Name = "L_PlanNumber"; - this.L_PlanNumber.ReadOnly = true; - this.L_PlanNumber.Width = 90; - // - // L_HotFadeNumber - // - this.L_HotFadeNumber.DataPropertyName = "HotFadeNumber"; - this.L_HotFadeNumber.HeaderText = "烫褪"; - this.L_HotFadeNumber.Name = "L_HotFadeNumber"; - this.L_HotFadeNumber.ReadOnly = true; - this.L_HotFadeNumber.Width = 85; - // - // L_MaoNumber - // - this.L_MaoNumber.DataPropertyName = "MaoNumber"; - this.L_MaoNumber.HeaderText = "毛剥"; - this.L_MaoNumber.Name = "L_MaoNumber"; - this.L_MaoNumber.ReadOnly = true; - this.L_MaoNumber.Width = 85; + // batchSelect + // + this.batchSelect.CodeArgs = null; + this.batchSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.batchSelect.EnableTopItem = true; + this.batchSelect.Font = new System.Drawing.Font("宋体", 14F); + this.batchSelect.FormattingEnabled = true; + this.batchSelect.Location = new System.Drawing.Point(626, 22); + this.batchSelect.Name = "batchSelect"; + this.batchSelect.Range = 10; + this.batchSelect.Size = new System.Drawing.Size(204, 30); + this.batchSelect.TabIndex = 72; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 14F); + this.label9.Location = new System.Drawing.Point(571, 28); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(47, 19); + this.label9.TabIndex = 71; + this.label9.Text = "批次"; // // DataConfirm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1471, 741); + this.Controls.Add(this.batchSelect); + this.Controls.Add(this.label9); this.Controls.Add(this.leftVScrollBar); this.Controls.Add(this.maoBtn); this.Controls.Add(this.tangBtn); @@ -648,5 +675,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn L_PlanNumber; private System.Windows.Forms.DataGridViewTextBoxColumn L_HotFadeNumber; private System.Windows.Forms.DataGridViewTextBoxColumn L_MaoNumber; + private BWP.WinFormControl.UComboBox batchSelect; + private System.Windows.Forms.Label label9; } } \ No newline at end of file diff --git a/WeighAndGrading/DataConfirm.cs b/WeighAndGrading/DataConfirm.cs index 8d7bd0d..9d952ed 100644 --- a/WeighAndGrading/DataConfirm.cs +++ b/WeighAndGrading/DataConfirm.cs @@ -27,6 +27,7 @@ namespace WeighAndGrading uDatePicker1.Date = date; orderGridView.AutoGenerateColumns = false; weightGrid.AutoGenerateColumns = false; + batchSelect.Init("BaseInfoRpc/GetProductBatchList"); AddLivestockBtn(); } @@ -196,7 +197,11 @@ namespace WeighAndGrading private void AddBtn_Click(object sender, EventArgs e) { - weightList.Add(new GradeAndWeight_Detail() { Time = DateTime.Now, Date = uDatePicker1.Date.Value }); + if (weightList == null) + throw new Exception("请先查询过磅记录"); + if (batchSelect.LongValue == null) + throw new Exception("请先选择批次"); + weightList.Add(new GradeAndWeight_Detail() { ProductBatch_ID = batchSelect.LongValue, Time = DateTime.Now, Date = uDatePicker1.Date.Value }); weightGrid.DataSource = null; weightGrid.DataSource = weightList; weightGrid.Refresh(); diff --git a/WeighAndGrading/DataViewForm.Designer.cs b/WeighAndGrading/DataViewForm.Designer.cs index d8b7c81..13a426e 100644 --- a/WeighAndGrading/DataViewForm.Designer.cs +++ b/WeighAndGrading/DataViewForm.Designer.cs @@ -28,17 +28,17 @@ /// 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 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 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(); this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -61,6 +61,8 @@ this.dataConfirmBtn = new System.Windows.Forms.Button(); this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tangTotal = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); this.tangScrollBar = new System.Windows.Forms.VScrollBar(); this.ttPanel = new System.Windows.Forms.FlowLayoutPanel(); this.lblTangTui = new System.Windows.Forms.Label(); @@ -81,7 +83,9 @@ this.label12 = new System.Windows.Forms.Label(); this.historyGrid = new BWP.WinFormControl.UDataGridView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.maoTotal = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); this.maoScrollBar = new System.Windows.Forms.VScrollBar(); this.maoGridView = new BWP.WinFormControl.UDataGridView(); this.M_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -98,10 +102,6 @@ this.statePic = new System.Windows.Forms.PictureBox(); this.printBtn = new System.Windows.Forms.Button(); this.isPrintCheckBox = new System.Windows.Forms.CheckBox(); - this.maoTotal = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.tangTotal = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); this.modifyPanel.SuspendLayout(); this.withOkPanel.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -171,8 +171,8 @@ // H_Weight // this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle1.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle34.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle34; this.H_Weight.HeaderText = "重量"; this.H_Weight.Name = "H_Weight"; this.H_Weight.ReadOnly = true; @@ -181,9 +181,9 @@ // H_Time // this.H_Time.DataPropertyName = "Time"; - dataGridViewCellStyle2.Format = "HH:mm:ss"; - dataGridViewCellStyle2.NullValue = null; - this.H_Time.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle35.Format = "HH:mm:ss"; + dataGridViewCellStyle35.NullValue = null; + this.H_Time.DefaultCellStyle = dataGridViewCellStyle35; this.H_Time.HeaderText = "时间"; this.H_Time.Name = "H_Time"; this.H_Time.ReadOnly = true; @@ -194,7 +194,7 @@ this.butcherTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.butcherTimeInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0); this.butcherTimeInput.Font = new System.Drawing.Font("宋体", 15F); - this.butcherTimeInput.Location = new System.Drawing.Point(116, 31); + this.butcherTimeInput.Location = new System.Drawing.Point(120, 37); this.butcherTimeInput.Name = "butcherTimeInput"; this.butcherTimeInput.Size = new System.Drawing.Size(133, 30); this.butcherTimeInput.TabIndex = 44; @@ -326,6 +326,27 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "烫褪"; // + // tangTotal + // + this.tangTotal.AutoSize = true; + this.tangTotal.Font = new System.Drawing.Font("宋体", 18F); + this.tangTotal.ForeColor = System.Drawing.Color.Red; + this.tangTotal.Location = new System.Drawing.Point(312, -5); + this.tangTotal.Name = "tangTotal"; + this.tangTotal.Size = new System.Drawing.Size(22, 24); + this.tangTotal.TabIndex = 55; + this.tangTotal.Text = "0"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("宋体", 15F); + this.label8.Location = new System.Drawing.Point(207, -1); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(109, 20); + this.label8.TabIndex = 54; + this.label8.Text = "已宰合计:"; + // // tangScrollBar // this.tangScrollBar.Location = new System.Drawing.Point(373, 36); @@ -356,17 +377,17 @@ this.tangGridView.AllowUserToDeleteRows = false; this.tangGridView.AllowUserToResizeColumns = false; this.tangGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle36.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle36; this.tangGridView.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle37.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle37.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle37.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle37.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle37.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle37; this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.T_OrderDetail_ID, @@ -380,11 +401,11 @@ this.tangGridView.Name = "tangGridView"; this.tangGridView.ReadOnly = true; this.tangGridView.RowHeadersVisible = false; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Black; - this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle38.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle38.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle38.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle38.SelectionForeColor = System.Drawing.Color.Black; + this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle38; this.tangGridView.RowTemplate.Height = 65; this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -444,7 +465,7 @@ // this.alreadyLabel.AutoSize = true; this.alreadyLabel.Font = new System.Drawing.Font("宋体", 15F); - this.alreadyLabel.Location = new System.Drawing.Point(700, 29); + this.alreadyLabel.Location = new System.Drawing.Point(706, 70); this.alreadyLabel.Name = "alreadyLabel"; this.alreadyLabel.Size = new System.Drawing.Size(19, 20); this.alreadyLabel.TabIndex = 49; @@ -454,7 +475,7 @@ // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("宋体", 15F); - this.label4.Location = new System.Drawing.Point(599, 29); + this.label4.Location = new System.Drawing.Point(605, 70); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(109, 20); this.label4.TabIndex = 48; @@ -464,7 +485,7 @@ // this.orderLabel.AutoSize = true; this.orderLabel.Font = new System.Drawing.Font("宋体", 15F); - this.orderLabel.Location = new System.Drawing.Point(548, 29); + this.orderLabel.Location = new System.Drawing.Point(554, 70); this.orderLabel.Name = "orderLabel"; this.orderLabel.Size = new System.Drawing.Size(19, 20); this.orderLabel.TabIndex = 47; @@ -474,7 +495,7 @@ // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("宋体", 15F); - this.label2.Location = new System.Drawing.Point(443, 29); + this.label2.Location = new System.Drawing.Point(449, 70); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(109, 20); this.label2.TabIndex = 46; @@ -483,7 +504,7 @@ // syncBtn // this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); - this.syncBtn.Location = new System.Drawing.Point(274, 25); + this.syncBtn.Location = new System.Drawing.Point(278, 31); this.syncBtn.Name = "syncBtn"; this.syncBtn.Size = new System.Drawing.Size(102, 43); this.syncBtn.TabIndex = 45; @@ -495,7 +516,7 @@ // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("宋体", 15F); - this.label1.Location = new System.Drawing.Point(12, 36); + this.label1.Location = new System.Drawing.Point(16, 42); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(109, 20); this.label1.TabIndex = 43; @@ -529,17 +550,17 @@ this.historyGrid.AllowUserToDeleteRows = false; this.historyGrid.AllowUserToResizeColumns = false; this.historyGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle39; this.historyGrid.BackgroundColor = System.Drawing.Color.White; - 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.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle40.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle40.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle40.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle40.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle40.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle40.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle40; this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_SID, @@ -557,11 +578,11 @@ this.historyGrid.Name = "historyGrid"; this.historyGrid.ReadOnly = true; this.historyGrid.RowHeadersVisible = false; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black; - this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle41.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle41.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle41.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle41.SelectionForeColor = System.Drawing.Color.Black; + this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle41; this.historyGrid.RowTemplate.Height = 55; this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -584,6 +605,17 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "毛剥"; // + // maoTotal + // + this.maoTotal.AutoSize = true; + this.maoTotal.Font = new System.Drawing.Font("宋体", 18F); + this.maoTotal.ForeColor = System.Drawing.Color.Red; + this.maoTotal.Location = new System.Drawing.Point(312, -5); + this.maoTotal.Name = "maoTotal"; + this.maoTotal.Size = new System.Drawing.Size(22, 24); + this.maoTotal.TabIndex = 53; + this.maoTotal.Text = "0"; + // // label3 // this.label3.AutoSize = true; @@ -594,6 +626,16 @@ this.label3.TabIndex = 52; this.label3.Text = "毛剥"; // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("宋体", 15F); + this.label6.Location = new System.Drawing.Point(207, -1); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(109, 20); + this.label6.TabIndex = 52; + this.label6.Text = "已宰合计:"; + // // maoScrollBar // this.maoScrollBar.Location = new System.Drawing.Point(373, 35); @@ -607,17 +649,17 @@ this.maoGridView.AllowUserToDeleteRows = false; this.maoGridView.AllowUserToResizeColumns = false; this.maoGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle42; this.maoGridView.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle43.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle43; this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.M_OrderDetail_ID, @@ -631,11 +673,11 @@ this.maoGridView.Name = "maoGridView"; this.maoGridView.ReadOnly = true; this.maoGridView.RowHeadersVisible = false; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.Color.Black; - this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle44.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle44.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle44.SelectionForeColor = System.Drawing.Color.Black; + this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle44; this.maoGridView.RowTemplate.Height = 65; this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -769,48 +811,6 @@ this.isPrintCheckBox.Text = "打印条码"; this.isPrintCheckBox.UseVisualStyleBackColor = true; // - // maoTotal - // - this.maoTotal.AutoSize = true; - this.maoTotal.Font = new System.Drawing.Font("宋体", 18F); - this.maoTotal.ForeColor = System.Drawing.Color.Red; - this.maoTotal.Location = new System.Drawing.Point(312, -5); - this.maoTotal.Name = "maoTotal"; - this.maoTotal.Size = new System.Drawing.Size(22, 24); - this.maoTotal.TabIndex = 53; - this.maoTotal.Text = "0"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("宋体", 15F); - this.label6.Location = new System.Drawing.Point(207, -1); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(109, 20); - this.label6.TabIndex = 52; - this.label6.Text = "已宰合计:"; - // - // tangTotal - // - this.tangTotal.AutoSize = true; - this.tangTotal.Font = new System.Drawing.Font("宋体", 18F); - this.tangTotal.ForeColor = System.Drawing.Color.Red; - this.tangTotal.Location = new System.Drawing.Point(312, -5); - this.tangTotal.Name = "tangTotal"; - this.tangTotal.Size = new System.Drawing.Size(22, 24); - this.tangTotal.TabIndex = 55; - this.tangTotal.Text = "0"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("宋体", 15F); - this.label8.Location = new System.Drawing.Point(207, -1); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(109, 20); - this.label8.TabIndex = 54; - this.label8.Text = "已宰合计:"; - // // DataViewForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/WeighAndGrading/GradeFrom.Designer.cs b/WeighAndGrading/GradeFrom.Designer.cs index ba7ad2d..d94d044 100644 --- a/WeighAndGrading/GradeFrom.Designer.cs +++ b/WeighAndGrading/GradeFrom.Designer.cs @@ -75,6 +75,17 @@ this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); this.label12 = new System.Windows.Forms.Label(); this.historyGrid = new BWP.WinFormControl.UDataGridView(); + this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_OrderIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Technics_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.isPrintCheckBox = new System.Windows.Forms.CheckBox(); this.printBtn = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); @@ -93,17 +104,8 @@ this.btnStartWeight = new System.Windows.Forms.Button(); this.btnStopWeight = new System.Windows.Forms.Button(); this.dataConfirmBtn = new System.Windows.Forms.Button(); - this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_OrderIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Technics_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.batchSelect = new BWP.WinFormControl.UComboBox(); + this.label3 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit(); this.groupBox2.SuspendLayout(); @@ -529,6 +531,97 @@ this.historyGrid.TabIndex = 0; this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick); // + // H_SID + // + this.H_SID.DataPropertyName = "SID"; + this.H_SID.HeaderText = "SID"; + this.H_SID.Name = "H_SID"; + this.H_SID.ReadOnly = true; + this.H_SID.Visible = false; + // + // H_Livestock_ID + // + this.H_Livestock_ID.HeaderText = "Livestock_ID"; + this.H_Livestock_ID.Name = "H_Livestock_ID"; + this.H_Livestock_ID.ReadOnly = true; + this.H_Livestock_ID.Visible = false; + // + // H_IsDrop + // + this.H_IsDrop.DataPropertyName = "IsDrop"; + this.H_IsDrop.HeaderText = "IsDrop"; + this.H_IsDrop.Name = "H_IsDrop"; + this.H_IsDrop.ReadOnly = true; + this.H_IsDrop.Visible = false; + // + // H_Technics + // + this.H_Technics.DataPropertyName = "Technics"; + this.H_Technics.HeaderText = "Technics"; + this.H_Technics.Name = "H_Technics"; + this.H_Technics.ReadOnly = true; + this.H_Technics.Visible = false; + // + // H_OrderIndex + // + this.H_OrderIndex.DataPropertyName = "OrderIndex"; + this.H_OrderIndex.HeaderText = "OrderIndex"; + this.H_OrderIndex.Name = "H_OrderIndex"; + this.H_OrderIndex.ReadOnly = true; + this.H_OrderIndex.Visible = false; + // + // H_Index + // + this.H_Index.DataPropertyName = "Index"; + this.H_Index.HeaderText = "序号"; + this.H_Index.Name = "H_Index"; + this.H_Index.ReadOnly = true; + this.H_Index.Width = 65; + // + // H_Order + // + this.H_Order.DataPropertyName = "Order"; + this.H_Order.HeaderText = "顺序"; + this.H_Order.Name = "H_Order"; + this.H_Order.ReadOnly = true; + this.H_Order.Width = 65; + // + // H_Technics_Name + // + this.H_Technics_Name.DataPropertyName = "Technics_Name"; + this.H_Technics_Name.HeaderText = "工艺"; + this.H_Technics_Name.Name = "H_Technics_Name"; + this.H_Technics_Name.ReadOnly = true; + this.H_Technics_Name.Width = 65; + // + // H_Livestock_Name + // + this.H_Livestock_Name.DataPropertyName = "Livestock_Name"; + this.H_Livestock_Name.HeaderText = "级别"; + this.H_Livestock_Name.Name = "H_Livestock_Name"; + this.H_Livestock_Name.ReadOnly = true; + this.H_Livestock_Name.Width = 110; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle11.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + this.H_Weight.Width = 70; + // + // H_Time + // + this.H_Time.DataPropertyName = "Time"; + dataGridViewCellStyle12.Format = "HH:mm:ss"; + dataGridViewCellStyle12.NullValue = null; + this.H_Time.DefaultCellStyle = dataGridViewCellStyle12; + this.H_Time.HeaderText = "时间"; + this.H_Time.Name = "H_Time"; + this.H_Time.ReadOnly = true; + // // isPrintCheckBox // this.isPrintCheckBox.AutoSize = true; @@ -727,102 +820,36 @@ this.dataConfirmBtn.UseVisualStyleBackColor = true; this.dataConfirmBtn.Click += new System.EventHandler(this.dataConfirmBtn_Click); // - // H_SID - // - this.H_SID.DataPropertyName = "SID"; - this.H_SID.HeaderText = "SID"; - this.H_SID.Name = "H_SID"; - this.H_SID.ReadOnly = true; - this.H_SID.Visible = false; - // - // H_Livestock_ID - // - this.H_Livestock_ID.HeaderText = "Livestock_ID"; - this.H_Livestock_ID.Name = "H_Livestock_ID"; - this.H_Livestock_ID.ReadOnly = true; - this.H_Livestock_ID.Visible = false; - // - // H_IsDrop - // - this.H_IsDrop.DataPropertyName = "IsDrop"; - this.H_IsDrop.HeaderText = "IsDrop"; - this.H_IsDrop.Name = "H_IsDrop"; - this.H_IsDrop.ReadOnly = true; - this.H_IsDrop.Visible = false; - // - // H_Technics - // - this.H_Technics.DataPropertyName = "Technics"; - this.H_Technics.HeaderText = "Technics"; - this.H_Technics.Name = "H_Technics"; - this.H_Technics.ReadOnly = true; - this.H_Technics.Visible = false; - // - // H_OrderIndex - // - this.H_OrderIndex.DataPropertyName = "OrderIndex"; - this.H_OrderIndex.HeaderText = "OrderIndex"; - this.H_OrderIndex.Name = "H_OrderIndex"; - this.H_OrderIndex.ReadOnly = true; - this.H_OrderIndex.Visible = false; - // - // H_Index - // - this.H_Index.DataPropertyName = "Index"; - this.H_Index.HeaderText = "序号"; - this.H_Index.Name = "H_Index"; - this.H_Index.ReadOnly = true; - this.H_Index.Width = 65; - // - // H_Order - // - this.H_Order.DataPropertyName = "Order"; - this.H_Order.HeaderText = "顺序"; - this.H_Order.Name = "H_Order"; - this.H_Order.ReadOnly = true; - this.H_Order.Width = 65; - // - // H_Technics_Name - // - this.H_Technics_Name.DataPropertyName = "Technics_Name"; - this.H_Technics_Name.HeaderText = "工艺"; - this.H_Technics_Name.Name = "H_Technics_Name"; - this.H_Technics_Name.ReadOnly = true; - this.H_Technics_Name.Width = 65; - // - // H_Livestock_Name - // - this.H_Livestock_Name.DataPropertyName = "Livestock_Name"; - this.H_Livestock_Name.HeaderText = "级别"; - this.H_Livestock_Name.Name = "H_Livestock_Name"; - this.H_Livestock_Name.ReadOnly = true; - this.H_Livestock_Name.Width = 110; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle11.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - this.H_Weight.Width = 70; - // - // H_Time - // - this.H_Time.DataPropertyName = "Time"; - dataGridViewCellStyle12.Format = "HH:mm:ss"; - dataGridViewCellStyle12.NullValue = null; - this.H_Time.DefaultCellStyle = dataGridViewCellStyle12; - this.H_Time.HeaderText = "时间"; - this.H_Time.Name = "H_Time"; - this.H_Time.ReadOnly = true; + // batchSelect + // + this.batchSelect.CodeArgs = null; + this.batchSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.batchSelect.EnableTopItem = true; + this.batchSelect.Font = new System.Drawing.Font("宋体", 14F); + this.batchSelect.FormattingEnabled = true; + this.batchSelect.Location = new System.Drawing.Point(603, 8); + this.batchSelect.Name = "batchSelect"; + this.batchSelect.Range = 10; + this.batchSelect.Size = new System.Drawing.Size(204, 30); + this.batchSelect.TabIndex = 44; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 14F); + this.label3.Location = new System.Drawing.Point(548, 14); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(47, 19); + this.label3.TabIndex = 43; + this.label3.Text = "批次"; // // GradeFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1490, 845); + this.Controls.Add(this.batchSelect); + this.Controls.Add(this.label3); this.Controls.Add(this.dataConfirmBtn); this.Controls.Add(this.btnStopWeight); this.Controls.Add(this.btnStartWeight); @@ -937,5 +964,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; + private BWP.WinFormControl.UComboBox batchSelect; + private System.Windows.Forms.Label label3; } } \ No newline at end of file diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index b3fde3f..0bf9772 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -77,6 +77,7 @@ namespace WeighAndGrading maoGridView.DataSource = null; historyGrid.AutoGenerateColumns = false; historyGrid.DataSource = null; + batchSelect.Init("BaseInfoRpc/GetProductBatchList"); tangList = new List(); maoList = new List(); noLivestockList = new ConcurrentQueue(); @@ -232,6 +233,8 @@ namespace WeighAndGrading private void syncBtn_Click(object sender, EventArgs e) { + if (batchSelect.LongValue == null) + throw new Exception("请先选择批次"); if (butcherTimeInput.Date.Value == new DateTime(2018, 3, 15)) LocalGradeAndWeightBL.UpdateHistory(butcherTimeInput.Date.Value); orderMaxIdx = LocalGradeAndWeightBL.GetOrderIdx(butcherTimeInput.Date.Value); @@ -262,6 +265,7 @@ namespace WeighAndGrading { onWorking = !onWorking; butcherTimeInput.Enabled = !onWorking; + batchSelect.Enabled = !onWorking; if (onWorking) { syncBtn.BackColor = Color.FromArgb(15, 215, 107); @@ -752,6 +756,7 @@ namespace WeighAndGrading maxIndex++; var entity = new GradeAndWeight_Detail(); entity.Index = maxIndex; + entity.ProductBatch_ID = batchSelect.LongValue; if (currentRow != null) { entity.OrderDetail_ID = currentRow.OrderDetail_ID; @@ -847,6 +852,7 @@ namespace WeighAndGrading maxIndex++; var entity = new GradeAndWeight_Detail(); entity.Index = maxIndex; + entity.ProductBatch_ID = batchSelect.LongValue; entity.Weight = (entity.Weight ?? 0) + weight; entity.Time = DateTime.Now; entity.Date = butcherTimeInput.Date.Value;