Browse Source

修改

master
yibo 8 years ago
parent
commit
16d33a902f
4 changed files with 124 additions and 101 deletions
  1. +3
    -1
      BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs
  2. +107
    -96
      WeighAndGrading/GradeFrom.Designer.cs
  3. +11
    -4
      WeighAndGrading/GradeFrom.cs
  4. +3
    -0
      WeighAndGrading/GradeFrom.resx

+ 3
- 1
BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs View File

@ -21,6 +21,8 @@ namespace BO.BO.Bill
public long? OrderDetail_ID { get; set; }
public int? Order { get; set; }
public int Index { get; set; }
public DateTime Date { get; set; }
@ -37,7 +39,7 @@ namespace BO.BO.Bill
public DateTime Time { get; set; }
// public string Shortcut { get; set; }//快捷键
// public string Shortcut { get; set; }//快捷键
public bool IsLostWeight { get; set; }//是否丢称重


+ 107
- 96
WeighAndGrading/GradeFrom.Designer.cs View File

@ -74,16 +74,6 @@
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_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.enableWeight = new System.Windows.Forms.CheckBox();
this.isPrintCheckBox = new System.Windows.Forms.CheckBox();
this.printBtn = new System.Windows.Forms.Button();
@ -104,6 +94,17 @@
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_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.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit();
this.groupBox2.SuspendLayout();
@ -504,7 +505,8 @@
this.H_Technics,
this.H_Livestock_Name,
this.H_Weight,
this.H_Time});
this.H_Time,
this.H_OrderDetail_ID});
this.historyGrid.Location = new System.Drawing.Point(1, 36);
this.historyGrid.MultiSelect = false;
this.historyGrid.Name = "historyGrid";
@ -520,89 +522,6 @@
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_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;
//
// enableWeight
//
this.enableWeight.AutoCheck = false;
@ -824,6 +743,97 @@
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;
//
// 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;
//
// GradeFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -933,6 +943,8 @@
private System.Windows.Forms.Label lblSucessed;
private System.Windows.Forms.Button btnClearWeight;
private System.Windows.Forms.Button dropPigBtn;
private System.Windows.Forms.Button btnStartWeight;
private System.Windows.Forms.Button btnStopWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_SID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn IsLostWeight;
@ -943,7 +955,6 @@
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.Button btnStartWeight;
private System.Windows.Forms.Button btnStopWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_OrderDetail_ID;
}
}

+ 11
- 4
WeighAndGrading/GradeFrom.cs View File

@ -144,7 +144,6 @@ namespace WeighAndGrading
else
{
StartPrintEntity(tech, modifyDetail.Index);
modifyDetail.Livestock_ID = livestockTag.Item1;
modifyDetail.Livestock_Name = livestockTag.Item2;
modifyDetail.Technics = livestockTag.Item3;
@ -945,9 +944,9 @@ namespace WeighAndGrading
//点级别
void AddDetail(CTuple<long, string, short, string> livestock)
{
lock (_obj)
{
var n = 0;
var currentRow = livestock.Item3 == 0 ? tangEntity : maoEntity;
var tech = livestock.Item3 == TANG_TECH ? "烫褪" : "毛剥";
@ -957,7 +956,11 @@ namespace WeighAndGrading
if (noLivestockList.TryDequeue(out first))
{
if (currentRow != null)
{
first.OrderDetail_ID = currentRow.OrderDetail_ID;
first.Order = currentRow.Order;
n = currentRow.Already;
}
first.Date = butcherTimeInput.Date.Value;
first.Livestock_ID = livestock.Item1;
first.Livestock_Name = livestock.Item2;
@ -969,7 +972,7 @@ namespace WeighAndGrading
SetBtnUnCheck(disBtn);
disBtn = null;
}
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight");
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight");
historyGrid.Refresh();
}
else//add
@ -978,7 +981,11 @@ namespace WeighAndGrading
var entity = new GradeAndWeight_Detail();
entity.Index = maxIndex;
if (currentRow != null)
{
entity.OrderDetail_ID = currentRow.OrderDetail_ID;
entity.Order = currentRow.Order;
n = currentRow.Already;
}
entity.Date = butcherTimeInput.Date.Value;
entity.Livestock_ID = livestock.Item1;
entity.Livestock_Name = livestock.Item2;
@ -1012,7 +1019,7 @@ namespace WeighAndGrading
if (currentRow != null)
{
currentRow.Already = currentRow.Already + 1;
currentRow.Already = n + 1;
orderLabel.Text = currentRow.Order.ToString();
alreadyLabel.Text = currentRow.Already.ToString();
if (tech == "烫褪")


+ 3
- 0
WeighAndGrading/GradeFrom.resx View File

@ -183,4 +183,7 @@
<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_OrderDetail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

Loading…
Cancel
Save