Browse Source

加称重修改。

master
yibo 8 years ago
parent
commit
1fabdebaa3
10 changed files with 1247 additions and 237 deletions
  1. +1
    -0
      BO/BO.csproj
  2. +19
    -0
      BO/BO/Bill/GradeAndWeight/DataConfirmList.cs
  3. +74
    -19
      BO/Utils/BillRpc/GradeAndWeightRpc.cs
  4. +8
    -0
      DropPigReOrder/ReOrderForm.Designer.cs
  5. +553
    -0
      WeighAndGrading/DataConfirm.Designer.cs
  6. +215
    -0
      WeighAndGrading/DataConfirm.cs
  7. +156
    -0
      WeighAndGrading/DataConfirm.resx
  8. +185
    -185
      WeighAndGrading/GradeFrom.Designer.cs
  9. +27
    -33
      WeighAndGrading/GradeFrom.cs
  10. +9
    -0
      WeighAndGrading/WeighAndGrading.csproj

+ 1
- 0
BO/BO.csproj View File

@ -70,6 +70,7 @@
<Compile Include="BO\BaseInfo\Customer.cs" />
<Compile Include="BO\BaseInfo\DeliverGoodsLine.cs" />
<Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DataConfirmList.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DetailLastIndex.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight_Detail.cs" />


+ 19
- 0
BO/BO/Bill/GradeAndWeight/DataConfirmList.cs View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO.Bill
{
public class DataConfirmList
{
public int Order { get; set; }
public int PlanNumber { get; set; }
public int HotFadeNumber { get; set; }
public int MaoNumber { get { return PlanNumber - HotFadeNumber; } }
}
}

+ 74
- 19
BO/Utils/BillRpc/GradeAndWeightRpc.cs View File

@ -75,6 +75,13 @@ namespace BO.Utils.BillRpc
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/SaveBodyDiscontItemSetting";
RpcFacade.Call<int>(method, serializer.Serialize(list));
}
public static List<DataConfirmList> GetDataConfirmList(DateTime date, int? order)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetDataConfirmList";
var result = RpcFacade.Call<string>(method, date, order);
return serializer.Deserialize<List<DataConfirmList>>(result);
}
}
public static class LocalGradeAndWeightBL
@ -163,24 +170,26 @@ namespace BO.Utils.BillRpc
// }
//}
//public static List<Tuple<short, int>> GetSumNumber(long orderID)
//{
// var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
// query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("OrderDetail_ID", orderID)));
// query.Columns.Add(DQSelectColumn.Field("Technics"));
// query.Columns.Add(DQSelectColumn.Count());
// query.GroupBy.Expressions.Add(DQExpression.Field("Technics"));
// var list = new List<Tuple<short, int>>();
// using (var session = LocalDmoSession.New())
// {
// using (var reader = session.ExecuteReader(query))
// {
// while (reader.Read())
// list.Add(new Tuple<short, int>((short)reader[0], Convert.ToInt32(reader[1])));
// }
// return list;
// }
//}
public static List<Tuple<short, int>> GetSumNumber(DateTime date, int? order)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Date", date)));
if (order.HasValue)
query.Where.Conditions.Add(DQCondition.EQ("Order", order));
query.Columns.Add(DQSelectColumn.Field("Technics"));
query.Columns.Add(DQSelectColumn.Count());
query.GroupBy.Expressions.Add(DQExpression.Field("Technics"));
var list = new List<Tuple<short, int>>();
using (var session = LocalDmoSession.New())
{
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
list.Add(new Tuple<short, int>((short)reader[0], Convert.ToInt32(reader[1])));
}
return list;
}
}
public static decimal GetSumWeight(DateTime date)
{
@ -194,7 +203,6 @@ namespace BO.Utils.BillRpc
}
}
public static List<GradeAndWeight_Detail> GetLostWeightDetails(DateTime date)
{
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
@ -246,6 +254,17 @@ namespace BO.Utils.BillRpc
}
}
public static void Update(GradeAndWeight_Detail detail, GradeAndWeight dmo)
{
if (dmo == null)
{
throw new Exception(string.Format("请选择左侧的{0}顺序", detail.Technics_Name));
}
detail.Order = dmo.Order;
detail.OrderDetail_ID = dmo.OrderDetail_ID;
Update(detail, "OrderDetail_ID", "Order", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name");
}
public static void Sync()
{
ClearUnSyncDelete();
@ -333,5 +352,41 @@ namespace BO.Utils.BillRpc
return Convert.ToInt32(session.ExecuteScalar(query));
}
}
public static List<GradeAndWeight_Detail> GetGradeAndWeightDetails(DateTime date, int? order, int? index)
{
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Date", date)));
if (order.HasValue)
query.Where.Conditions.Add(DQCondition.Or(DQCondition.IsNull(DQExpression.Field("Order")), DQCondition.EQ("Order", order)));
if (index.HasValue)
query.Where.Conditions.Add(DQCondition.EQ("Index", index));
using (var session = LocalDmoSession.New())
{
return session.ExecuteList(query).Cast<GradeAndWeight_Detail>().ToList();
}
}
public static void InsertOrUpdate(GradeAndWeight_Detail entity)
{
using (var session = LocalDmoSession.New())
{
if (entity.Technics_Name == "烫褪")
entity.Technics = 0;
else
entity.Technics = 1;
if (entity.SID == 0)
{
session.Insert(entity);
}
else
{
entity.Sync = false;
session.Update(entity);
}
session.Commit();
}
}
}
}

+ 8
- 0
DropPigReOrder/ReOrderForm.Designer.cs View File

