From cdf6fb54c142a3a7091fd25a29260c058bc405b0 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Tue, 10 Apr 2018 19:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/BO/BaseInfo/Farmer.cs | 2 + .../WeightBill/WeightBill_FarmerDetail.cs | 10 + BO/Utils/BillRpc/GradeAndWeightRpc.cs | 12 +- ButcherWeight/WeightForm.Designer.cs | 453 ++++++++---------- ButcherWeight/WeightForm.cs | 41 +- ButcherWeight/WeightForm.resx | 15 + WeighAndGrading/DataViewForm.cs | 2 +- WeighAndGrading/GradeFrom.cs | 19 +- WeighAndGrading/WeightGradePrint.cs | 18 +- 9 files changed, 255 insertions(+), 317 deletions(-) diff --git a/BO/BO/BaseInfo/Farmer.cs b/BO/BO/BaseInfo/Farmer.cs index 4d6cf0d..4871bdf 100644 --- a/BO/BO/BaseInfo/Farmer.cs +++ b/BO/BO/BaseInfo/Farmer.cs @@ -15,5 +15,7 @@ namespace BO.BO.BaseInfo public string Tel { get; set; } public string Address { get; set; } + + public string BankAccount { get; set; } } } diff --git a/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs index b0bc1b1..0fa9272 100644 --- a/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs +++ b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs @@ -18,5 +18,15 @@ namespace BO.BO public int? Number { get; set; } public decimal? Weight { get; set; } + + public decimal? Money { get; set; } + + public string Farmer_IDCard { get; set; } + + public string Farmer_Tel { get; set; } + + public string Farmer_Address { get; set; } + + public string Farmer_BankAccount { get; set; } } } diff --git a/BO/Utils/BillRpc/GradeAndWeightRpc.cs b/BO/Utils/BillRpc/GradeAndWeightRpc.cs index 24fce41..ba5e402 100644 --- a/BO/Utils/BillRpc/GradeAndWeightRpc.cs +++ b/BO/Utils/BillRpc/GradeAndWeightRpc.cs @@ -295,15 +295,19 @@ namespace BO.Utils.BillRpc } } - public static int GetTodayTotalCount(DateTime date) + public static int GetOrderIndex(DateTime date, GradeAndWeight_Detail detail) { var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); query.Columns.Add(DQSelectColumn.Count()); - query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field("Technics")), DQCondition.EQ("Date", date))); - + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Order", detail.Order), DQCondition.EQ("Date", date))); + if (detail.SID != 0) + query.Where.Conditions.Add(DQCondition.LessThanOrEqual("SID", detail.SID)); using (var session = LocalDmoSession.New()) { - return Convert.ToInt32(session.ExecuteScalar(query)); + var orderIdx = Convert.ToInt32(session.ExecuteScalar(query)); + if (detail.SID == 0) + orderIdx += 1; + return orderIdx; } } diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs index 14d38cf..720ab04 100644 --- a/ButcherWeight/WeightForm.Designer.cs +++ b/ButcherWeight/WeightForm.Designer.cs @@ -30,27 +30,28 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = 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 dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = 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 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 dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = 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 dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = 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 dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = 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 dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = 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 dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = 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(); @@ -62,14 +63,6 @@ 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(); @@ -108,7 +101,6 @@ this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.panel3 = new System.Windows.Forms.Panel(); this.farmerSelect = new BWP.WinFormControl.UComboBox(); this.farmerGrid = new System.Windows.Forms.DataGridView(); this.F_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -118,6 +110,11 @@ this.F_Farmer_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Money = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Farmer_IDCard = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Farmer_BankAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Farmer_Tel = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.F_Farmer_Address = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label3 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.weightGrid = new System.Windows.Forms.DataGridView(); @@ -128,7 +125,6 @@ this.D_MaoWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_PiWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.D_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.panel4 = new System.Windows.Forms.Panel(); this.houseGird = new System.Windows.Forms.DataGridView(); this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -178,10 +174,8 @@ this.label32 = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); - this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.farmerGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit(); - this.panel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.houseGird)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.billGrid)).BeginInit(); @@ -203,7 +197,7 @@ this.panel1.Controls.Add(this.readMaoBtn); this.panel1.Location = new System.Drawing.Point(12, 12); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1252, 95); + this.panel1.Size = new System.Drawing.Size(1252, 61); this.panel1.TabIndex = 1; // // enableCheckBox @@ -211,7 +205,7 @@ this.enableCheckBox.AutoCheck = false; this.enableCheckBox.AutoSize = true; this.enableCheckBox.Font = new System.Drawing.Font("宋体", 19F); - this.enableCheckBox.Location = new System.Drawing.Point(8, 60); + this.enableCheckBox.Location = new System.Drawing.Point(162, 13); this.enableCheckBox.Name = "enableCheckBox"; this.enableCheckBox.Size = new System.Drawing.Size(135, 30); this.enableCheckBox.TabIndex = 11; @@ -233,7 +227,7 @@ // exitBtn // this.exitBtn.Font = new System.Drawing.Font("宋体", 15F); - this.exitBtn.Location = new System.Drawing.Point(871, 0); + this.exitBtn.Location = new System.Drawing.Point(1011, 0); this.exitBtn.Name = "exitBtn"; this.exitBtn.Size = new System.Drawing.Size(101, 59); this.exitBtn.TabIndex = 4; @@ -244,7 +238,7 @@ // deleteBtn // this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); - this.deleteBtn.Location = new System.Drawing.Point(753, 0); + this.deleteBtn.Location = new System.Drawing.Point(893, 0); this.deleteBtn.Name = "deleteBtn"; this.deleteBtn.Size = new System.Drawing.Size(101, 59); this.deleteBtn.TabIndex = 5; @@ -255,7 +249,7 @@ // printBtn // this.printBtn.Font = new System.Drawing.Font("宋体", 15F); - this.printBtn.Location = new System.Drawing.Point(636, 0); + this.printBtn.Location = new System.Drawing.Point(776, 0); this.printBtn.Name = "printBtn"; this.printBtn.Size = new System.Drawing.Size(101, 59); this.printBtn.TabIndex = 8; @@ -266,7 +260,7 @@ // createBtn // this.createBtn.Font = new System.Drawing.Font("宋体", 15F); - this.createBtn.Location = new System.Drawing.Point(402, 0); + this.createBtn.Location = new System.Drawing.Point(542, 0); this.createBtn.Name = "createBtn"; this.createBtn.Size = new System.Drawing.Size(101, 59); this.createBtn.TabIndex = 3; @@ -277,7 +271,7 @@ // commitBtn // this.commitBtn.Font = new System.Drawing.Font("宋体", 15F); - this.commitBtn.Location = new System.Drawing.Point(519, 0); + this.commitBtn.Location = new System.Drawing.Point(659, 0); this.commitBtn.Name = "commitBtn"; this.commitBtn.Size = new System.Drawing.Size(101, 59); this.commitBtn.TabIndex = 3; @@ -289,7 +283,7 @@ // this.readPiBtn.Enabled = false; this.readPiBtn.Font = new System.Drawing.Font("宋体", 15F); - this.readPiBtn.Location = new System.Drawing.Point(286, 0); + this.readPiBtn.Location = new System.Drawing.Point(426, 0); this.readPiBtn.Name = "readPiBtn"; this.readPiBtn.Size = new System.Drawing.Size(101, 59); this.readPiBtn.TabIndex = 2; @@ -301,7 +295,7 @@ // this.readMaoBtn.Enabled = false; this.readMaoBtn.Font = new System.Drawing.Font("宋体", 15F); - this.readMaoBtn.Location = new System.Drawing.Point(169, 0); + this.readMaoBtn.Location = new System.Drawing.Point(309, 0); this.readMaoBtn.Name = "readMaoBtn"; this.readMaoBtn.Size = new System.Drawing.Size(101, 59); this.readMaoBtn.TabIndex = 1; @@ -312,14 +306,6 @@ // 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); @@ -358,87 +344,11 @@ this.panel2.Controls.Add(this.label8); this.panel2.Controls.Add(this.label7); this.panel2.Controls.Add(this.tableLayoutPanel2); - this.panel2.Location = new System.Drawing.Point(13, 115); + this.panel2.Location = new System.Drawing.Point(13, 78); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1251, 205); + this.panel2.Size = new System.Drawing.Size(1251, 174); 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); @@ -850,19 +760,6 @@ this.tableLayoutPanel2.Size = new System.Drawing.Size(492, 162); this.tableLayoutPanel2.TabIndex = 1; // - // panel3 - // - this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel3.Controls.Add(this.farmerSelect); - this.panel3.Controls.Add(this.farmerGrid); - 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, 355); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(402, 194); - this.panel3.TabIndex = 3; - // // farmerSelect // this.farmerSelect.CodeArgs = null; @@ -870,7 +767,7 @@ this.farmerSelect.EnableTopItem = true; this.farmerSelect.Font = new System.Drawing.Font("宋体", 12F); this.farmerSelect.FormattingEnabled = true; - this.farmerSelect.Location = new System.Drawing.Point(202, 93); + this.farmerSelect.Location = new System.Drawing.Point(218, 267); this.farmerSelect.Name = "farmerSelect"; this.farmerSelect.Range = 10; this.farmerSelect.Size = new System.Drawing.Size(135, 27); @@ -883,17 +780,17 @@ this.farmerGrid.AllowUserToDeleteRows = false; this.farmerGrid.AllowUserToResizeColumns = false; this.farmerGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22; + 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; - dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23; + 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[] { @@ -903,17 +800,22 @@ this.F_Index, this.F_Farmer_Name, this.F_Number, - this.F_Weight}); - this.farmerGrid.Location = new System.Drawing.Point(0, 124); + this.F_Weight, + this.F_Money, + this.F_Farmer_IDCard, + this.F_Farmer_BankAccount, + this.F_Farmer_Tel, + this.F_Farmer_Address}); + this.farmerGrid.Location = new System.Drawing.Point(11, 297); this.farmerGrid.MultiSelect = false; this.farmerGrid.Name = "farmerGrid"; this.farmerGrid.RowHeadersVisible = false; - dataGridViewCellStyle25.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle25.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle25; + 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.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle5; this.farmerGrid.RowTemplate.Height = 23; this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.farmerGrid.Size = new System.Drawing.Size(400, 68); + this.farmerGrid.Size = new System.Drawing.Size(1249, 113); this.farmerGrid.TabIndex = 8; this.farmerGrid.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.farmerGrid_CellMouseDown); // @@ -964,16 +866,56 @@ // F_Weight // this.F_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle24.Format = "#0.######"; - this.F_Weight.DefaultCellStyle = dataGridViewCellStyle24; + dataGridViewCellStyle3.Format = "#0.######"; + this.F_Weight.DefaultCellStyle = dataGridViewCellStyle3; this.F_Weight.HeaderText = "重量"; this.F_Weight.Name = "F_Weight"; // + // F_Money + // + this.F_Money.DataPropertyName = "Money"; + dataGridViewCellStyle4.Format = "#0.######"; + this.F_Money.DefaultCellStyle = dataGridViewCellStyle4; + this.F_Money.HeaderText = "棚前金额"; + this.F_Money.Name = "F_Money"; + // + // F_Farmer_IDCard + // + this.F_Farmer_IDCard.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.F_Farmer_IDCard.DataPropertyName = "Farmer_IDCard"; + this.F_Farmer_IDCard.HeaderText = "身份证号"; + this.F_Farmer_IDCard.Name = "F_Farmer_IDCard"; + this.F_Farmer_IDCard.ReadOnly = true; + // + // F_Farmer_BankAccount + // + this.F_Farmer_BankAccount.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.F_Farmer_BankAccount.DataPropertyName = "Farmer_BankAccount"; + this.F_Farmer_BankAccount.HeaderText = "银行卡号"; + this.F_Farmer_BankAccount.Name = "F_Farmer_BankAccount"; + this.F_Farmer_BankAccount.ReadOnly = true; + // + // F_Farmer_Tel + // + this.F_Farmer_Tel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.F_Farmer_Tel.DataPropertyName = "Farmer_Tel"; + this.F_Farmer_Tel.HeaderText = "手机"; + this.F_Farmer_Tel.Name = "F_Farmer_Tel"; + this.F_Farmer_Tel.ReadOnly = true; + // + // F_Farmer_Address + // + this.F_Farmer_Address.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.F_Farmer_Address.DataPropertyName = "Farmer_Address"; + this.F_Farmer_Address.HeaderText = "地址"; + this.F_Farmer_Address.Name = "F_Farmer_Address"; + this.F_Farmer_Address.ReadOnly = true; + // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("宋体", 15F); - this.label3.Location = new System.Drawing.Point(115, 96); + this.label3.Location = new System.Drawing.Point(131, 270); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(89, 20); this.label3.TabIndex = 9; @@ -984,7 +926,7 @@ this.label18.AutoSize = true; this.label18.Font = new System.Drawing.Font("宋体", 15F); this.label18.ForeColor = System.Drawing.Color.Red; - this.label18.Location = new System.Drawing.Point(-4, 96); + this.label18.Location = new System.Drawing.Point(12, 270); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(109, 20); this.label18.TabIndex = 7; @@ -996,17 +938,17 @@ this.weightGrid.AllowUserToDeleteRows = false; this.weightGrid.AllowUserToResizeColumns = false; this.weightGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle26.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle26; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; this.weightGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle27.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle27.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle27; + 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.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.weightGrid.ColumnHeadersHeight = 24; this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -1017,13 +959,13 @@ this.D_MaoWeight, this.D_PiWeight, this.D_Weight}); - this.weightGrid.Location = new System.Drawing.Point(0, 0); + this.weightGrid.Location = new System.Drawing.Point(16, 447); this.weightGrid.MultiSelect = false; this.weightGrid.Name = "weightGrid"; this.weightGrid.RowHeadersVisible = false; - dataGridViewCellStyle31.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle31.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle31; + dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle11; this.weightGrid.RowTemplate.Height = 23; this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.weightGrid.Size = new System.Drawing.Size(400, 90); @@ -1061,8 +1003,8 @@ // D_MaoWeight // this.D_MaoWeight.DataPropertyName = "MaoWeight"; - dataGridViewCellStyle28.Format = "#0.######"; - this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle8.Format = "#0.######"; + this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle8; this.D_MaoWeight.HeaderText = "毛重"; this.D_MaoWeight.Name = "D_MaoWeight"; this.D_MaoWeight.ReadOnly = true; @@ -1071,8 +1013,8 @@ // D_PiWeight // this.D_PiWeight.DataPropertyName = "PiWeight"; - dataGridViewCellStyle29.Format = "#0.######"; - this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle9.Format = "#0.######"; + this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle9; this.D_PiWeight.HeaderText = "皮重"; this.D_PiWeight.Name = "D_PiWeight"; this.D_PiWeight.ReadOnly = true; @@ -1081,39 +1023,30 @@ // D_Weight // this.D_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle30.Format = "#0.######"; - this.D_Weight.DefaultCellStyle = dataGridViewCellStyle30; + dataGridViewCellStyle10.Format = "#0.######"; + this.D_Weight.DefaultCellStyle = dataGridViewCellStyle10; this.D_Weight.HeaderText = "重量"; this.D_Weight.Name = "D_Weight"; this.D_Weight.ReadOnly = true; this.D_Weight.Width = 88; // - // panel4 - // - this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel4.Controls.Add(this.houseGird); - this.panel4.Location = new System.Drawing.Point(438, 355); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(402, 193); - this.panel4.TabIndex = 3; - // // houseGird // this.houseGird.AllowUserToAddRows = false; this.houseGird.AllowUserToDeleteRows = false; this.houseGird.AllowUserToResizeColumns = false; this.houseGird.AllowUserToResizeRows = false; - dataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle32; + dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12; this.houseGird.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.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle33; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.houseGird.ColumnHeadersHeight = 24; this.houseGird.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.houseGird.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -1123,13 +1056,13 @@ this.H_Index, this.H_LiveColonyHouse_Name, this.H_Number}); - this.houseGird.Location = new System.Drawing.Point(0, 0); + this.houseGird.Location = new System.Drawing.Point(443, 447); this.houseGird.MultiSelect = false; this.houseGird.Name = "houseGird"; this.houseGird.RowHeadersVisible = false; - dataGridViewCellStyle34.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle34; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle14; this.houseGird.RowTemplate.Height = 23; this.houseGird.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.houseGird.Size = new System.Drawing.Size(400, 90); @@ -1185,17 +1118,17 @@ this.abnormalGrid.AllowUserToDeleteRows = false; this.abnormalGrid.AllowUserToResizeColumns = false; this.abnormalGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35; + dataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15; this.abnormalGrid.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.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16; this.abnormalGrid.ColumnHeadersHeight = 24; this.abnormalGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.abnormalGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -1206,16 +1139,16 @@ this.S_Index, this.S_AbnormalItem_Name, this.S_Number}); - this.abnormalGrid.Location = new System.Drawing.Point(862, 355); + this.abnormalGrid.Location = new System.Drawing.Point(866, 445); this.abnormalGrid.MultiSelect = false; this.abnormalGrid.Name = "abnormalGrid"; this.abnormalGrid.RowHeadersVisible = false; - dataGridViewCellStyle37.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle37.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle37; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle17; this.abnormalGrid.RowTemplate.Height = 23; this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.abnormalGrid.Size = new System.Drawing.Size(400, 194); + this.abnormalGrid.Size = new System.Drawing.Size(400, 91); this.abnormalGrid.TabIndex = 1; // // S_ID @@ -1274,17 +1207,17 @@ this.billGrid.AllowUserToDeleteRows = false; this.billGrid.AllowUserToResizeColumns = false; this.billGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle38.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle38; + dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18; this.billGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle39.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle39.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle39.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle39.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle39.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle39; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19; this.billGrid.ColumnHeadersHeight = 24; this.billGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -1306,9 +1239,9 @@ this.billGrid.Name = "billGrid"; this.billGrid.ReadOnly = true; this.billGrid.RowHeadersVisible = false; - dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle42; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle22; this.billGrid.RowTemplate.Height = 23; this.billGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.billGrid.Size = new System.Drawing.Size(1250, 230); @@ -1389,8 +1322,8 @@ // M_Weight // this.M_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle40.Format = "#0.######"; - this.M_Weight.DefaultCellStyle = dataGridViewCellStyle40; + dataGridViewCellStyle20.Format = "#0.######"; + this.M_Weight.DefaultCellStyle = dataGridViewCellStyle20; this.M_Weight.HeaderText = "收购重量"; this.M_Weight.Name = "M_Weight"; this.M_Weight.ReadOnly = true; @@ -1407,8 +1340,8 @@ // M_SanctionMoney // this.M_SanctionMoney.DataPropertyName = "SanctionMoney"; - dataGridViewCellStyle41.Format = "#0.######"; - this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle41; + dataGridViewCellStyle21.Format = "#0.######"; + this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle21; this.M_SanctionMoney.HeaderText = "异常明细"; this.M_SanctionMoney.Name = "M_SanctionMoney"; this.M_SanctionMoney.ReadOnly = true; @@ -1426,7 +1359,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, 334); + this.label15.Location = new System.Drawing.Point(13, 424); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(89, 20); this.label15.TabIndex = 6; @@ -1437,7 +1370,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, 334); + this.label16.Location = new System.Drawing.Point(438, 424); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(89, 20); this.label16.TabIndex = 7; @@ -1448,7 +1381,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, 334); + this.label17.Location = new System.Drawing.Point(862, 424); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(89, 20); this.label17.TabIndex = 8; @@ -1548,7 +1481,7 @@ // viewDetailBtn // this.viewDetailBtn.Font = new System.Drawing.Font("宋体", 15F); - this.viewDetailBtn.Location = new System.Drawing.Point(104, 324); + this.viewDetailBtn.Location = new System.Drawing.Point(108, 414); this.viewDetailBtn.Name = "viewDetailBtn"; this.viewDetailBtn.Size = new System.Drawing.Size(80, 30); this.viewDetailBtn.TabIndex = 44; @@ -1606,6 +1539,12 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1276, 831); + this.Controls.Add(this.weightGrid); + this.Controls.Add(this.houseGird); + this.Controls.Add(this.farmerSelect); + this.Controls.Add(this.farmerGrid); + this.Controls.Add(this.label3); + this.Controls.Add(this.label18); this.Controls.Add(this.totalNumLbl); this.Controls.Add(this.label32); this.Controls.Add(this.uDatePicker1); @@ -1622,8 +1561,6 @@ this.Controls.Add(this.label17); this.Controls.Add(this.label16); this.Controls.Add(this.label15); - this.Controls.Add(this.panel4); - this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -1636,11 +1573,8 @@ this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.farmerGrid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.weightGrid)).EndInit(); - this.panel4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.houseGird)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.billGrid)).EndInit(); @@ -1672,8 +1606,6 @@ private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label8; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Panel panel4; private System.Windows.Forms.DataGridView farmerGrid; private System.Windows.Forms.Label label18; private System.Windows.Forms.DataGridView weightGrid; @@ -1745,13 +1677,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn S_Index; private System.Windows.Forms.DataGridViewTextBoxColumn S_AbnormalItem_Name; private System.Windows.Forms.DataGridViewTextBoxColumn S_Number; - private System.Windows.Forms.DataGridViewTextBoxColumn F_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn F_WeightBill_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn F_Index; - private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn F_Number; - private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn M_ID; private System.Windows.Forms.DataGridViewTextBoxColumn M_FinishWeight; private System.Windows.Forms.DataGridViewTextBoxColumn M_PrintNumber; @@ -1769,15 +1694,19 @@ 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; private System.Windows.Forms.Label totalNumLbl; private System.Windows.Forms.Label label32; + private System.Windows.Forms.DataGridViewTextBoxColumn F_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn F_WeightBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Index; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Number; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Money; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_IDCard; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_BankAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_Tel; + private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_Address; } } \ No newline at end of file diff --git a/ButcherWeight/WeightForm.cs b/ButcherWeight/WeightForm.cs index 6d4930d..12ab11b 100644 --- a/ButcherWeight/WeightForm.cs +++ b/ButcherWeight/WeightForm.cs @@ -256,24 +256,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; + Dmo.Farmer_Name = info.Name; + Dmo.Farmer_IDCard = info.IDCard; + Dmo.Farmer_Tel = info.Tel; + Dmo.Farmer_Address = info.Address; if (_farmerDetails.Any(x => x.Farmer_ID == detail.Farmer_ID)) return; detail.Farmer_Name = farmerSelect.DisplayValue; + detail.Farmer_IDCard = info.IDCard; + detail.Farmer_Tel = info.Tel; + detail.Farmer_Address = info.Address; + detail.Farmer_BankAccount = info.BankAccount; _farmerDetails.Add(detail); detail.Index = _farmerDetails.Max(x => x.Index) + 1; detail.WeightBill_ID = Dmo.ID; @@ -301,10 +297,6 @@ 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; @@ -361,6 +353,7 @@ namespace ButcherWeight var first = _farmerDetails.First(x => x.Index == detail.Index); first.Number = detail.Number; first.Weight = detail.Weight; + first.Money = detail.Money; } foreach (DataGridViewRow data in weightGrid.Rows) @@ -431,18 +424,6 @@ 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(); @@ -474,10 +455,6 @@ 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; } diff --git a/ButcherWeight/WeightForm.resx b/ButcherWeight/WeightForm.resx index accb5ec..de9bb39 100644 --- a/ButcherWeight/WeightForm.resx +++ b/ButcherWeight/WeightForm.resx @@ -138,6 +138,21 @@ True + + True + + + True + + + True + + + True + + + True + True diff --git a/WeighAndGrading/DataViewForm.cs b/WeighAndGrading/DataViewForm.cs index aa1ee38..70028a0 100644 --- a/WeighAndGrading/DataViewForm.cs +++ b/WeighAndGrading/DataViewForm.cs @@ -434,7 +434,7 @@ namespace WeighAndGrading { return; } - var entity = WeightGradePrint.CreatePrintEntity(butcherTimeInput.Date.Value, modifyDetail.Technics_Name, modifyDetail.BarCode); + var entity = WeightGradePrint.CreatePrintEntity(butcherTimeInput.Date.Value, modifyDetail); if (isPrintCheckBox.Checked) { WeightGradePrint.Print(entity); diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index 649bec4..99d792f 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -117,9 +117,8 @@ namespace WeighAndGrading var tech = livestockTag.Item3 == TANG_TECH ? "烫褪" : "毛剥"; if (modifyDetail == null) - { - var code=StartPrintNewEntity(tech); - AddDetail(livestockTag,code); + { + AddDetail(livestockTag); } else { @@ -425,7 +424,7 @@ namespace WeighAndGrading { return; } - var entity = WeightGradePrint.CreatePrintEntity(butcherTimeInput.Date.Value,modifyDetail.Technics_Name,modifyDetail.BarCode); + var entity = WeightGradePrint.CreatePrintEntity(butcherTimeInput.Date.Value,modifyDetail); if (isPrintCheckBox.Checked) { WeightGradePrint.Print(entity); @@ -438,13 +437,13 @@ namespace WeighAndGrading } - string StartPrintNewEntity(string gongyijibie) + string StartPrintNewEntity(GradeAndWeight_Detail detail,bool add=false) { - if (string.IsNullOrWhiteSpace(gongyijibie)) + if (string.IsNullOrWhiteSpace(detail.Technics_Name)) { return ""; } - var entity = WeightGradePrint.CreatePrintEntity(butcherTimeInput.Date.Value, gongyijibie, ""); + var entity = WeightGradePrint.CreatePrintEntity(butcherTimeInput.Date.Value, detail, add); if (isPrintCheckBox.Checked) { WeightGradePrint.Print(entity); @@ -686,7 +685,7 @@ namespace WeighAndGrading #endregion static object _obj = new object(); - void AddDetail(CTuple livestock,string barCode) + void AddDetail(CTuple livestock) { lock (_obj) { @@ -716,7 +715,7 @@ namespace WeighAndGrading SetBtnUnCheck(disBtn); disBtn = null; } - + var barCode = StartPrintNewEntity(first, true); first.BarCode = barCode; LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight", "BarCode"); var tag = details.FirstOrDefault(x => x.SID == first.SID); @@ -737,7 +736,6 @@ namespace WeighAndGrading { maxIndex++; var entity = new GradeAndWeight_Detail(); - entity.BarCode = barCode; entity.Index = maxIndex; if (currentRow != null) { @@ -759,6 +757,7 @@ namespace WeighAndGrading disBtn = null; } entity.Weight = 0; + entity.BarCode = StartPrintNewEntity(entity); LocalGradeAndWeightBL.Insert(entity); details.Insert(0, entity); AfterAddBindDetailGrid(); diff --git a/WeighAndGrading/WeightGradePrint.cs b/WeighAndGrading/WeightGradePrint.cs index 5a0cde2..6717c1e 100644 --- a/WeighAndGrading/WeightGradePrint.cs +++ b/WeighAndGrading/WeightGradePrint.cs @@ -6,15 +6,16 @@ using System.Text; using System.Threading.Tasks; using BO.Utils; using BO.Utils.BillRpc; +using BO.BO.Bill; namespace WeighAndGrading { public static class WeightGradePrint { - public static PrintEntity CreatePrintEntity(DateTime date, string gongyi, string barcode) + public static PrintEntity CreatePrintEntity(DateTime date, GradeAndWeight_Detail detail, bool add = false) { string goodsName; - if (gongyi == "烫褪") + if (detail.Technics_Name == "烫褪") { goodsName = "带皮白条"; //"带皮白条"; } @@ -30,15 +31,16 @@ namespace WeighAndGrading entity.StoreCondition = "0-4℃"; entity.Place = "青岛莱西市"; entity.TelNumber = "0532-88488888"; - if (string.IsNullOrWhiteSpace(barcode)) + if (string.IsNullOrWhiteSpace(detail.BarCode)) { - int maxindex = LocalGradeAndWeightBL.GetTodayTotalCount(date) + 1; - string indexCode = maxindex.ToString("D6"); - entity.BarCode = string.Format("A26091201{0}{1:00000}", entity.Date.ToString("yyyyMMdd"), indexCode); + int order = LocalGradeAndWeightBL.GetOrderIndex(date, detail); + if (add) + order += 1; + entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1:000}{2:000}", entity.Date, detail.Order, order); } else { - entity.BarCode = barcode; + entity.BarCode = detail.BarCode; } entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress + "?code={0}", entity.BarCode); return entity; @@ -73,7 +75,7 @@ namespace WeighAndGrading public static void Print(PrintEntity entity) { var dic = new Dictionary(); - dic.Add("$Goods_Name",entity.Goods_Name); + dic.Add("$Goods_Name", entity.Goods_Name); dic.Add("$Date", entity.Date.ToString("yyyy/MM/dd")); BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, "ImageUrl.png", 120); dic.Add("$ImageUrl", "ImageUrl.png");