Browse Source

修改。

master
yibo 8 years ago
parent
commit
78d9bc4164
3 changed files with 374 additions and 367 deletions
  1. +4
    -0
      BWP.WinFormControl/UComboBox.cs
  2. +298
    -362
      ButcherWeight/WeightForm.Designer.cs
  3. +72
    -5
      ButcherWeight/WeightForm.cs

+ 4
- 0
BWP.WinFormControl/UComboBox.cs View File

@ -117,11 +117,15 @@ namespace BWP.WinFormControl
public void Fill(string displayValue, string phyValue)
{
this.SelectedText = displayValue;
this.SelectedItem = new WordPair(displayValue, phyValue);
}
public void Clear()
{
this.Text = null;
this.SelectedText = null;
this.SelectedItem = null;
}


+ 298
- 362
ButcherWeight/WeightForm.Designer.cs View File

@ -28,39 +28,29 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle 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 dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle 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();
this.panel1 = new System.Windows.Forms.Panel();
this.commitBtn = new System.Windows.Forms.Button();
this.readPiBtn = new System.Windows.Forms.Button();
this.readMaoBtn = new System.Windows.Forms.Button();
this.weightControl = new BWP.WinFormControl.WeightControl();
this.panel2 = new System.Windows.Forms.Panel();
this.zoneSelect = new BWP.WinFormControl.UComboBox();
this.hogGradeSelect = new BWP.WinFormControl.UComboBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.employeeSelect = new BWP.WinFormControl.UComboBox();
this.carSelect = new BWP.WinFormControl.UComboBox();
this.liveVarietiesSelect = new BWP.WinFormControl.UComboBox();
this.purchaseTypeSelect = new BWP.WinFormControl.UComboBox();
this.supplierSelect = new BWP.WinFormControl.UComboBox();
this.testManInput = new System.Windows.Forms.TextBox();
this.testTimeInput = new BWP.WinFormControl.UDatePicker();
this.weightTimeSelect = new BWP.WinFormControl.UDatePicker();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
@ -82,24 +72,14 @@
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.label3 = new System.Windows.Forms.Label();
this.farmerGrid = new System.Windows.Forms.DataGridView();
this.label18 = new System.Windows.Forms.Label();
this.weightGrid = new System.Windows.Forms.DataGridView();
this.panel4 = new System.Windows.Forms.Panel();
this.houseGird = new System.Windows.Forms.DataGridView();
this.panel5 = new System.Windows.Forms.Panel();
this.panel8 = new System.Windows.Forms.Panel();
this.abnormalGrid = new System.Windows.Forms.DataGridView();
this.panel6 = new System.Windows.Forms.Panel();
this.billGrid = new System.Windows.Forms.DataGridView();
this.panel7 = new System.Windows.Forms.Panel();
this.exitBtn = new System.Windows.Forms.Button();
this.deleteBtn = new System.Windows.Forms.Button();
this.updateBtn = new System.Windows.Forms.Button();
this.refreshBtn = new System.Windows.Forms.Button();
this.printBtn = new System.Windows.Forms.Button();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
@ -143,6 +123,21 @@
this.S_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.createBtn = new System.Windows.Forms.Button();
this.farmerSelect = new BWP.WinFormControl.UComboBox();
this.zoneSelect = new BWP.WinFormControl.UComboBox();
this.hogGradeSelect = new BWP.WinFormControl.UComboBox();
this.employeeSelect = new BWP.WinFormControl.UComboBox();
this.carSelect = new BWP.WinFormControl.UComboBox();
this.liveVarietiesSelect = new BWP.WinFormControl.UComboBox();
this.purchaseTypeSelect = new BWP.WinFormControl.UComboBox();
this.supplierSelect = new BWP.WinFormControl.UComboBox();
this.testTimeInput = new BWP.WinFormControl.UDatePicker();
this.weightTimeSelect = new BWP.WinFormControl.UDatePicker();
this.weightControl = new BWP.WinFormControl.WeightControl();
this.exitBtn = new System.Windows.Forms.Button();
this.deleteBtn = new System.Windows.Forms.Button();
this.printBtn = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@ -150,17 +145,17 @@
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.houseGird)).BeginInit();
this.panel5.SuspendLayout();
this.panel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).BeginInit();
this.panel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.billGrid)).BeginInit();
this.panel7.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.exitBtn);
this.panel1.Controls.Add(this.deleteBtn);
this.panel1.Controls.Add(this.printBtn);
this.panel1.Controls.Add(this.createBtn);
this.panel1.Controls.Add(this.commitBtn);
this.panel1.Controls.Add(this.readPiBtn);
this.panel1.Controls.Add(this.readMaoBtn);
@ -173,18 +168,18 @@
// commitBtn
//
this.commitBtn.Font = new System.Drawing.Font("宋体", 15F);
this.commitBtn.Location = new System.Drawing.Point(395, 0);
this.commitBtn.Location = new System.Drawing.Point(519, 0);
this.commitBtn.Name = "commitBtn";
this.commitBtn.Size = new System.Drawing.Size(101, 59);
this.commitBtn.TabIndex = 3;
this.commitBtn.Text = "提交磅单";
this.commitBtn.Text = "保存";
this.commitBtn.UseVisualStyleBackColor = true;
this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click);
//
// readPiBtn
//
this.readPiBtn.Font = new System.Drawing.Font("宋体", 15F);
this.readPiBtn.Location = new System.Drawing.Point(278, 0);
this.readPiBtn.Location = new System.Drawing.Point(286, 0);
this.readPiBtn.Name = "readPiBtn";
this.readPiBtn.Size = new System.Drawing.Size(101, 59);
this.readPiBtn.TabIndex = 2;
@ -195,7 +190,7 @@
// readMaoBtn
//
this.readMaoBtn.Font = new System.Drawing.Font("宋体", 15F);
this.readMaoBtn.Location = new System.Drawing.Point(163, 0);
this.readMaoBtn.Location = new System.Drawing.Point(169, 0);
this.readMaoBtn.Name = "readMaoBtn";
this.readMaoBtn.Size = new System.Drawing.Size(101, 59);
this.readMaoBtn.TabIndex = 1;
@ -203,14 +198,6 @@
this.readMaoBtn.UseVisualStyleBackColor = true;
this.readMaoBtn.Click += new System.EventHandler(this.readMaoBtn_Click);
//
// weightControl
//
this.weightControl.Location = new System.Drawing.Point(0, 0);
this.weightControl.Margin = new System.Windows.Forms.Padding(5);
this.weightControl.Name = "weightControl";
this.weightControl.Size = new System.Drawing.Size(155, 94);
this.weightControl.TabIndex = 0;
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@ -251,32 +238,6 @@
this.panel2.Size = new System.Drawing.Size(1251, 170);
this.panel2.TabIndex = 2;
//
// zoneSelect
//
this.zoneSelect.CodeArgs = null;
this.zoneSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.zoneSelect.EnableTopItem = true;
this.zoneSelect.Font = new System.Drawing.Font("宋体", 14F);
this.zoneSelect.FormattingEnabled = true;
this.zoneSelect.Location = new System.Drawing.Point(348, 129);
this.zoneSelect.Name = "zoneSelect";
this.zoneSelect.Range = 10;
this.zoneSelect.Size = new System.Drawing.Size(135, 30);
this.zoneSelect.TabIndex = 37;
//
// hogGradeSelect
//
this.hogGradeSelect.CodeArgs = null;
this.hogGradeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.hogGradeSelect.EnableTopItem = true;
this.hogGradeSelect.Font = new System.Drawing.Font("宋体", 14F);
this.hogGradeSelect.FormattingEnabled = true;
this.hogGradeSelect.Location = new System.Drawing.Point(103, 129);
this.hogGradeSelect.Name = "hogGradeSelect";
this.hogGradeSelect.Range = 10;
this.hogGradeSelect.Size = new System.Drawing.Size(135, 30);
this.hogGradeSelect.TabIndex = 36;
//
// label2
//
this.label2.AutoSize = true;
@ -297,71 +258,6 @@
this.label1.TabIndex = 34;
this.label1.Text = "毛猪等级";
//
// employeeSelect
//
this.employeeSelect.CodeArgs = null;
this.employeeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.employeeSelect.EnableTopItem = true;
this.employeeSelect.Font = new System.Drawing.Font("宋体", 14F);
this.employeeSelect.FormattingEnabled = true;
this.employeeSelect.Location = new System.Drawing.Point(348, 88);
this.employeeSelect.Name = "employeeSelect";
this.employeeSelect.Range = 10;
this.employeeSelect.Size = new System.Drawing.Size(135, 30);
this.employeeSelect.TabIndex = 33;
//
// carSelect
//
this.carSelect.CodeArgs = null;
this.carSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.carSelect.EnableTopItem = true;
this.carSelect.Font = new System.Drawing.Font("宋体", 14F);
this.carSelect.FormattingEnabled = true;
this.carSelect.Location = new System.Drawing.Point(348, 49);
this.carSelect.Name = "carSelect";
this.carSelect.Range = 10;
this.carSelect.Size = new System.Drawing.Size(135, 30);
this.carSelect.TabIndex = 32;
//
// liveVarietiesSelect
//
this.liveVarietiesSelect.CodeArgs = null;
this.liveVarietiesSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.liveVarietiesSelect.EnableTopItem = true;
this.liveVarietiesSelect.Font = new System.Drawing.Font("宋体", 14F);
this.liveVarietiesSelect.FormattingEnabled = true;
this.liveVarietiesSelect.Location = new System.Drawing.Point(103, 88);
this.liveVarietiesSelect.Name = "liveVarietiesSelect";
this.liveVarietiesSelect.Range = 10;
this.liveVarietiesSelect.Size = new System.Drawing.Size(135, 30);
this.liveVarietiesSelect.TabIndex = 31;
//
// purchaseTypeSelect
//
this.purchaseTypeSelect.CodeArgs = null;
this.purchaseTypeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.purchaseTypeSelect.EnableTopItem = true;
this.purchaseTypeSelect.Font = new System.Drawing.Font("宋体", 14F);
this.purchaseTypeSelect.FormattingEnabled = true;
this.purchaseTypeSelect.Location = new System.Drawing.Point(348, 8);
this.purchaseTypeSelect.Name = "purchaseTypeSelect";
this.purchaseTypeSelect.Range = 10;
this.purchaseTypeSelect.Size = new System.Drawing.Size(135, 30);
this.purchaseTypeSelect.TabIndex = 30;
//
// supplierSelect
//
this.supplierSelect.CodeArgs = null;
this.supplierSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.supplierSelect.EnableTopItem = true;
this.supplierSelect.Font = new System.Drawing.Font("宋体", 14F);
this.supplierSelect.FormattingEnabled = true;
this.supplierSelect.Location = new System.Drawing.Point(103, 8);
this.supplierSelect.Name = "supplierSelect";
this.supplierSelect.Range = 10;
this.supplierSelect.Size = new System.Drawing.Size(135, 30);
this.supplierSelect.TabIndex = 29;
//
// testManInput
//
this.testManInput.Font = new System.Drawing.Font("宋体", 14F);
@ -370,34 +266,6 @@
this.testManInput.Size = new System.Drawing.Size(135, 29);
this.testManInput.TabIndex = 28;
//
// testTimeInput
//
this.testTimeInput.BackColor = System.Drawing.Color.White;
this.testTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.testTimeInput.Date = new System.DateTime(2017, 9, 7, 0, 0, 0, 0);
this.testTimeInput.Font = new System.Drawing.Font("宋体", 15F);
this.testTimeInput.Location = new System.Drawing.Point(1100, 51);
this.testTimeInput.Name = "testTimeInput";
this.testTimeInput.Size = new System.Drawing.Size(135, 30);
this.testTimeInput.TabIndex = 27;
this.testTimeInput.Text = "2017/09/07";
this.testTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.testTimeInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// weightTimeSelect
//
this.weightTimeSelect.BackColor = System.Drawing.Color.White;
this.weightTimeSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.weightTimeSelect.Date = new System.DateTime(2017, 9, 7, 13, 57, 53, 0);
this.weightTimeSelect.Font = new System.Drawing.Font("宋体", 9F);
this.weightTimeSelect.Location = new System.Drawing.Point(103, 49);
this.weightTimeSelect.Name = "weightTimeSelect";
this.weightTimeSelect.Size = new System.Drawing.Size(135, 30);
this.weightTimeSelect.TabIndex = 26;
this.weightTimeSelect.Text = "2017/09/07 13:57:53";
this.weightTimeSelect.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.weightTimeSelect.Type = BWP.WinFormControl.DateTimeType.DateTime;
//
// label19
//
this.label19.AutoSize = true;
@ -606,34 +474,20 @@
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.farmerSelect);
this.panel3.Controls.Add(this.label3);
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, 318);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(402, 219);
this.panel3.Size = new System.Drawing.Size(402, 238);
this.panel3.TabIndex = 3;
//
// farmerSelect
//
this.farmerSelect.CodeArgs = null;
this.farmerSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.farmerSelect.EnableTopItem = true;
this.farmerSelect.Font = new System.Drawing.Font("宋体", 12F);
this.farmerSelect.FormattingEnabled = true;
this.farmerSelect.Location = new System.Drawing.Point(190, 91);
this.farmerSelect.Name = "farmerSelect";
this.farmerSelect.Range = 10;
this.farmerSelect.Size = new System.Drawing.Size(135, 27);
this.farmerSelect.TabIndex = 38;
this.farmerSelect.SelectedIndexChanged += new System.EventHandler(this.farmerSelect_SelectedIndexChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(115, 95);
this.label3.Location = new System.Drawing.Point(115, 96);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 20);
this.label3.TabIndex = 9;
@ -644,18 +498,18 @@
this.farmerGrid.AllowUserToAddRows = false;
this.farmerGrid.AllowUserToResizeColumns = false;
this.farmerGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.Silver;
this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle16.BackColor = System.Drawing.Color.Silver;
this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
this.farmerGrid.BackgroundColor = System.Drawing.Color.White;
this.farmerGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
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;
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
this.farmerGrid.ColumnHeadersHeight = 24;
this.farmerGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.farmerGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -666,16 +520,16 @@
this.F_Index,
this.F_Farmer_Name,
this.F_Number});
this.farmerGrid.Location = new System.Drawing.Point(0, 119);
this.farmerGrid.Location = new System.Drawing.Point(0, 124);
this.farmerGrid.MultiSelect = false;
this.farmerGrid.Name = "farmerGrid";
this.farmerGrid.RowHeadersVisible = false;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle18;
this.farmerGrid.RowTemplate.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Empty;
this.farmerGrid.RowTemplate.Height = 23;
this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.farmerGrid.Size = new System.Drawing.Size(400, 98);
this.farmerGrid.Size = new System.Drawing.Size(400, 112);
this.farmerGrid.TabIndex = 8;
//
// label18
@ -683,7 +537,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, 95);
this.label18.Location = new System.Drawing.Point(-4, 96);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(109, 20);
this.label18.TabIndex = 7;
@ -694,19 +548,18 @@
this.weightGrid.AllowUserToAddRows = false;
this.weightGrid.AllowUserToResizeColumns = false;
this.weightGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.Silver;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.Empty;
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle19.BackColor = System.Drawing.Color.Silver;
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle19;
this.weightGrid.BackgroundColor = System.Drawing.Color.White;
this.weightGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle20;
this.weightGrid.ColumnHeadersHeight = 24;
this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -722,8 +575,8 @@
this.weightGrid.MultiSelect = false;
this.weightGrid.Name = "weightGrid";
this.weightGrid.RowHeadersVisible = false;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle21;
this.weightGrid.RowTemplate.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Empty;
this.weightGrid.RowTemplate.Height = 23;
this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -736,7 +589,7 @@
this.panel4.Controls.Add(this.houseGird);
this.panel4.Location = new System.Drawing.Point(438, 318);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(402, 219);
this.panel4.Size = new System.Drawing.Size(402, 237);
this.panel4.TabIndex = 3;
//
// houseGird
@ -745,18 +598,18 @@
this.houseGird.AllowUserToDeleteRows = false;
this.houseGird.AllowUserToResizeColumns = false;
this.houseGird.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.Silver;
this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.Silver;
this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
this.houseGird.BackgroundColor = System.Drawing.Color.White;
this.houseGird.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
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.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
this.houseGird.ColumnHeadersHeight = 24;
this.houseGird.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.houseGird.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -771,50 +624,32 @@
this.houseGird.MultiSelect = false;
this.houseGird.Name = "houseGird";
this.houseGird.RowHeadersVisible = false;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle24.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle24;
this.houseGird.RowTemplate.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Empty;
this.houseGird.RowTemplate.Height = 23;
this.houseGird.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.houseGird.Size = new System.Drawing.Size(400, 90);
this.houseGird.TabIndex = 1;
//
// panel5
//
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel5.Controls.Add(this.panel8);
this.panel5.Location = new System.Drawing.Point(862, 318);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(402, 219);
this.panel5.TabIndex = 3;
//
// panel8
//
this.panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel8.Controls.Add(this.abnormalGrid);
this.panel8.Location = new System.Drawing.Point(-1, -1);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(402, 219);
this.panel8.TabIndex = 4;
//
// abnormalGrid
//
this.abnormalGrid.AllowUserToAddRows = false;
this.abnormalGrid.AllowUserToDeleteRows = false;
this.abnormalGrid.AllowUserToResizeColumns = false;
this.abnormalGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.Silver;
this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle25.BackColor = System.Drawing.Color.Silver;
this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle25;
this.abnormalGrid.BackgroundColor = System.Drawing.Color.White;
this.abnormalGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle26.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle26.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle26.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle26;
this.abnormalGrid.ColumnHeadersHeight = 24;
this.abnormalGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.abnormalGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -826,44 +661,35 @@
this.S_Index,
this.S_AbnormalItem_Name,
this.S_Number});
this.abnormalGrid.Location = new System.Drawing.Point(0, 0);
this.abnormalGrid.Location = new System.Drawing.Point(862, 318);
this.abnormalGrid.MultiSelect = false;
this.abnormalGrid.Name = "abnormalGrid";
this.abnormalGrid.RowHeadersVisible = false;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle27.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle27;
this.abnormalGrid.RowTemplate.Height = 23;
this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.abnormalGrid.Size = new System.Drawing.Size(400, 90);
this.abnormalGrid.Size = new System.Drawing.Size(400, 237);
this.abnormalGrid.TabIndex = 1;
//
// panel6
//
this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel6.Controls.Add(this.billGrid);
this.panel6.Location = new System.Drawing.Point(12, 625);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(1252, 236);
this.panel6.TabIndex = 4;
//
// billGrid
//
this.billGrid.AllowUserToAddRows = false;
this.billGrid.AllowUserToDeleteRows = false;
this.billGrid.AllowUserToResizeColumns = false;
this.billGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.Silver;
this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle28.BackColor = System.Drawing.Color.Silver;
this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle28;
this.billGrid.BackgroundColor = System.Drawing.Color.White;
this.billGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleHorizontal;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle29.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle29.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle29.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle29.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle29.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle29;
this.billGrid.ColumnHeadersHeight = 24;
this.billGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -877,81 +703,19 @@
this.M_Weight,
this.M_HouseNames,
this.M_SanctionNumber});
this.billGrid.Location = new System.Drawing.Point(0, 0);
this.billGrid.Location = new System.Drawing.Point(12, 580);
this.billGrid.MultiSelect = false;
this.billGrid.Name = "billGrid";
this.billGrid.ReadOnly = true;
this.billGrid.RowHeadersVisible = false;
dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.DodgerBlue;
this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle30;
this.billGrid.RowTemplate.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Empty;
this.billGrid.RowTemplate.Height = 23;
this.billGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.billGrid.Size = new System.Drawing.Size(1250, 234);
this.billGrid.Size = new System.Drawing.Size(1250, 281);
this.billGrid.TabIndex = 0;
//
// panel7
//
this.panel7.Controls.Add(this.exitBtn);
this.panel7.Controls.Add(this.deleteBtn);
this.panel7.Controls.Add(this.updateBtn);
this.panel7.Controls.Add(this.refreshBtn);
this.panel7.Controls.Add(this.printBtn);
this.panel7.Location = new System.Drawing.Point(13, 557);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(794, 62);
this.panel7.TabIndex = 5;
//
// exitBtn
//
this.exitBtn.Font = new System.Drawing.Font("宋体", 15F);
this.exitBtn.Location = new System.Drawing.Point(486, 1);
this.exitBtn.Name = "exitBtn";
this.exitBtn.Size = new System.Drawing.Size(101, 59);
this.exitBtn.TabIndex = 0;
this.exitBtn.Text = "退出";
this.exitBtn.UseVisualStyleBackColor = true;
this.exitBtn.Click += new System.EventHandler(this.exitBtn_Click);
//
// deleteBtn
//
this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
this.deleteBtn.Location = new System.Drawing.Point(363, 1);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.Size = new System.Drawing.Size(101, 59);
this.deleteBtn.TabIndex = 0;
this.deleteBtn.Text = "删除";
this.deleteBtn.UseVisualStyleBackColor = true;
//
// updateBtn
//
this.updateBtn.Font = new System.Drawing.Font("宋体", 15F);
this.updateBtn.Location = new System.Drawing.Point(239, 1);
this.updateBtn.Name = "updateBtn";
this.updateBtn.Size = new System.Drawing.Size(101, 59);
this.updateBtn.TabIndex = 0;
this.updateBtn.Text = "修改";
this.updateBtn.UseVisualStyleBackColor = true;
//
// refreshBtn
//
this.refreshBtn.Font = new System.Drawing.Font("宋体", 15F);
this.refreshBtn.Location = new System.Drawing.Point(117, 1);
this.refreshBtn.Name = "refreshBtn";
this.refreshBtn.Size = new System.Drawing.Size(101, 59);
this.refreshBtn.TabIndex = 0;
this.refreshBtn.Text = "刷新";
this.refreshBtn.UseVisualStyleBackColor = true;
//
// printBtn
//
this.printBtn.Font = new System.Drawing.Font("宋体", 15F);
this.printBtn.Location = new System.Drawing.Point(-1, 1);
this.printBtn.Name = "printBtn";
this.printBtn.Size = new System.Drawing.Size(101, 59);
this.printBtn.TabIndex = 0;
this.printBtn.Text = "打印";
this.printBtn.UseVisualStyleBackColor = true;
this.billGrid.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.billGrid_CellDoubleClick);
//
// label15
//
@ -1285,17 +1049,198 @@
this.S_Number.Name = "S_Number";
this.S_Number.Width = 130;
//
// createBtn
//
this.createBtn.Font = new System.Drawing.Font("宋体", 15F);
this.createBtn.Location = new System.Drawing.Point(402, 0);
this.createBtn.Name = "createBtn";
this.createBtn.Size = new System.Drawing.Size(101, 59);
this.createBtn.TabIndex = 3;
this.createBtn.Text = "新建";
this.createBtn.UseVisualStyleBackColor = true;
this.createBtn.Click += new System.EventHandler(this.createBtn_Click);
//
// farmerSelect
//
this.farmerSelect.CodeArgs = null;
this.farmerSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.farmerSelect.EnableTopItem = true;
this.farmerSelect.Font = new System.Drawing.Font("宋体", 12F);
this.farmerSelect.FormattingEnabled = true;
this.farmerSelect.Location = new System.Drawing.Point(190, 93);
this.farmerSelect.Name = "farmerSelect";
this.farmerSelect.Range = 10;
this.farmerSelect.Size = new System.Drawing.Size(135, 27);
this.farmerSelect.TabIndex = 38;
this.farmerSelect.SelectedIndexChanged += new System.EventHandler(this.farmerSelect_SelectedIndexChanged);
//
// zoneSelect
//
this.zoneSelect.CodeArgs = null;
this.zoneSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.zoneSelect.EnableTopItem = true;
this.zoneSelect.Font = new System.Drawing.Font("宋体", 14F);
this.zoneSelect.FormattingEnabled = true;
this.zoneSelect.Location = new System.Drawing.Point(348, 129);
this.zoneSelect.Name = "zoneSelect";
this.zoneSelect.Range = 10;
this.zoneSelect.Size = new System.Drawing.Size(135, 30);
this.zoneSelect.TabIndex = 37;
//
// hogGradeSelect
//
this.hogGradeSelect.CodeArgs = null;
this.hogGradeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.hogGradeSelect.EnableTopItem = true;
this.hogGradeSelect.Font = new System.Drawing.Font("宋体", 14F);
this.hogGradeSelect.FormattingEnabled = true;
this.hogGradeSelect.Location = new System.Drawing.Point(103, 129);
this.hogGradeSelect.Name = "hogGradeSelect";
this.hogGradeSelect.Range = 10;
this.hogGradeSelect.Size = new System.Drawing.Size(135, 30);
this.hogGradeSelect.TabIndex = 36;
//
// employeeSelect
//
this.employeeSelect.CodeArgs = null;
this.employeeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.employeeSelect.EnableTopItem = true;
this.employeeSelect.Font = new System.Drawing.Font("宋体", 14F);
this.employeeSelect.FormattingEnabled = true;
this.employeeSelect.Location = new System.Drawing.Point(348, 88);
this.employeeSelect.Name = "employeeSelect";
this.employeeSelect.Range = 10;
this.employeeSelect.Size = new System.Drawing.Size(135, 30);
this.employeeSelect.TabIndex = 33;
//
// carSelect
//
this.carSelect.CodeArgs = null;
this.carSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.carSelect.EnableTopItem = true;
this.carSelect.Font = new System.Drawing.Font("宋体", 14F);
this.carSelect.FormattingEnabled = true;
this.carSelect.Location = new System.Drawing.Point(348, 49);
this.carSelect.Name = "carSelect";
this.carSelect.Range = 10;
this.carSelect.Size = new System.Drawing.Size(135, 30);
this.carSelect.TabIndex = 32;
//
// liveVarietiesSelect
//
this.liveVarietiesSelect.CodeArgs = null;
this.liveVarietiesSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.liveVarietiesSelect.EnableTopItem = true;
this.liveVarietiesSelect.Font = new System.Drawing.Font("宋体", 14F);
this.liveVarietiesSelect.FormattingEnabled = true;
this.liveVarietiesSelect.Location = new System.Drawing.Point(103, 88);
this.liveVarietiesSelect.Name = "liveVarietiesSelect";
this.liveVarietiesSelect.Range = 10;
this.liveVarietiesSelect.Size = new System.Drawing.Size(135, 30);
this.liveVarietiesSelect.TabIndex = 31;
//
// purchaseTypeSelect
//
this.purchaseTypeSelect.CodeArgs = null;
this.purchaseTypeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.purchaseTypeSelect.EnableTopItem = true;
this.purchaseTypeSelect.Font = new System.Drawing.Font("宋体", 14F);
this.purchaseTypeSelect.FormattingEnabled = true;
this.purchaseTypeSelect.Location = new System.Drawing.Point(348, 8);
this.purchaseTypeSelect.Name = "purchaseTypeSelect";
this.purchaseTypeSelect.Range = 10;
this.purchaseTypeSelect.Size = new System.Drawing.Size(135, 30);
this.purchaseTypeSelect.TabIndex = 30;
//
// supplierSelect
//
this.supplierSelect.CodeArgs = null;
this.supplierSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.supplierSelect.EnableTopItem = true;
this.supplierSelect.Font = new System.Drawing.Font("宋体", 14F);
this.supplierSelect.FormattingEnabled = true;
this.supplierSelect.Location = new System.Drawing.Point(103, 8);
this.supplierSelect.Name = "supplierSelect";
this.supplierSelect.Range = 10;
this.supplierSelect.Size = new System.Drawing.Size(135, 30);
this.supplierSelect.TabIndex = 29;
//
// testTimeInput
//
this.testTimeInput.BackColor = System.Drawing.Color.White;
this.testTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.testTimeInput.Date = new System.DateTime(2017, 9, 7, 0, 0, 0, 0);
this.testTimeInput.Font = new System.Drawing.Font("宋体", 15F);
this.testTimeInput.Location = new System.Drawing.Point(1100, 51);
this.testTimeInput.Name = "testTimeInput";
this.testTimeInput.Size = new System.Drawing.Size(135, 30);
this.testTimeInput.TabIndex = 27;
this.testTimeInput.Text = "2017/09/07";
this.testTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.testTimeInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// weightTimeSelect
//
this.weightTimeSelect.BackColor = System.Drawing.Color.White;
this.weightTimeSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.weightTimeSelect.Date = new System.DateTime(2017, 9, 7, 19, 7, 31, 0);
this.weightTimeSelect.Font = new System.Drawing.Font("宋体", 9F);
this.weightTimeSelect.Location = new System.Drawing.Point(103, 49);
this.weightTimeSelect.Name = "weightTimeSelect";
this.weightTimeSelect.Size = new System.Drawing.Size(135, 30);
this.weightTimeSelect.TabIndex = 26;
this.weightTimeSelect.Text = "2017/09/07 19:07:31";
this.weightTimeSelect.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.weightTimeSelect.Type = BWP.WinFormControl.DateTimeType.DateTime;
//
// weightControl
//
this.weightControl.Location = new System.Drawing.Point(0, 0);
this.weightControl.Margin = new System.Windows.Forms.Padding(5);
this.weightControl.Name = "weightControl";
this.weightControl.Size = new System.Drawing.Size(155, 94);
this.weightControl.TabIndex = 0;
//
// exitBtn
//
this.exitBtn.Font = new System.Drawing.Font("宋体", 15F);
this.exitBtn.Location = new System.Drawing.Point(871, 0);
this.exitBtn.Name = "exitBtn";
this.exitBtn.Size = new System.Drawing.Size(101, 59);
this.exitBtn.TabIndex = 4;
this.exitBtn.Text = "退出";
this.exitBtn.UseVisualStyleBackColor = true;
//
// deleteBtn
//
this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
this.deleteBtn.Location = new System.Drawing.Point(753, 0);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.Size = new System.Drawing.Size(101, 59);
this.deleteBtn.TabIndex = 5;
this.deleteBtn.Text = "删除";
this.deleteBtn.UseVisualStyleBackColor = true;
//
// printBtn
//
this.printBtn.Font = new System.Drawing.Font("宋体", 15F);
this.printBtn.Location = new System.Drawing.Point(636, 0);
this.printBtn.Name = "printBtn";
this.printBtn.Size = new System.Drawing.Size(101, 59);
this.printBtn.TabIndex = 8;
this.printBtn.Text = "打印";
this.printBtn.UseVisualStyleBackColor = true;
//
// WeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1276, 873);
this.Controls.Add(this.abnormalGrid);
this.Controls.Add(this.billGrid);
this.Controls.Add(this.label17);
this.Controls.Add(this.label16);
this.Controls.Add(this.label15);
this.Controls.Add(this.panel7);
this.Controls.Add(this.panel6);
this.Controls.Add(this.panel5);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
@ -1314,12 +1259,8 @@
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).EndInit();
this.panel4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.houseGird)).EndInit();
this.panel5.ResumeLayout(false);
this.panel8.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).EndInit();
this.panel6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.billGrid)).EndInit();
this.panel7.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -1348,19 +1289,10 @@
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Button exitBtn;
private System.Windows.Forms.Button deleteBtn;
private System.Windows.Forms.Button updateBtn;
private System.Windows.Forms.Button refreshBtn;
private System.Windows.Forms.Button printBtn;
private System.Windows.Forms.DataGridView farmerGrid;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.DataGridView weightGrid;
private System.Windows.Forms.DataGridView houseGird;
private System.Windows.Forms.Panel panel8;
private System.Windows.Forms.DataGridView abnormalGrid;
private System.Windows.Forms.DataGridView billGrid;
private System.Windows.Forms.Label label15;
@ -1427,5 +1359,9 @@
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.Button createBtn;
private System.Windows.Forms.Button exitBtn;
private System.Windows.Forms.Button deleteBtn;
private System.Windows.Forms.Button printBtn;
}
}