@ -116,6 +116,7 @@
this.orderGridView.Location = new System.Drawing.Point(16, 78);
this.orderGridView.MultiSelect = false;
this.orderGridView.Name = "orderGridView";
this.orderGridView.ReadOnly = true;
this.orderGridView.RowHeadersVisible = false;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
@ -132,6 +133,7 @@
this.D_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
this.D_OrderDetail_ID.HeaderText = "OrderDetail_ID";
this.D_OrderDetail_ID.Name = "D_OrderDetail_ID";
this.D_OrderDetail_ID.ReadOnly = true;
this.D_OrderDetail_ID.Visible = false;
//
// D_IsDrop
@ -139,6 +141,7 @@
this.D_IsDrop.DataPropertyName = "IsDrop";
this.D_IsDrop.HeaderText = "IsDrop";
this.D_IsDrop.Name = "D_IsDrop";
this.D_IsDrop.ReadOnly = true;
this.D_IsDrop.Visible = false;
//
// D_Order
@ -146,12 +149,14 @@
this.D_Order.DataPropertyName = "Order";
this.D_Order.HeaderText = "序号";
this.D_Order.Name = "D_Order";
this.D_Order.ReadOnly = true;
//
// D_B3WeighBill_ID
//
this.D_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID";
this.D_B3WeighBill_ID.HeaderText = "磅单号";
this.D_B3WeighBill_ID.Name = "D_B3WeighBill_ID";
this.D_B3WeighBill_ID.ReadOnly = true;
this.D_B3WeighBill_ID.Width = 110;
//
// D_HotFadeNumber
@ -159,6 +164,7 @@
this.D_HotFadeNumber.DataPropertyName = "HotFadeNumber";
this.D_HotFadeNumber.HeaderText = "烫褪头数";
this.D_HotFadeNumber.Name = "D_HotFadeNumber";
this.D_HotFadeNumber.ReadOnly = true;
this.D_HotFadeNumber.Width = 110;
//
// D_MaoNumber
@ -166,6 +172,7 @@
this.D_MaoNumber.DataPropertyName = "MaoNumber";
this.D_MaoNumber.HeaderText = "毛剥头数";
this.D_MaoNumber.Name = "D_MaoNumber";
this.D_MaoNumber.ReadOnly = true;
this.D_MaoNumber.Width = 110;
//
// D_PlanNumber
@ -173,6 +180,7 @@
this.D_PlanNumber.DataPropertyName = "PlanNumber";
this.D_PlanNumber.HeaderText = "头数";
this.D_PlanNumber.Name = "D_PlanNumber";
this.D_PlanNumber.ReadOnly = true;
this.D_PlanNumber.Width = 110;
//
// label2


+ 553
- 0
WeighAndGrading/DataConfirm.Designer.cs View File

