diff --git a/BO/BO.csproj b/BO/BO.csproj index f79dbc0..c76965b 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -69,6 +69,7 @@ + diff --git a/BO/BO/BaseInfo/Farmer.cs b/BO/BO/BaseInfo/Farmer.cs new file mode 100644 index 0000000..4d6cf0d --- /dev/null +++ b/BO/BO/BaseInfo/Farmer.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO.BaseInfo +{ + public class Farmer + { + public string Name { get; set; } + + public string IDCard { get; set; } + + public string Tel { get; set; } + + public string Address { get; set; } + } +} diff --git a/BO/BO/Bill/WeightBill/WeightBill.cs b/BO/BO/Bill/WeightBill/WeightBill.cs index b1f4f32..7e1f2a1 100644 --- a/BO/BO/Bill/WeightBill/WeightBill.cs +++ b/BO/BO/Bill/WeightBill/WeightBill.cs @@ -80,6 +80,14 @@ namespace BO.BO public string Remark { get; set; } + public string Farmer_Name { get; set; } + + public string Farmer_IDCard { get; set; } + + public string Farmer_Tel { get; set; } + + public string Farmer_Address { get; set; } + private List _details = new List(); public List Details { get { return _details; } set { _details = value; } } diff --git a/BO/Utils/BillRpc/WeightBillRpc.cs b/BO/Utils/BillRpc/WeightBillRpc.cs index 680cb42..b86f574 100644 --- a/BO/Utils/BillRpc/WeightBillRpc.cs +++ b/BO/Utils/BillRpc/WeightBillRpc.cs @@ -1,4 +1,5 @@ using BO.BO; +using BO.BO.BaseInfo; using Forks.JsonRpc.Client; using Forks.JsonRpc.Client.Data; using System; @@ -118,5 +119,11 @@ namespace BO.Utils.BillRpc const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetSupplierBankAccount"; return RpcFacade.Call(method, id); } + + public static Farmer GetFarmerInfo(long id) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetFarmerInfo"; + return serializer.Deserialize(RpcFacade.Call(method, id)); + } } } diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs index f64f8e0..d5823f3 100644 --- a/ButcherWeight/WeightForm.Designer.cs +++ b/ButcherWeight/WeightForm.Designer.cs @@ -62,6 +62,14 @@ this.readPiBtn = new System.Windows.Forms.Button(); this.readMaoBtn = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); + this.yzhAddress = new System.Windows.Forms.Label(); + this.yzhTel = new System.Windows.Forms.Label(); + this.yzhName = new System.Windows.Forms.Label(); + this.yzhIDCard = new System.Windows.Forms.Label(); + this.label29 = new System.Windows.Forms.Label(); + this.label30 = new System.Windows.Forms.Label(); + this.label27 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); this.bankAccountLabel = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label(); this.discontInput = new System.Windows.Forms.TextBox(); @@ -302,6 +310,14 @@ // panel2 // this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel2.Controls.Add(this.yzhAddress); + this.panel2.Controls.Add(this.yzhTel); + this.panel2.Controls.Add(this.yzhName); + this.panel2.Controls.Add(this.yzhIDCard); + this.panel2.Controls.Add(this.label29); + this.panel2.Controls.Add(this.label30); + this.panel2.Controls.Add(this.label27); + this.panel2.Controls.Add(this.label28); this.panel2.Controls.Add(this.bankAccountLabel); this.panel2.Controls.Add(this.label22); this.panel2.Controls.Add(this.discontInput); @@ -342,9 +358,85 @@ this.panel2.Controls.Add(this.tableLayoutPanel2); this.panel2.Location = new System.Drawing.Point(13, 115); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1251, 170); + this.panel2.Size = new System.Drawing.Size(1251, 205); this.panel2.TabIndex = 2; // + // yzhAddress + // + this.yzhAddress.AutoSize = true; + this.yzhAddress.Font = new System.Drawing.Font("宋体", 11F); + this.yzhAddress.Location = new System.Drawing.Point(850, 176); + this.yzhAddress.Name = "yzhAddress"; + this.yzhAddress.Size = new System.Drawing.Size(0, 15); + this.yzhAddress.TabIndex = 53; + // + // yzhTel + // + this.yzhTel.AutoSize = true; + this.yzhTel.Font = new System.Drawing.Font("宋体", 14F); + this.yzhTel.Location = new System.Drawing.Point(595, 176); + this.yzhTel.Name = "yzhTel"; + this.yzhTel.Size = new System.Drawing.Size(0, 19); + this.yzhTel.TabIndex = 52; + // + // yzhName + // + this.yzhName.AutoSize = true; + this.yzhName.Font = new System.Drawing.Font("宋体", 14F); + this.yzhName.Location = new System.Drawing.Point(104, 176); + this.yzhName.Name = "yzhName"; + this.yzhName.Size = new System.Drawing.Size(0, 19); + this.yzhName.TabIndex = 51; + // + // yzhIDCard + // + this.yzhIDCard.AutoSize = true; + this.yzhIDCard.Font = new System.Drawing.Font("宋体", 11F); + this.yzhIDCard.Location = new System.Drawing.Point(344, 176); + this.yzhIDCard.Name = "yzhIDCard"; + this.yzhIDCard.Size = new System.Drawing.Size(0, 15); + this.yzhIDCard.TabIndex = 50; + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Font = new System.Drawing.Font("宋体", 14F); + this.label29.Location = new System.Drawing.Point(757, 176); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(47, 19); + this.label29.TabIndex = 49; + this.label29.Text = "地址"; + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Font = new System.Drawing.Font("宋体", 14F); + this.label30.Location = new System.Drawing.Point(501, 176); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(77, 19); + this.label30.TabIndex = 48; + this.label30.Text = "手 机"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Font = new System.Drawing.Font("宋体", 14F); + this.label27.Location = new System.Drawing.Point(251, 176); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(85, 19); + this.label27.TabIndex = 45; + this.label27.Text = "身份证号"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Font = new System.Drawing.Font("宋体", 14F); + this.label28.Location = new System.Drawing.Point(6, 176); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(66, 19); + this.label28.TabIndex = 44; + this.label28.Text = "养殖户"; + // // bankAccountLabel // this.bankAccountLabel.Font = new System.Drawing.Font("宋体", 14F); @@ -764,9 +856,9 @@ this.panel3.Controls.Add(this.label3); this.panel3.Controls.Add(this.label18); this.panel3.Controls.Add(this.weightGrid); - this.panel3.Location = new System.Drawing.Point(12, 318); + this.panel3.Location = new System.Drawing.Point(12, 355); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(402, 238); + this.panel3.Size = new System.Drawing.Size(402, 194); this.panel3.TabIndex = 3; // // farmerSelect @@ -819,7 +911,7 @@ this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle25; this.farmerGrid.RowTemplate.Height = 23; this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.farmerGrid.Size = new System.Drawing.Size(400, 112); + this.farmerGrid.Size = new System.Drawing.Size(400, 68); this.farmerGrid.TabIndex = 8; this.farmerGrid.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.farmerGrid_CellMouseDown); // @@ -998,9 +1090,9 @@ // this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel4.Controls.Add(this.houseGird); - this.panel4.Location = new System.Drawing.Point(438, 318); + this.panel4.Location = new System.Drawing.Point(438, 355); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(402, 237); + this.panel4.Size = new System.Drawing.Size(402, 193); this.panel4.TabIndex = 3; // // houseGird @@ -1112,7 +1204,7 @@ this.S_Index, this.S_AbnormalItem_Name, this.S_Number}); - this.abnormalGrid.Location = new System.Drawing.Point(862, 318); + this.abnormalGrid.Location = new System.Drawing.Point(862, 355); this.abnormalGrid.MultiSelect = false; this.abnormalGrid.Name = "abnormalGrid"; this.abnormalGrid.RowHeadersVisible = false; @@ -1121,7 +1213,7 @@ this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle37; this.abnormalGrid.RowTemplate.Height = 23; this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.abnormalGrid.Size = new System.Drawing.Size(400, 237); + this.abnormalGrid.Size = new System.Drawing.Size(400, 194); this.abnormalGrid.TabIndex = 1; // // S_ID @@ -1332,7 +1424,7 @@ this.label15.AutoSize = true; this.label15.Font = new System.Drawing.Font("宋体", 15F); this.label15.ForeColor = System.Drawing.Color.Red; - this.label15.Location = new System.Drawing.Point(9, 297); + this.label15.Location = new System.Drawing.Point(9, 334); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(89, 20); this.label15.TabIndex = 6; @@ -1343,7 +1435,7 @@ this.label16.AutoSize = true; this.label16.Font = new System.Drawing.Font("宋体", 15F); this.label16.ForeColor = System.Drawing.Color.Red; - this.label16.Location = new System.Drawing.Point(434, 297); + this.label16.Location = new System.Drawing.Point(434, 334); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(89, 20); this.label16.TabIndex = 7; @@ -1354,7 +1446,7 @@ this.label17.AutoSize = true; this.label17.Font = new System.Drawing.Font("宋体", 15F); this.label17.ForeColor = System.Drawing.Color.Red; - this.label17.Location = new System.Drawing.Point(858, 297); + this.label17.Location = new System.Drawing.Point(858, 334); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(89, 20); this.label17.TabIndex = 8; @@ -1403,7 +1495,7 @@ // queryBtn // this.queryBtn.Font = new System.Drawing.Font("宋体", 13F); - this.queryBtn.Location = new System.Drawing.Point(711, 559); + this.queryBtn.Location = new System.Drawing.Point(708, 556); this.queryBtn.Name = "queryBtn"; this.queryBtn.Size = new System.Drawing.Size(80, 35); this.queryBtn.TabIndex = 43; @@ -1454,7 +1546,7 @@ // viewDetailBtn // this.viewDetailBtn.Font = new System.Drawing.Font("宋体", 15F); - this.viewDetailBtn.Location = new System.Drawing.Point(104, 287); + this.viewDetailBtn.Location = new System.Drawing.Point(104, 324); this.viewDetailBtn.Name = "viewDetailBtn"; this.viewDetailBtn.Size = new System.Drawing.Size(80, 30); this.viewDetailBtn.TabIndex = 44; @@ -1652,5 +1744,13 @@ private System.Windows.Forms.Label label22; private BWP.WinFormControl.UDatePicker uDatePicker1; private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.Label yzhAddress; + private System.Windows.Forms.Label yzhTel; + private System.Windows.Forms.Label yzhName; + private System.Windows.Forms.Label yzhIDCard; } } \ No newline at end of file diff --git a/ButcherWeight/WeightForm.cs b/ButcherWeight/WeightForm.cs index 4d46de8..fba5787 100644 --- a/ButcherWeight/WeightForm.cs +++ b/ButcherWeight/WeightForm.cs @@ -235,9 +235,20 @@ namespace ButcherWeight private void farmerSelect_SelectedIndexChanged(object sender, EventArgs e) { if (farmerSelect.IsEmpty) + { + yzhName.Text = null; + yzhAddress.Text = null; + yzhTel.Text = null; + yzhAddress.Text = null; return; + } var detail = new WeightBill_FarmerDetail(); detail.Farmer_ID = farmerSelect.LongValue.Value; + var info = WeightBillRpc.GetFarmerInfo(detail.Farmer_ID.Value); + yzhName.Text = info.Name; + yzhIDCard.Text = info.IDCard; + yzhTel.Text = info.Tel; + yzhAddress.Text = info.Address; if (_farmerDetails.Any(x => x.Farmer_ID == detail.Farmer_ID)) return; detail.Farmer_Name = farmerSelect.DisplayValue; @@ -268,6 +279,10 @@ namespace ButcherWeight Dmo.LiveVarieties_Name = liveVarietiesSelect.DisplayValue; Dmo.HogGrade_ID = hogGradeSelect.LongValue; Dmo.HogGrade_Name = hogGradeSelect.DisplayValue; + Dmo.Farmer_Name = yzhName.Text; + Dmo.Farmer_IDCard = yzhIDCard.Text; + Dmo.Farmer_Tel = yzhTel.Text; + Dmo.Farmer_Address = yzhAddress.Text; if (!string.IsNullOrEmpty(penWeightInput.Text)) { decimal pw = 0; @@ -394,6 +409,18 @@ namespace ButcherWeight if (!string.IsNullOrEmpty(Dmo.Remark)) remarkInput.Text = Dmo.Remark; + if (!string.IsNullOrEmpty(Dmo.Farmer_Name)) + yzhName.Text = Dmo.Farmer_Name; + + if (!string.IsNullOrEmpty(Dmo.Farmer_IDCard)) + yzhIDCard.Text = Dmo.Farmer_IDCard; + + if (!string.IsNullOrEmpty(Dmo.Farmer_Tel)) + yzhTel.Text = Dmo.Farmer_Tel; + + if (!string.IsNullOrEmpty(Dmo.Farmer_Address)) + yzhAddress.Text = Dmo.Farmer_Address; + _farmerDetails = Dmo.FarmerDetails.Where(x => !x.DeleteState).ToList(); _details = Dmo.Details.ToList(); _fDelete.Clear(); @@ -425,6 +452,10 @@ namespace ButcherWeight testTimeInput.Date = null; testManInput.Text = null; remarkInput.Text = null; + yzhName.Text = null; + yzhIDCard.Text = null; + yzhTel.Text = null; + yzhAddress.Text = null; farmerGrid.DataSource = null; weightGrid.DataSource = null; } @@ -461,7 +492,7 @@ namespace ButcherWeight private void queryBtn_Click(object sender, EventArgs e) { - dmoList = WeightBillRpc.GetWeightBillList(qCarSelect.LongValue, qSupplierSelect.LongValue,uDatePicker1.Date.Value); + dmoList = WeightBillRpc.GetWeightBillList(qCarSelect.LongValue, qSupplierSelect.LongValue, uDatePicker1.Date.Value); BindWeightBill(); } @@ -555,6 +586,17 @@ namespace ButcherWeight { if (Dmo.ID == 0) throw new Exception("请先保存"); + if (string.IsNullOrEmpty(Dmo.BankAccount)) + throw new Exception("银行卡号不能为空"); + if (string.IsNullOrEmpty(Dmo.Farmer_Name)) + throw new Exception("养殖户不能为空"); + if (string.IsNullOrEmpty(Dmo.Farmer_IDCard)) + throw new Exception("养殖户身份证号不能为空"); + if (string.IsNullOrEmpty(Dmo.Farmer_Tel)) + throw new Exception("养殖户电话不能为空"); + if (string.IsNullOrEmpty(Dmo.Farmer_Address)) + throw new Exception("养殖户地址不能为空"); + return; var entity = WeightBillRpc.GetPrintWeightBill(Dmo.ID); if (string.IsNullOrEmpty(entity.Supplier_Name)) throw new Exception("缺少供应商信息,打印失败"); @@ -583,7 +625,6 @@ namespace ButcherWeight bankAccountLabel.Text = string.Empty; else bankAccountLabel.Text = WeightBillRpc.GetSupplierBankAccount(supplierSelect.LongValue.Value); - bankAccountLabel.Refresh(); } } } \ No newline at end of file diff --git a/MaterialRequisition/MaterialRequisitionForm.Designer.cs b/MaterialRequisition/MaterialRequisitionForm.Designer.cs index fca8b97..9aac3b6 100644 --- a/MaterialRequisition/MaterialRequisitionForm.Designer.cs +++ b/MaterialRequisition/MaterialRequisitionForm.Designer.cs @@ -28,20 +28,35 @@ /// 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 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 dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = 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 dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = 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 dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dataGridViewSubmited = new BWP.WinFormControl.UDataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.LossWeightColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.dataGridViewUnSubmit = new BWP.WinFormControl.UDataGridView(); + this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.un条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.un编码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.un名称 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.un重量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.un单位 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.un数量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btnCommit = new System.Windows.Forms.Button(); this.btnDelete = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); @@ -70,21 +85,7 @@ this.label2 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); - this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.un条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.un编码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.un名称 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.un重量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.un单位 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.un数量 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.LossWeightColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.readBtn = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -141,19 +142,19 @@ this.dataGridViewSubmited.AllowUserToDeleteRows = false; this.dataGridViewSubmited.AllowUserToResizeColumns = false; this.dataGridViewSubmited.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.dataGridViewSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.dataGridViewSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewSubmited.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridViewSubmited.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.dataGridViewSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridViewSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewSubmited.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridViewSubmited.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, @@ -169,19 +170,85 @@ this.dataGridViewSubmited.Name = "dataGridViewSubmited"; this.dataGridViewSubmited.ReadOnly = true; this.dataGridViewSubmited.RowHeadersVisible = false; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.dataGridViewSubmited.RowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.dataGridViewSubmited.RowsDefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewSubmited.RowTemplate.Height = 23; this.dataGridViewSubmited.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridViewSubmited.Size = new System.Drawing.Size(761, 177); this.dataGridViewSubmited.TabIndex = 2; // + // dataGridViewTextBoxColumn1 + // + this.dataGridViewTextBoxColumn1.DataPropertyName = "ID"; + this.dataGridViewTextBoxColumn1.HeaderText = "序号"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.ReadOnly = true; + this.dataGridViewTextBoxColumn1.Width = 80; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.dataGridViewTextBoxColumn2.DataPropertyName = "BarCode"; + this.dataGridViewTextBoxColumn2.HeaderText = "条码"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + this.dataGridViewTextBoxColumn2.Width = 65; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.DataPropertyName = "Goods_Code"; + this.dataGridViewTextBoxColumn3.HeaderText = "编码"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.ReadOnly = true; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.dataGridViewTextBoxColumn4.DataPropertyName = "Goods_Name"; + this.dataGridViewTextBoxColumn4.HeaderText = "名称"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + this.dataGridViewTextBoxColumn4.ReadOnly = true; + this.dataGridViewTextBoxColumn4.Width = 65; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.DataPropertyName = "Weight"; + dataGridViewCellStyle16.Format = "#0.######"; + this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle16; + this.dataGridViewTextBoxColumn5.HeaderText = "重量"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.ReadOnly = true; + // + // LossWeightColumn + // + this.LossWeightColumn.DataPropertyName = "LossWeight"; + dataGridViewCellStyle17.Format = "#0.######"; + this.LossWeightColumn.DefaultCellStyle = dataGridViewCellStyle17; + this.LossWeightColumn.HeaderText = "损耗"; + this.LossWeightColumn.Name = "LossWeightColumn"; + this.LossWeightColumn.ReadOnly = true; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.DataPropertyName = "Goods_MainUnit"; + this.dataGridViewTextBoxColumn6.HeaderText = "单位"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.ReadOnly = true; + // + // dataGridViewTextBoxColumn7 + // + this.dataGridViewTextBoxColumn7.DataPropertyName = "Number"; + this.dataGridViewTextBoxColumn7.HeaderText = "数量"; + this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; + this.dataGridViewTextBoxColumn7.ReadOnly = true; + // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.readBtn); this.groupBox1.Controls.Add(this.dataGridViewUnSubmit); this.groupBox1.Controls.Add(this.btnCommit); this.groupBox1.Controls.Add(this.btnDelete); @@ -198,20 +265,20 @@ this.dataGridViewUnSubmit.AllowUserToDeleteRows = false; this.dataGridViewUnSubmit.AllowUserToResizeColumns = false; this.dataGridViewUnSubmit.AllowUserToResizeRows = false; - dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.dataGridViewUnSubmit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.dataGridViewUnSubmit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.dataGridViewUnSubmit.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridViewUnSubmit.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.dataGridViewUnSubmit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + 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.dataGridViewUnSubmit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.dataGridViewUnSubmit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridViewUnSubmit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.U_ID, @@ -226,14 +293,70 @@ this.dataGridViewUnSubmit.Name = "dataGridViewUnSubmit"; this.dataGridViewUnSubmit.ReadOnly = true; this.dataGridViewUnSubmit.RowHeadersVisible = false; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.dataGridViewUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.dataGridViewUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewUnSubmit.RowTemplate.Height = 23; this.dataGridViewUnSubmit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridViewUnSubmit.Size = new System.Drawing.Size(761, 189); this.dataGridViewUnSubmit.TabIndex = 1; // + // U_ID + // + this.U_ID.DataPropertyName = "ID"; + this.U_ID.HeaderText = "序号"; + this.U_ID.Name = "U_ID"; + this.U_ID.ReadOnly = true; + this.U_ID.Width = 80; + // + // un条码 + // + this.un条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.un条码.DataPropertyName = "BarCode"; + this.un条码.HeaderText = "条码"; + this.un条码.Name = "un条码"; + this.un条码.ReadOnly = true; + this.un条码.Width = 65; + // + // un编码 + // + this.un编码.DataPropertyName = "Goods_Code"; + this.un编码.HeaderText = "编码"; + this.un编码.Name = "un编码"; + this.un编码.ReadOnly = true; + // + // un名称 + // + this.un名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.un名称.DataPropertyName = "Goods_Name"; + this.un名称.HeaderText = "名称"; + this.un名称.Name = "un名称"; + this.un名称.ReadOnly = true; + this.un名称.Width = 65; + // + // un重量 + // + this.un重量.DataPropertyName = "Weight"; + dataGridViewCellStyle12.Format = "#0.######"; + this.un重量.DefaultCellStyle = dataGridViewCellStyle12; + this.un重量.HeaderText = "重量"; + this.un重量.Name = "un重量"; + this.un重量.ReadOnly = true; + // + // un单位 + // + this.un单位.DataPropertyName = "Goods_MainUnit"; + this.un单位.HeaderText = "单位"; + this.un单位.Name = "un单位"; + this.un单位.ReadOnly = true; + // + // un数量 + // + this.un数量.DataPropertyName = "Number"; + this.un数量.HeaderText = "数量"; + this.un数量.Name = "un数量"; + this.un数量.ReadOnly = true; + // // btnCommit // this.btnCommit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -523,126 +646,16 @@ this.label1.TabIndex = 0; this.label1.Text = "条码"; // - // U_ID + // readBtn // - this.U_ID.DataPropertyName = "ID"; - this.U_ID.HeaderText = "序号"; - this.U_ID.Name = "U_ID"; - this.U_ID.ReadOnly = true; - this.U_ID.Width = 80; - // - // un条码 - // - this.un条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.un条码.DataPropertyName = "BarCode"; - this.un条码.HeaderText = "条码"; - this.un条码.Name = "un条码"; - this.un条码.ReadOnly = true; - this.un条码.Width = 65; - // - // un编码 - // - this.un编码.DataPropertyName = "Goods_Code"; - this.un编码.HeaderText = "编码"; - this.un编码.Name = "un编码"; - this.un编码.ReadOnly = true; - // - // un名称 - // - this.un名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.un名称.DataPropertyName = "Goods_Name"; - this.un名称.HeaderText = "名称"; - this.un名称.Name = "un名称"; - this.un名称.ReadOnly = true; - this.un名称.Width = 65; - // - // un重量 - // - this.un重量.DataPropertyName = "Weight"; - dataGridViewCellStyle8.Format = "#0.######"; - this.un重量.DefaultCellStyle = dataGridViewCellStyle8; - this.un重量.HeaderText = "重量"; - this.un重量.Name = "un重量"; - this.un重量.ReadOnly = true; - // - // un单位 - // - this.un单位.DataPropertyName = "Goods_MainUnit"; - this.un单位.HeaderText = "单位"; - this.un单位.Name = "un单位"; - this.un单位.ReadOnly = true; - // - // un数量 - // - this.un数量.DataPropertyName = "Number"; - this.un数量.HeaderText = "数量"; - this.un数量.Name = "un数量"; - this.un数量.ReadOnly = true; - // - // dataGridViewTextBoxColumn1 - // - this.dataGridViewTextBoxColumn1.DataPropertyName = "ID"; - this.dataGridViewTextBoxColumn1.HeaderText = "序号"; - this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; - this.dataGridViewTextBoxColumn1.ReadOnly = true; - this.dataGridViewTextBoxColumn1.Width = 80; - // - // dataGridViewTextBoxColumn2 - // - this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.dataGridViewTextBoxColumn2.DataPropertyName = "BarCode"; - this.dataGridViewTextBoxColumn2.HeaderText = "条码"; - this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - this.dataGridViewTextBoxColumn2.ReadOnly = true; - this.dataGridViewTextBoxColumn2.Width = 65; - // - // dataGridViewTextBoxColumn3 - // - this.dataGridViewTextBoxColumn3.DataPropertyName = "Goods_Code"; - this.dataGridViewTextBoxColumn3.HeaderText = "编码"; - this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; - this.dataGridViewTextBoxColumn3.ReadOnly = true; - // - // dataGridViewTextBoxColumn4 - // - this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.dataGridViewTextBoxColumn4.DataPropertyName = "Goods_Name"; - this.dataGridViewTextBoxColumn4.HeaderText = "名称"; - this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; - this.dataGridViewTextBoxColumn4.ReadOnly = true; - this.dataGridViewTextBoxColumn4.Width = 65; - // - // dataGridViewTextBoxColumn5 - // - this.dataGridViewTextBoxColumn5.DataPropertyName = "Weight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle3; - this.dataGridViewTextBoxColumn5.HeaderText = "重量"; - this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; - this.dataGridViewTextBoxColumn5.ReadOnly = true; - // - // LossWeightColumn - // - this.LossWeightColumn.DataPropertyName = "LossWeight"; - dataGridViewCellStyle4.Format = "#0.######"; - this.LossWeightColumn.DefaultCellStyle = dataGridViewCellStyle4; - this.LossWeightColumn.HeaderText = "损耗"; - this.LossWeightColumn.Name = "LossWeightColumn"; - this.LossWeightColumn.ReadOnly = true; - // - // dataGridViewTextBoxColumn6 - // - this.dataGridViewTextBoxColumn6.DataPropertyName = "Goods_MainUnit"; - this.dataGridViewTextBoxColumn6.HeaderText = "单位"; - this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; - this.dataGridViewTextBoxColumn6.ReadOnly = true; - // - // dataGridViewTextBoxColumn7 - // - this.dataGridViewTextBoxColumn7.DataPropertyName = "Number"; - this.dataGridViewTextBoxColumn7.HeaderText = "数量"; - this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; - this.dataGridViewTextBoxColumn7.ReadOnly = true; + this.readBtn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.readBtn.Location = new System.Drawing.Point(243, 21); + this.readBtn.Name = "readBtn"; + this.readBtn.Size = new System.Drawing.Size(75, 35); + this.readBtn.TabIndex = 2; + this.readBtn.Text = "读入"; + this.readBtn.UseVisualStyleBackColor = true; + this.readBtn.Click += new System.EventHandler(this.readBtn_Click); // // MaterialRequisitionForm // @@ -729,6 +742,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn un重量; private System.Windows.Forms.DataGridViewTextBoxColumn un单位; private System.Windows.Forms.DataGridViewTextBoxColumn un数量; + private System.Windows.Forms.Button readBtn; } } diff --git a/MaterialRequisition/MaterialRequisitionForm.cs b/MaterialRequisition/MaterialRequisitionForm.cs index f507575..94df1b9 100644 --- a/MaterialRequisition/MaterialRequisitionForm.cs +++ b/MaterialRequisition/MaterialRequisitionForm.cs @@ -519,11 +519,11 @@ namespace MaterialRequisition this.Invoke(new Action(delegate() { lblChengZhong.Text = string.Format(format, decimal.Parse(str)); - if (str != "0") - { - //AddWeightDetail(decimal.Parse(lblChengZhong.Text)); - doInsertUnSubmit(decimal.Parse(lblChengZhong.Text)); - } + //if (str != "0") + //{ + // //AddWeightDetail(decimal.Parse(lblChengZhong.Text)); + // //doInsertUnSubmit(decimal.Parse(lblChengZhong.Text)); + //} })); } else @@ -542,12 +542,12 @@ namespace MaterialRequisition { this.Invoke(new Action(delegate() { - //lblChengZhong.Text = string.Format(format, num); - if (str != "0") - { - doInsertUnSubmit(decimal.Parse(string.Format(format, num))); - //AddWeightDetail(decimal.Parse(string.Format(format, num))); - } + lblChengZhong.Text = string.Format(format, num); + //if (str != "0") + //{ + // //doInsertUnSubmit(decimal.Parse(string.Format(format, num))); + // //AddWeightDetail(decimal.Parse(string.Format(format, num))); + //} })); } } @@ -569,19 +569,36 @@ namespace MaterialRequisition { //称重 //找到称重为空条码不为空的 - var fd = unSubmitList.LastOrDefault(x => x.Weight == null); - if (fd == null) - { - //todo 记录一个异常 - // record.ID = unSumbitList.Max(x => x.ID) + 1; - // unSumbitList.Add(record); - } - else + var all = unSubmitList.Where(x => x.Weight == null); + if (all.Any()) { - RpcFacade.Call(BaseRpcUrl + "FillWeight", fd.ID, weight); - fd.Weight = weight; + var id = unSubmitList.Last().ID; + var ids = unSubmitList.Select(x => x.ID).ToList().Remove(id); + + RpcFacade.Call(BaseRpcUrl + "FillWeight", id, weight, ids); + foreach (var item in all) + { + if (item.ID == id) + item.Weight = weight; + else + item.Weight = 0; + } dataGridViewUnSubmit.Refresh(); } + + //var fd = unSubmitList.LastOrDefault(x => x.Weight == null); + //if (fd == null) + //{ + // //todo 记录一个异常 + // // record.ID = unSumbitList.Max(x => x.ID) + 1; + // // unSumbitList.Add(record); + //} + //else + //{ + // RpcFacade.Call(BaseRpcUrl + "FillWeight", fd.ID, weight); + // fd.Weight = weight; + // dataGridViewUnSubmit.Refresh(); + //} } } @@ -697,5 +714,13 @@ namespace MaterialRequisition unSubmitList.Remove(first); dataGridViewUnSubmit.Refresh(); } + + private void readBtn_Click(object sender, EventArgs e) + { + var weight = decimal.Parse(lblChengZhong.Text); + if (weight == 0) + throw new Exception("重量为0"); + doInsertUnSubmit(weight); + } } } diff --git a/MaterialRequisition/MaterialRequisitionForm.resx b/MaterialRequisition/MaterialRequisitionForm.resx index b1437dd..48e3364 100644 --- a/MaterialRequisition/MaterialRequisitionForm.resx +++ b/MaterialRequisition/MaterialRequisitionForm.resx @@ -117,49 +117,49 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True \ No newline at end of file