+ 72
- 5
ButcherWeight/WeightForm.cs View File

@ -43,10 +43,25 @@ namespace ButcherWeight
weightTimeSelect.Date = DateTime.Now;
testTimeInput.Date = DateTime.Now;
dmoList = WeightBillRpc.GetWeightBillList();
billGrid.AutoGenerateColumns = false;
farmerGrid.AutoGenerateColumns = false;
weightGrid.AutoGenerateColumns = false;
houseGird.AutoGenerateColumns = false;
abnormalGrid.AutoGenerateColumns = false;
BindWeightBill();
}
void BindWeightBill()
{
billGrid.DataSource = dmoList.OrderBy(x => x.FinishCreate).ToList();
billGrid.Refresh();
}
private List<WeightBill> dmoList = new List<WeightBill>();
private WeightBill Dmo = new WeightBill();
private List<WeightBill_FarmerDetail> _farmerDetails = new List<WeightBill_FarmerDetail>();
private List<WeightBill_Detail> _details = new List<WeightBill_Detail>();
private void exitBtn_Click(object sender, EventArgs e)
{
@ -56,11 +71,28 @@ namespace ButcherWeight
private void commitBtn_Click(object sender, EventArgs e)
{
GetFromUI();
Dmo.Details.Clear();
Dmo.Details.AddRange(_details.ToList());
Dmo.FarmerDetails.Clear();
Dmo.FarmerDetails.AddRange(_farmerDetails.ToList());
var isNew = Dmo.ID == 0;
var result = WeightBillRpc.Send(Dmo);
if (isNew)
dmoList.Add(Dmo);
BindWeightBill();
if (result)
MessageBox.Show("保存成功!");
}
private void createBtn_Click(object sender, EventArgs e)
{
Dmo = new WeightBill();
Dmo.WeighTime = DateTime.Now;
AppToUI();
}
private void readMaoBtn_Click(object sender, EventArgs e)
{
@ -77,14 +109,16 @@ namespace ButcherWeight
return;
var detail = new WeightBill_FarmerDetail();
detail.Farmer_ID = farmerSelect.LongValue.Value;
if (Dmo.FarmerDetails.Any(x => x.Farmer_ID == detail.Farmer_ID))
if (_farmerDetails.Any(x => x.Farmer_ID == detail.Farmer_ID))
return;
detail.Farmer_Name = farmerSelect.DisplayValue;
Dmo.FarmerDetails.Add(detail);
detail.Index = Dmo.FarmerDetails.Max(x => x.Index) + 1;
_farmerDetails.Add(detail);
detail.Index = _farmerDetails.Max(x => x.Index) + 1;
detail.WeightBill_ID = Dmo.ID;
farmerSelect.Clear();
farmerGrid.DataSource = null;
farmerGrid.DataSource = _farmerDetails;
farmerGrid.Refresh();
farmerSelect.Clear();
}
void GetFromUI()
@ -155,6 +189,22 @@ namespace ButcherWeight
if (!string.IsNullOrEmpty(remarkInput.Text))
Dmo.Remark = remarkInput.Text;
foreach (DataGridViewRow data in farmerGrid.Rows)
{
var detail = data.DataBoundItem as WeightBill_FarmerDetail;
_farmerDetails.First(x => x.Index == detail.Index).Number = detail.Number;
}
foreach (DataGridViewRow data in weightGrid.Rows)
{
var detail = data.DataBoundItem as WeightBill_Detail;
var first = _details.First(x => x.Index == detail.Index);
first.Number = detail.Number;
first.MaoWeight = detail.MaoWeight;
first.PiWeight = detail.PiWeight;
first.Weight = (detail.MaoWeight ?? 0) - (detail.PiWeight ?? 0);
}
}
void AppToUI()
@ -204,6 +254,12 @@ namespace ButcherWeight
if (!string.IsNullOrEmpty(Dmo.Remark))
remarkInput.Text = Dmo.Remark;
_farmerDetails = Dmo.FarmerDetails.ToList();
_details = Dmo.Details.ToList();
farmerGrid.DataSource = _farmerDetails;
weightGrid.DataSource = _details;
}
void ResetControl()
@ -223,7 +279,18 @@ namespace ButcherWeight
testTimeInput.Date = null;
testManInput.Text = null;
remarkInput.Text = null;
farmerGrid.DataSource = null;
weightGrid.DataSource = null;
}
private void billGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var id = Convert.ToInt64(billGrid.CurrentRow.Cells["M_ID"].Value);
Dmo = dmoList.First(x => x.ID == id);
AppToUI();
}
}
}

Loading…
Cancel
Save