@ -0,0 +1,553 @@
namespace WeighAndGrading
{
partial class DataConfirm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
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 dataGridViewCellStyle18 = 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();
this.leftBtn = new System.Windows.Forms.Button();
this.uDatePicker1 = new BWP.WinFormControl.UDatePicker();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.leftOrder = new BWP.WinFormControl.UTextBoxWithPad();
this.rightOrder = new BWP.WinFormControl.UTextBoxWithPad();
this.label3 = new System.Windows.Forms.Label();
this.rightBtn = new System.Windows.Forms.Button();
this.rightIndex = new BWP.WinFormControl.UTextBoxWithPad();
this.label4 = new System.Windows.Forms.Label();
this.orderGridView = new BWP.WinFormControl.UDataGridView();
this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
this.ttPanel = new System.Windows.Forms.FlowLayoutPanel();
this.mbPanel = new System.Windows.Forms.FlowLayoutPanel();
this.weightGrid = new BWP.WinFormControl.UDataGridView();
this.L_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.L_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.L_HotFadeNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.L_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.tangNumber = new System.Windows.Forms.Label();
this.maoNumber = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Save = new System.Windows.Forms.DataGridViewButtonColumn();
this.AddBtn = new System.Windows.Forms.Button();
this.deleteBtn = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.orderGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit();
this.SuspendLayout();
//
// leftBtn
//
this.leftBtn.Font = new System.Drawing.Font("宋体", 15F);
this.leftBtn.Location = new System.Drawing.Point(504, 17);
this.leftBtn.Name = "leftBtn";
this.leftBtn.Size = new System.Drawing.Size(149, 41);
this.leftBtn.TabIndex = 5;
this.leftBtn.Text = "查询排宰顺序";
this.leftBtn.UseVisualStyleBackColor = true;
this.leftBtn.Click += new System.EventHandler(this.leftBtn_Click);
//
// uDatePicker1
//
this.uDatePicker1.BackColor = System.Drawing.Color.White;
this.uDatePicker1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.uDatePicker1.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.uDatePicker1.Font = new System.Drawing.Font("宋体", 15F);
this.uDatePicker1.Location = new System.Drawing.Point(120, 22);
this.uDatePicker1.Name = "uDatePicker1";
this.uDatePicker1.Size = new System.Drawing.Size(150, 30);
this.uDatePicker1.TabIndex = 4;
this.uDatePicker1.Text = "2017/09/05";
this.uDatePicker1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uDatePicker1.Type = BWP.WinFormControl.DateTimeType.Date;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 15F);
this.label1.Location = new System.Drawing.Point(12, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(109, 20);
this.label1.TabIndex = 3;
this.label1.Text = "宰杀日期:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F);
this.label2.Location = new System.Drawing.Point(285, 27);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(89, 20);
this.label2.TabIndex = 6;
this.label2.Text = "顺序号:";
//
// leftOrder
//
this.leftOrder.Font = new System.Drawing.Font("宋体", 20F);
this.leftOrder.Location = new System.Drawing.Point(380, 18);
this.leftOrder.Name = "leftOrder";
this.leftOrder.Size = new System.Drawing.Size(100, 38);
this.leftOrder.TabIndex = 7;
this.leftOrder.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// rightOrder
//
this.rightOrder.Font = new System.Drawing.Font("宋体", 20F);
this.rightOrder.Location = new System.Drawing.Point(867, 18);
this.rightOrder.Name = "rightOrder";
this.rightOrder.Size = new System.Drawing.Size(100, 38);
this.rightOrder.TabIndex = 10;
this.rightOrder.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(772, 27);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 20);
this.label3.TabIndex = 9;
this.label3.Text = "顺序号:";
//
// rightBtn
//
this.rightBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rightBtn.Location = new System.Drawing.Point(1191, 15);
this.rightBtn.Name = "rightBtn";
this.rightBtn.Size = new System.Drawing.Size(149, 41);
this.rightBtn.TabIndex = 8;
this.rightBtn.Text = "查询过磅记录";
this.rightBtn.UseVisualStyleBackColor = true;
this.rightBtn.Click += new System.EventHandler(this.rightBtn_Click);
//
// rightIndex
//
this.rightIndex.Font = new System.Drawing.Font("宋体", 20F);
this.rightIndex.Location = new System.Drawing.Point(1068, 18);
this.rightIndex.Name = "rightIndex";
this.rightIndex.Size = new System.Drawing.Size(100, 38);
this.rightIndex.TabIndex = 12;
this.rightIndex.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 15F);
this.label4.Location = new System.Drawing.Point(986, 27);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 20);
this.label4.TabIndex = 11;
this.label4.Text = "序号:";
//
// orderGridView
//
this.orderGridView.AllowUserToAddRows = false;
this.orderGridView.AllowUserToDeleteRows = false;
this.orderGridView.AllowUserToResizeColumns = false;
this.orderGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
this.orderGridView.BackgroundColor = System.Drawing.Color.White;
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.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.L_Order,
this.L_PlanNumber,
this.L_HotFadeNumber,
this.L_MaoNumber});
this.orderGridView.Location = new System.Drawing.Point(16, 93);
this.orderGridView.MultiSelect = false;
this.orderGridView.Name = "orderGridView";
this.orderGridView.ReadOnly = true;
this.orderGridView.RowHeadersVisible = false;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Black;
this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle12;
this.orderGridView.RowTemplate.Height = 60;
this.orderGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.orderGridView.Size = new System.Drawing.Size(368, 591);
this.orderGridView.TabIndex = 13;
this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick);
//
// vScrollBar1
//
this.vScrollBar1.Location = new System.Drawing.Point(1300, 150);
this.vScrollBar1.Name = "vScrollBar1";
this.vScrollBar1.Size = new System.Drawing.Size(40, 534);
this.vScrollBar1.TabIndex = 52;
//
// ttPanel
//
this.ttPanel.Location = new System.Drawing.Point(393, 116);
this.ttPanel.Name = "ttPanel";
this.ttPanel.Size = new System.Drawing.Size(337, 276);
this.ttPanel.TabIndex = 53;
//
// mbPanel
//
this.mbPanel.Location = new System.Drawing.Point(393, 406);
this.mbPanel.Name = "mbPanel";
this.mbPanel.Size = new System.Drawing.Size(337, 278);
this.mbPanel.TabIndex = 54;
//
// weightGrid
//
this.weightGrid.AllowUserToAddRows = false;
this.weightGrid.AllowUserToDeleteRows = false;
this.weightGrid.AllowUserToResizeColumns = false;
this.weightGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
this.weightGrid.BackgroundColor = System.Drawing.Color.White;
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.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_SID,
this.H_Index,
this.H_Order,
this.H_Technics,
this.H_Livestock_Name,
this.H_Weight,
this.H_Time,
this.H_Save});
this.weightGrid.Location = new System.Drawing.Point(740, 150);
this.weightGrid.MultiSelect = false;
this.weightGrid.Name = "weightGrid";
this.weightGrid.ReadOnly = true;
this.weightGrid.RowHeadersVisible = false;
dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle18;
this.weightGrid.RowTemplate.Height = 65;
this.weightGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.weightGrid.Size = new System.Drawing.Size(557, 534);
this.weightGrid.TabIndex = 55;
this.weightGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.weightGrid_CellClick);
this.weightGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.weightGrid_CellContentClick);
//
// L_Order
//
this.L_Order.DataPropertyName = "Order";
this.L_Order.HeaderText = "顺序号";
this.L_Order.Name = "L_Order";
this.L_Order.ReadOnly = true;
this.L_Order.Width = 95;
//
// L_PlanNumber
//
this.L_PlanNumber.DataPropertyName = "PlanNumber";
this.L_PlanNumber.HeaderText = "头数";
this.L_PlanNumber.Name = "L_PlanNumber";
this.L_PlanNumber.ReadOnly = true;
this.L_PlanNumber.Width = 90;
//
// L_HotFadeNumber
//
this.L_HotFadeNumber.DataPropertyName = "HotFadeNumber";
this.L_HotFadeNumber.HeaderText = "烫褪";
this.L_HotFadeNumber.Name = "L_HotFadeNumber";
this.L_HotFadeNumber.ReadOnly = true;
this.L_HotFadeNumber.Width = 90;
//
// L_MaoNumber
//
this.L_MaoNumber.DataPropertyName = "MaoNumber";
this.L_MaoNumber.HeaderText = "毛剥";
this.L_MaoNumber.Name = "L_MaoNumber";
this.L_MaoNumber.ReadOnly = true;
this.L_MaoNumber.Width = 90;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 15F);
this.label5.Location = new System.Drawing.Point(772, 96);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(69, 20);
this.label5.TabIndex = 56;
this.label5.Text = "烫褪:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 15F);
this.label6.Location = new System.Drawing.Point(904, 98);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(69, 20);
this.label6.TabIndex = 57;
this.label6.Text = "毛剥:";
//
// tangNumber
//
this.tangNumber.AutoSize = true;
this.tangNumber.Font = new System.Drawing.Font("宋体", 18F);
this.tangNumber.ForeColor = System.Drawing.Color.Red;
this.tangNumber.Location = new System.Drawing.Point(837, 94);
this.tangNumber.Name = "tangNumber";
this.tangNumber.Size = new System.Drawing.Size(22, 24);
this.tangNumber.TabIndex = 58;
this.tangNumber.Text = "0";
//
// maoNumber
//
this.maoNumber.AutoSize = true;
this.maoNumber.Font = new System.Drawing.Font("宋体", 18F);
this.maoNumber.ForeColor = System.Drawing.Color.Red;
this.maoNumber.Location = new System.Drawing.Point(969, 95);
this.maoNumber.Name = "maoNumber";
this.maoNumber.Size = new System.Drawing.Size(22, 24);
this.maoNumber.TabIndex = 59;
this.maoNumber.Text = "0";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 15F);
this.label7.ForeColor = System.Drawing.Color.Red;
this.label7.Location = new System.Drawing.Point(390, 95);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(69, 20);
this.label7.TabIndex = 60;
this.label7.Text = "烫褪:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("宋体", 15F);
this.label8.ForeColor = System.Drawing.Color.Red;
this.label8.Location = new System.Drawing.Point(390, 383);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(69, 20);
this.label8.TabIndex = 61;
this.label8.Text = "毛剥:";
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.Visible = false;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Order
//
this.H_Order.DataPropertyName = "Order";
this.H_Order.HeaderText = "顺序";
this.H_Order.Name = "H_Order";
this.H_Order.ReadOnly = true;
this.H_Order.Width = 65;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle15.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle15;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle16.Format = "HH:mm:ss";
dataGridViewCellStyle16.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle16;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// H_Save
//
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle17.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.H_Save.DefaultCellStyle = dataGridViewCellStyle17;
this.H_Save.HeaderText = "保存";
this.H_Save.Name = "H_Save";
this.H_Save.ReadOnly = true;
this.H_Save.Text = "保存";
this.H_Save.UseColumnTextForButtonValue = true;
//
// AddBtn
//
this.AddBtn.Font = new System.Drawing.Font("宋体", 15F);
this.AddBtn.Location = new System.Drawing.Point(1191, 93);
this.AddBtn.Name = "AddBtn";
this.AddBtn.Size = new System.Drawing.Size(149, 39);
this.AddBtn.TabIndex = 62;
this.AddBtn.Text = "新增";
this.AddBtn.UseVisualStyleBackColor = true;
this.AddBtn.Click += new System.EventHandler(this.AddBtn_Click);
//
// deleteBtn
//
this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
this.deleteBtn.Location = new System.Drawing.Point(1019, 93);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.Size = new System.Drawing.Size(149, 39);
this.deleteBtn.TabIndex = 63;
this.deleteBtn.Text = "删除";
this.deleteBtn.UseVisualStyleBackColor = true;
this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click);
//
// DataConfirm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1362, 741);
this.Controls.Add(this.deleteBtn);
this.Controls.Add(this.AddBtn);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.maoNumber);
this.Controls.Add(this.tangNumber);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.vScrollBar1);
this.Controls.Add(this.weightGrid);
this.Controls.Add(this.mbPanel);
this.Controls.Add(this.ttPanel);
this.Controls.Add(this.orderGridView);
this.Controls.Add(this.rightIndex);
this.Controls.Add(this.label4);
this.Controls.Add(this.rightOrder);
this.Controls.Add(this.label3);
this.Controls.Add(this.rightBtn);
this.Controls.Add(this.leftOrder);
this.Controls.Add(this.label2);
this.Controls.Add(this.leftBtn);
this.Controls.Add(this.uDatePicker1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "DataConfirm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "数据校验";
((System.ComponentModel.ISupportInitialize)(this.orderGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button leftBtn;
private BWP.WinFormControl.UDatePicker uDatePicker1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private BWP.WinFormControl.UTextBoxWithPad leftOrder;
private BWP.WinFormControl.UTextBoxWithPad rightOrder;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button rightBtn;
private BWP.WinFormControl.UTextBoxWithPad rightIndex;
private System.Windows.Forms.Label label4;
private BWP.WinFormControl.UDataGridView orderGridView;
private System.Windows.Forms.VScrollBar vScrollBar1;
private System.Windows.Forms.FlowLayoutPanel ttPanel;
private System.Windows.Forms.FlowLayoutPanel mbPanel;
private BWP.WinFormControl.UDataGridView weightGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn L_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn L_PlanNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn L_HotFadeNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn L_MaoNumber;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label tangNumber;
private System.Windows.Forms.Label maoNumber;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.DataGridViewTextBoxColumn H_SID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Index;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Time;
private System.Windows.Forms.DataGridViewButtonColumn H_Save;
private System.Windows.Forms.Button AddBtn;
private System.Windows.Forms.Button deleteBtn;
}
}

+ 215
- 0
WeighAndGrading/DataConfirm.cs View File

@ -0,0 +1,215 @@
using BO;
using BO.BO.Bill;
using BO.Utils;
using BO.Utils.BillRpc;
using BWP.WinFormControl;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WeighAndGrading
{
public partial class DataConfirm : Form
{
List<DataConfirmList> leftList;
List<GradeAndWeight_Detail> weightList;
public DataConfirm()
{
InitializeComponent();
uDatePicker1.Date = DateTime.Today;
orderGridView.AutoGenerateColumns = false;
weightGrid.AutoGenerateColumns = false;
AddLivestockBtn();
}
private void leftBtn_Click(object sender, EventArgs e)
{
orderGridView.DataSource = null;
int? order = null;
if (!string.IsNullOrEmpty(leftOrder.Text))
order = int.Parse(leftOrder.Text);
leftList = GradeAndWeightRpc.GetDataConfirmList(uDatePicker1.Date.Value, order);
orderGridView.DataSource = leftList;
orderGridView.Refresh();
}
private void rightBtn_Click(object sender, EventArgs e)
{
weightGrid.DataSource = null;
int? order = null;
if (!string.IsNullOrEmpty(rightOrder.Text))
order = int.Parse(rightOrder.Text);
int? idx = null;
if (!string.IsNullOrEmpty(rightIndex.Text))
idx = int.Parse(rightIndex.Text);
weightList = LocalGradeAndWeightBL.GetGradeAndWeightDetails(uDatePicker1.Date.Value, order, idx);
weightGrid.DataSource = weightList;
InitTangScrollBar();
try
{
if (rollIdx != -1)
weightGrid.FirstDisplayedScrollingRowIndex = rollIdx;
}
catch
{
rollIdx = -1;
}
weightGrid.Refresh();
var number = LocalGradeAndWeightBL.GetSumNumber(uDatePicker1.Date.Value, order);
var tang = number.FirstOrDefault(x => x.Item1 == 0);
tangNumber.Text = "0";
if (tang != null)
tangNumber.Text = tang.Item2.ToString();
var mao = number.FirstOrDefault(x => x.Item1 == 1);
maoNumber.Text = "0";
if (mao != null)
maoNumber.Text = mao.Item2.ToString();
tangNumber.Refresh();
maoNumber.Refresh();
}
void AddLivestockBtn()
{
var fileName = Path.Combine(GradeFrom.DATA_PATH, "Livestocks.xml");
var livestocks = XmlUtil.DeserializeFromFile<List<CTuple<long, string, short, string>>>(fileName);
foreach (var item in livestocks)
{
var btn = new Button() { Name = "_" + item.Item1, Text = item.Item2, Tag = item, Size = new Size(90, 75), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 15 }, Font = new Font("宋体", 18) };
btn.Click += (sender, e) =>
{
var tg = btn.Tag as CTuple<long, string, short, string>;
if (select == null)
throw new Exception("请选择修改的记录");
select.Livestock_ID = tg.Item1;
select.Livestock_Name = tg.Item2;
select.Technics = tg.Item3;
select.Technics_Name = tg.Item3 == 0 ? "烫褪" : "毛剥";
weightGrid.Refresh();
};
if (item.Item3 == 0)
{
ttPanel.Controls.Add(btn);
}
else
{
mbPanel.Controls.Add(btn);
}
}
SetMargin(ttPanel);
SetMargin(mbPanel);
}
void SetMargin(FlowLayoutPanel panel)
{
for (var i = 0; i < panel.Controls.Count; i++)
{
var c = panel.Controls[i];
if (i % 3 == 0)//left
c.Margin = new Padding(0, c.Margin.Top, c.Margin.Right, c.Margin.Bottom);
if ((i + 1) % 3 == 0)//right
c.Margin = new Padding(c.Margin.Left, c.Margin.Top, 0, c.Margin.Bottom);
if (i <= 2)//firstRow
c.Margin = new Padding(c.Margin.Left, 0, c.Margin.Right, c.Margin.Bottom);
}
}
GradeAndWeight_Detail select;
GradeAndWeight_Detail old;
private void weightGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex == 7)
{
LocalGradeAndWeightBL.InsertOrUpdate(select);
rightBtn_Click(sender, EventArgs.Empty);
}
}
private void weightGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
select = weightGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail;
old = new GradeAndWeight_Detail { Order = select.Order, OrderDetail_ID = select.OrderDetail_ID, Technics = select.Technics };
if (e.ColumnIndex==1||e.ColumnIndex == 2 || e.ColumnIndex == 5)
{
var keyBoard = new NumberPad();
if (keyBoard.ShowDialog() == true)
{
var num = keyBoard.Result;
if (e.ColumnIndex == 1)
{
if (string.IsNullOrEmpty(num))
throw new Exception("请输入序号");
select.Index = int.Parse(num);
}
else if (e.ColumnIndex == 2)
select.Order = string.IsNullOrEmpty(num) ? 0 : int.Parse(num);
else
select.Weight = string.IsNullOrEmpty(num) ? 0 : decimal.Parse(num);
weightGrid.Refresh();
}
}
}
private void orderGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
var row = orderGridView.CurrentRow.DataBoundItem as DataConfirmList;
rightOrder.Text = row.Order.ToString();
rightIndex.Text = string.Empty;
rightBtn_Click(sender, EventArgs.Empty);
}
private void AddBtn_Click(object sender, EventArgs e)
{
weightList.Add(new GradeAndWeight_Detail() { Time = DateTime.Now, Date = uDatePicker1.Date.Value });
weightGrid.DataSource = null;
weightGrid.DataSource = weightList;
weightGrid.Refresh();
}
private void deleteBtn_Click(object sender, EventArgs e)
{
if (MessageBox.Show("确定删除选中一条称重记录?", "删除选中", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
{
return;
}
if (select == null)
throw new Exception("请选择删除的行");
var first = weightList.First(x => x.SID == select.SID);
if (first.SID == 0)
weightList.Remove(first);
else
LocalGradeAndWeightBL.DeleteBySID(select.SID);
select = null;
rightBtn_Click(sender, EventArgs.Empty);
}
int rollIdx = -1;
private void InitTangScrollBar()
{
vScrollBar1.Maximum = (weightGrid.RowCount - weightGrid.DisplayedRowCount(false) + 30) * weightGrid.RowTemplate.Height;
vScrollBar1.Minimum = 0;
vScrollBar1.SmallChange = weightGrid.RowTemplate.Height;
vScrollBar1.LargeChange = weightGrid.RowTemplate.Height * 30;
this.vScrollBar1.Scroll += (sender, e) =>
{
rollIdx = e.NewValue / weightGrid.RowTemplate.Height;
weightGrid.FirstDisplayedScrollingRowIndex = rollIdx;
};
}
}
}

+ 156
- 0
WeighAndGrading/DataConfirm.resx View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="L_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_PlanNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_HotFadeNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_MaoNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_SID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Livestock_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Save.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 185
- 185
WeighAndGrading/GradeFrom.Designer.cs View File

@ -28,19 +28,19 @@
/// </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 dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = 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 dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = 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 dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle61 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle62 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle65 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle64 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.syncBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
@ -74,6 +74,18 @@
this.vScrollBar2 = new System.Windows.Forms.VScrollBar();
this.label12 = new System.Windows.Forms.Label();
this.historyGrid = new BWP.WinFormControl.UDataGridView();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.enableWeight = new System.Windows.Forms.CheckBox();
this.isPrintCheckBox = new System.Windows.Forms.CheckBox();
this.printBtn = new System.Windows.Forms.Button();
@ -88,24 +100,12 @@
this.discontPanel = new System.Windows.Forms.FlowLayoutPanel();
this.statePic = new System.Windows.Forms.PictureBox();
this.btnDeleteSelected = new System.Windows.Forms.Button();
this.btnAbnormalModify = new System.Windows.Forms.Button();
this.lblSucessed = new System.Windows.Forms.Label();
this.btnClearWeight = new System.Windows.Forms.Button();
this.dropPigBtn = new System.Windows.Forms.Button();
this.btnStartWeight = new System.Windows.Forms.Button();
this.btnStopWeight = new System.Windows.Forms.Button();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataConfirmBtn = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit();
this.groupBox2.SuspendLayout();
@ -221,17 +221,17 @@
this.tangGridView.AllowUserToDeleteRows = false;
this.tangGridView.AllowUserToResizeColumns = false;
this.tangGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle53.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle53;
this.tangGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle54.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle54.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle54.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle54.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle54.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle54;
this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_OrderDetail_ID,
@ -245,11 +245,11 @@
this.tangGridView.Name = "tangGridView";
this.tangGridView.ReadOnly = true;
this.tangGridView.RowHeadersVisible = false;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle56.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle56.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle56.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle56.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle56;
this.tangGridView.RowTemplate.Height = 65;
this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -299,9 +299,9 @@
//
// T_FinishBtn
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle55.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle55.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle55;
this.T_FinishBtn.HeaderText = "完毕";
this.T_FinishBtn.Name = "T_FinishBtn";
this.T_FinishBtn.ReadOnly = true;
@ -333,17 +333,17 @@
this.maoGridView.AllowUserToDeleteRows = false;
this.maoGridView.AllowUserToResizeColumns = false;
this.maoGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle57.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle57;
this.maoGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle58.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle58.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle58.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle58.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle58.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle58.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle58.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle58;
this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_OrderDetail_ID,
@ -357,11 +357,11 @@
this.maoGridView.Name = "maoGridView";
this.maoGridView.ReadOnly = true;
this.maoGridView.RowHeadersVisible = false;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle60.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle60.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle60.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle60.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle60;
this.maoGridView.RowTemplate.Height = 65;
this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -411,9 +411,9 @@
//
// M_FinishBtn
//
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle59.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle59.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle59;
this.M_FinishBtn.HeaderText = "完毕";
this.M_FinishBtn.Name = "M_FinishBtn";
this.M_FinishBtn.ReadOnly = true;
@ -484,17 +484,17 @@
this.historyGrid.AllowUserToDeleteRows = false;
this.historyGrid.AllowUserToResizeColumns = false;
this.historyGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle61.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle61;
this.historyGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle62.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle62.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle62.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle62.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle62.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle62.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle62.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle62;
this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_SID,
@ -514,9 +514,9 @@
this.historyGrid.Name = "historyGrid";
this.historyGrid.ReadOnly = true;
this.historyGrid.RowHeadersVisible = false;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle65.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle65.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle65;
this.historyGrid.RowTemplate.Height = 40;
this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -524,6 +524,105 @@
this.historyGrid.TabIndex = 0;
this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick);
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.Visible = false;
//
// H_Livestock_ID
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
//
// IsLostWeight
//
this.IsLostWeight.DataPropertyName = "IsLostWeight";
this.IsLostWeight.HeaderText = "IsLostWeight";
this.IsLostWeight.Name = "IsLostWeight";
this.IsLostWeight.ReadOnly = true;
this.IsLostWeight.Visible = false;
//
// H_IsDrop
//
this.H_IsDrop.DataPropertyName = "IsDrop";
this.H_IsDrop.HeaderText = "IsDrop";
this.H_IsDrop.Name = "H_IsDrop";
this.H_IsDrop.ReadOnly = true;
this.H_IsDrop.Visible = false;
//
// H_ReadWeight
//
this.H_ReadWeight.DataPropertyName = "ReadWeight";
this.H_ReadWeight.HeaderText = "";
this.H_ReadWeight.Name = "H_ReadWeight";
this.H_ReadWeight.ReadOnly = true;
this.H_ReadWeight.Width = 30;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Order
//
this.H_Order.DataPropertyName = "Order";
this.H_Order.HeaderText = "顺序";
this.H_Order.Name = "H_Order";
this.H_Order.ReadOnly = true;
this.H_Order.Width = 65;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle63.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle63;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle64.Format = "HH:mm:ss";
dataGridViewCellStyle64.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle64;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// H_OrderDetail_ID
//
this.H_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
this.H_OrderDetail_ID.HeaderText = "OrderDetail_ID";
this.H_OrderDetail_ID.Name = "H_OrderDetail_ID";
this.H_OrderDetail_ID.ReadOnly = true;
this.H_OrderDetail_ID.Visible = false;
//
// enableWeight
//
this.enableWeight.AutoCheck = false;
@ -678,17 +777,6 @@
this.btnDeleteSelected.UseVisualStyleBackColor = true;
this.btnDeleteSelected.Click += new System.EventHandler(this.btnDeleteSelected_Click);
//
// btnAbnormalModify
//
this.btnAbnormalModify.Font = new System.Drawing.Font("宋体", 15F);
this.btnAbnormalModify.Location = new System.Drawing.Point(1224, 6);
this.btnAbnormalModify.Name = "btnAbnormalModify";
this.btnAbnormalModify.Size = new System.Drawing.Size(102, 54);
this.btnAbnormalModify.TabIndex = 34;
this.btnAbnormalModify.Text = "查询修改";
this.btnAbnormalModify.UseVisualStyleBackColor = true;
this.btnAbnormalModify.Click += new System.EventHandler(this.btnAbnormalModify_Click);
//
// lblSucessed
//
this.lblSucessed.BackColor = System.Drawing.Color.Lime;
@ -745,110 +833,23 @@
this.btnStopWeight.UseVisualStyleBackColor = true;
this.btnStopWeight.Click += new System.EventHandler(this.btnStopWeight_Click);
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.Visible = false;
//
// H_Livestock_ID
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
//
// IsLostWeight
//
this.IsLostWeight.DataPropertyName = "IsLostWeight";
this.IsLostWeight.HeaderText = "IsLostWeight";
this.IsLostWeight.Name = "IsLostWeight";
this.IsLostWeight.ReadOnly = true;
this.IsLostWeight.Visible = false;
//
// H_IsDrop
//
this.H_IsDrop.DataPropertyName = "IsDrop";
this.H_IsDrop.HeaderText = "IsDrop";
this.H_IsDrop.Name = "H_IsDrop";
this.H_IsDrop.ReadOnly = true;
this.H_IsDrop.Visible = false;
//
// H_ReadWeight
//
this.H_ReadWeight.DataPropertyName = "ReadWeight";
this.H_ReadWeight.HeaderText = "";
this.H_ReadWeight.Name = "H_ReadWeight";
this.H_ReadWeight.ReadOnly = true;
this.H_ReadWeight.Width = 30;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
// dataConfirmBtn
//
// H_Order
//
this.H_Order.DataPropertyName = "Order";
this.H_Order.HeaderText = "顺序";
this.H_Order.Name = "H_Order";
this.H_Order.ReadOnly = true;
this.H_Order.Width = 65;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle11.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle12.Format = "HH:mm:ss";
dataGridViewCellStyle12.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle12;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// H_OrderDetail_ID
//
this.H_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
this.H_OrderDetail_ID.HeaderText = "OrderDetail_ID";
this.H_OrderDetail_ID.Name = "H_OrderDetail_ID";
this.H_OrderDetail_ID.ReadOnly = true;
this.H_OrderDetail_ID.Visible = false;
this.dataConfirmBtn.Font = new System.Drawing.Font("宋体", 15F);
this.dataConfirmBtn.Location = new System.Drawing.Point(1226, 6);
this.dataConfirmBtn.Name = "dataConfirmBtn";
this.dataConfirmBtn.Size = new System.Drawing.Size(102, 54);
this.dataConfirmBtn.TabIndex = 42;
this.dataConfirmBtn.Text = "数据校验";
this.dataConfirmBtn.UseVisualStyleBackColor = true;
this.dataConfirmBtn.Click += new System.EventHandler(this.dataConfirmBtn_Click);
//
// GradeFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1438, 845);
this.Controls.Add(this.dataConfirmBtn);
this.Controls.Add(this.btnStopWeight);
this.Controls.Add(this.btnStartWeight);
this.Controls.Add(this.dropPigBtn);
@ -858,7 +859,6 @@
this.Controls.Add(this.lblMaoBo);
this.Controls.Add(this.discontBtn);
this.Controls.Add(this.modifyPanel);
this.Controls.Add(this.btnAbnormalModify);
this.Controls.Add(this.btnClearWeight);
this.Controls.Add(this.btnDeleteSelected);
this.Controls.Add(this.configBtn);
@ -936,7 +936,6 @@
private BWP.WinFormControl.UDataGridView maoGridView;
private System.Windows.Forms.PictureBox statePic;
private System.Windows.Forms.Button btnDeleteSelected;
private System.Windows.Forms.Button btnAbnormalModify;
private System.Windows.Forms.DataGridViewTextBoxColumn T_OrderDetail_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Finish;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Order;
@ -967,5 +966,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Time;
private System.Windows.Forms.DataGridViewTextBoxColumn H_OrderDetail_ID;
private System.Windows.Forms.Button dataConfirmBtn;
}
}

+ 27
- 33
WeighAndGrading/GradeFrom.cs View File

@ -149,46 +149,35 @@ namespace WeighAndGrading
modifyDetail.Livestock_Name = livestockTag.Item2;
modifyDetail.Technics = livestockTag.Item3;
modifyDetail.Technics_Name = livestockTag.Item3 == TANG_TECH ? "烫褪" : "毛剥";
LocalGradeAndWeightBL.Update(modifyDetail, "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name");
if (needUpdate)
{
//因为工艺被修改 所以这里取相反
var currentRow = modifyDetail.Technics == 0 ? maoEntity : tangEntity;
if (currentRow != null)
if (modifyDetail.Technics == 0)//毛剥 到 烫褪
{
currentRow.Already -= 1;
orderLabel.Text = currentRow.Order.ToString();
alreadyLabel.Text = currentRow.Already.ToString();
if (modifyDetail.Technics == 0)
LocalGradeAndWeightBL.Update(modifyDetail, tangEntity);
if (modifyDetail.Order.HasValue)
{
var first = maoList.First(x => x.Order == modifyDetail.Order);
first.Already -= 1;
maoGridView.Refresh();
foreach (DataGridViewRow row in tangGridView.Rows)
{
if ((long)row.Cells["T_OrderDetail_ID"].Value == modifyDetail.OrderDetail_ID)
{
var r = row.DataBoundItem as GradeAndWeight;
r.Already += 1;
tangGridView.Refresh();
break;
}
}
}
else
tangEntity.Already += 1;
tangGridView.Refresh();
}
else//烫褪 到 毛剥
{
LocalGradeAndWeightBL.Update(modifyDetail, maoEntity);
if (modifyDetail.Order.HasValue)
{
var first = tangList.First(x => x.Order == modifyDetail.Order);
first.Already -= 1;
tangGridView.Refresh();
foreach (DataGridViewRow row in maoGridView.Rows)
{
if ((long)row.Cells["M_OrderDetail_ID"].Value == modifyDetail.OrderDetail_ID)
{
var r = row.DataBoundItem as GradeAndWeight;
r.Already += 1;
maoGridView.Refresh();
break;
}
}
}
maoEntity.Already += 1;
maoGridView.Refresh();
}
}
else
LocalGradeAndWeightBL.Update(modifyDetail, "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name");
noLivestockList = new ConcurrentQueue<GradeAndWeight_Detail>();
var stack = new Stack<GradeAndWeight_Detail>();
@ -1185,13 +1174,13 @@ namespace WeighAndGrading
//删除选中 更新 IsDeleted 和 Sync
lastCheckItem.IsDeleted = true;
LocalGradeAndWeightBL.Update(lastCheckItem, "IsDeleted");
if (lastCheckItem.OrderDetail_ID.HasValue)
if (lastCheckItem.Order.HasValue)
{
if (lastCheckItem.Technics == 0)
{
foreach (DataGridViewRow row in tangGridView.Rows)
{
if ((long)row.Cells["T_OrderDetail_ID"].Value == lastCheckItem.OrderDetail_ID.Value)
if ((int)row.Cells["T_Order"].Value == lastCheckItem.Order.Value)
{
var r = row.DataBoundItem as GradeAndWeight;
r.Already -= 1;
@ -1204,7 +1193,7 @@ namespace WeighAndGrading
{
foreach (DataGridViewRow row in maoGridView.Rows)
{
if ((long)row.Cells["M_OrderDetail_ID"].Value == lastCheckItem.OrderDetail_ID.Value)
if ((int)row.Cells["M_Order"].Value == lastCheckItem.Order.Value)
{
var r = row.DataBoundItem as GradeAndWeight;
r.Already -= 1;
@ -1471,7 +1460,7 @@ namespace WeighAndGrading
if (e.RowIndex < 0)
return;
var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail;
// lastSelectID = currentRow.SID;
// lastSelectID = currentRow.SID;
mCurrentSlectItem = currentRow;
@ -1877,5 +1866,10 @@ namespace WeighAndGrading
modifyPanel.Hide();
}
}
private void dataConfirmBtn_Click(object sender, EventArgs e)
{
new DataConfirm().ShowDialog();
}
}
}

+ 9
- 0
WeighAndGrading/WeighAndGrading.csproj View File

@ -61,6 +61,12 @@
<Compile Include="BodyDiscontSetting.Designer.cs">
<DependentUpon>BodyDiscontSetting.cs</DependentUpon>
</Compile>
<Compile Include="DataConfirm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DataConfirm.Designer.cs">
<DependentUpon>DataConfirm.cs</DependentUpon>
</Compile>
<Compile Include="GradeContext.cs" />
<Compile Include="GradeFrom.cs">
<SubType>Form</SubType>
@ -89,6 +95,9 @@
<EmbeddedResource Include="BodyDiscontSetting.resx">
<DependentUpon>BodyDiscontSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DataConfirm.resx">
<DependentUpon>DataConfirm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GradeFrom.resx">
<DependentUpon>GradeFrom.cs</DependentUpon>
</EmbeddedResource>


Loading…
Cancel
Save