Browse Source

加打印次数,打印后 行底色变化。

master
yibo 8 years ago
parent
commit
8ea3694e08
5 changed files with 145 additions and 110 deletions
  1. +3
    -0
      BO/BO/Bill/WeightBill/WeightBill.cs
  2. +2
    -0
      BO/BO/Bill/WeightBill/WeightBillList.cs
  3. +121
    -110
      ButcherWeight/WeightForm.Designer.cs
  4. +16
    -0
      ButcherWeight/WeightForm.cs
  5. +3
    -0
      ButcherWeight/WeightForm.resx

+ 3
- 0
BO/BO/Bill/WeightBill/WeightBill.cs View File

@ -12,6 +12,9 @@ namespace BO.BO
public class WeightBill
{
public int RowVersion { get; set; }
public int PrintNumber { get; set; }
public long ID { get; set; }
public long? B3ID { get; set; }


+ 2
- 0
BO/BO/Bill/WeightBill/WeightBillList.cs View File

@ -31,5 +31,7 @@ namespace BO.BO
public string Remark { get; set; }
public bool FinishWeight { get; set; }
public int PrintNumber { get; set; }
}
}

+ 121
- 110
ButcherWeight/WeightForm.Designer.cs View File

@ -135,18 +135,6 @@
this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.billGrid = new System.Windows.Forms.DataGridView();
this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_SanctionMoney = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
@ -161,6 +149,19 @@
this.farmerMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.farmerDelete = new System.Windows.Forms.ToolStripMenuItem();
this.viewDetailBtn = new System.Windows.Forms.Button();
this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_PrintNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_SanctionMoney = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@ -1168,6 +1169,7 @@
this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_ID,
this.M_FinishWeight,
this.M_PrintNumber,
this.M_B3ID,
this.M_Car_Name,
this.M_Supplier_Name,
@ -1192,104 +1194,6 @@
this.billGrid.TabIndex = 0;
this.billGrid.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.billGrid_CellDoubleClick);
//
// M_ID
//
this.M_ID.DataPropertyName = "ID";
this.M_ID.HeaderText = "ID";
this.M_ID.Name = "M_ID";
this.M_ID.ReadOnly = true;
this.M_ID.Visible = false;
//
// M_FinishWeight
//
this.M_FinishWeight.DataPropertyName = "FinishWeight";
this.M_FinishWeight.HeaderText = "FinishWeight";
this.M_FinishWeight.Name = "M_FinishWeight";
this.M_FinishWeight.ReadOnly = true;
this.M_FinishWeight.Visible = false;
//
// M_B3ID
//
this.M_B3ID.DataPropertyName = "B3ID";
this.M_B3ID.HeaderText = "过磅单号";
this.M_B3ID.Name = "M_B3ID";
this.M_B3ID.ReadOnly = true;
//
// M_Car_Name
//
this.M_Car_Name.DataPropertyName = "Car_Name";
this.M_Car_Name.HeaderText = "车辆";
this.M_Car_Name.Name = "M_Car_Name";
this.M_Car_Name.ReadOnly = true;
this.M_Car_Name.Width = 120;
//
// M_Supplier_Name
//
this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
this.M_Supplier_Name.HeaderText = "供应商";
this.M_Supplier_Name.Name = "M_Supplier_Name";
this.M_Supplier_Name.ReadOnly = true;
this.M_Supplier_Name.Width = 120;
//
// M_Employee_Name
//
this.M_Employee_Name.DataPropertyName = "Employee_Name";
this.M_Employee_Name.HeaderText = "业务员";
this.M_Employee_Name.Name = "M_Employee_Name";
this.M_Employee_Name.ReadOnly = true;
this.M_Employee_Name.Width = 110;
//
// M_PurchaseType_Name
//
this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
this.M_PurchaseType_Name.HeaderText = "收购类型";
this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
this.M_PurchaseType_Name.ReadOnly = true;
this.M_PurchaseType_Name.Width = 110;
//
// M_Number
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "收购头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 110;
//
// M_Weight
//
this.M_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle19.Format = "#0.######";
this.M_Weight.DefaultCellStyle = dataGridViewCellStyle19;
this.M_Weight.HeaderText = "收购重量";
this.M_Weight.Name = "M_Weight";
this.M_Weight.ReadOnly = true;
this.M_Weight.Width = 120;
//
// M_HouseNames
//
this.M_HouseNames.DataPropertyName = "HouseNames";
this.M_HouseNames.HeaderText = "圈舍";
this.M_HouseNames.Name = "M_HouseNames";
this.M_HouseNames.ReadOnly = true;
this.M_HouseNames.Width = 180;
//
// M_SanctionMoney
//
this.M_SanctionMoney.DataPropertyName = "SanctionMoney";
dataGridViewCellStyle20.Format = "#0.######";
this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle20;
this.M_SanctionMoney.HeaderText = "异常明细";
this.M_SanctionMoney.Name = "M_SanctionMoney";
this.M_SanctionMoney.ReadOnly = true;
//
// M_Remark
//
this.M_Remark.DataPropertyName = "Remark";
this.M_Remark.HeaderText = "摘要";
this.M_Remark.Name = "M_Remark";
this.M_Remark.ReadOnly = true;
this.M_Remark.Width = 130;
//
// label15
//
this.label15.AutoSize = true;
@ -1425,6 +1329,112 @@
this.viewDetailBtn.UseVisualStyleBackColor = true;
this.viewDetailBtn.Click += new System.EventHandler(this.viewDetailBtn_Click);
//
// M_ID
//
this.M_ID.DataPropertyName = "ID";
this.M_ID.HeaderText = "ID";
this.M_ID.Name = "M_ID";
this.M_ID.ReadOnly = true;
this.M_ID.Visible = false;
//
// M_FinishWeight
//
this.M_FinishWeight.DataPropertyName = "FinishWeight";
this.M_FinishWeight.HeaderText = "FinishWeight";
this.M_FinishWeight.Name = "M_FinishWeight";
this.M_FinishWeight.ReadOnly = true;
this.M_FinishWeight.Visible = false;
//
// M_PrintNumber
//
this.M_PrintNumber.DataPropertyName = "PrintNumber";
this.M_PrintNumber.HeaderText = "PrintNumber";
this.M_PrintNumber.Name = "M_PrintNumber";
this.M_PrintNumber.ReadOnly = true;
this.M_PrintNumber.Visible = false;
//
// M_B3ID
//
this.M_B3ID.DataPropertyName = "B3ID";
this.M_B3ID.HeaderText = "过磅单号";
this.M_B3ID.Name = "M_B3ID";
this.M_B3ID.ReadOnly = true;
//
// M_Car_Name
//
this.M_Car_Name.DataPropertyName = "Car_Name";
this.M_Car_Name.HeaderText = "车辆";
this.M_Car_Name.Name = "M_Car_Name";
this.M_Car_Name.ReadOnly = true;
this.M_Car_Name.Width = 120;
//
// M_Supplier_Name
//
this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
this.M_Supplier_Name.HeaderText = "供应商";
this.M_Supplier_Name.Name = "M_Supplier_Name";
this.M_Supplier_Name.ReadOnly = true;
this.M_Supplier_Name.Width = 120;
//
// M_Employee_Name
//
this.M_Employee_Name.DataPropertyName = "Employee_Name";
this.M_Employee_Name.HeaderText = "业务员";
this.M_Employee_Name.Name = "M_Employee_Name";
this.M_Employee_Name.ReadOnly = true;
this.M_Employee_Name.Width = 110;
//
// M_PurchaseType_Name
//
this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
this.M_PurchaseType_Name.HeaderText = "收购类型";
this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
this.M_PurchaseType_Name.ReadOnly = true;
this.M_PurchaseType_Name.Width = 110;
//
// M_Number
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "收购头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 110;
//
// M_Weight
//
this.M_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle19.Format = "#0.######";
this.M_Weight.DefaultCellStyle = dataGridViewCellStyle19;
this.M_Weight.HeaderText = "收购重量";
this.M_Weight.Name = "M_Weight";
this.M_Weight.ReadOnly = true;
this.M_Weight.Width = 120;
//
// M_HouseNames
//
this.M_HouseNames.DataPropertyName = "HouseNames";
this.M_HouseNames.HeaderText = "圈舍";
this.M_HouseNames.Name = "M_HouseNames";
this.M_HouseNames.ReadOnly = true;
this.M_HouseNames.Width = 180;
//
// M_SanctionMoney
//
this.M_SanctionMoney.DataPropertyName = "SanctionMoney";
dataGridViewCellStyle20.Format = "#0.######";
this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle20;
this.M_SanctionMoney.HeaderText = "异常明细";
this.M_SanctionMoney.Name = "M_SanctionMoney";
this.M_SanctionMoney.ReadOnly = true;
//
// M_Remark
//
this.M_Remark.DataPropertyName = "Remark";
this.M_Remark.HeaderText = "摘要";
this.M_Remark.Name = "M_Remark";
this.M_Remark.ReadOnly = true;
this.M_Remark.Width = 130;
//
// WeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -1574,6 +1584,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn M_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_FinishWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn M_PrintNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn M_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Car_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Supplier_Name;


+ 16
- 0
ButcherWeight/WeightForm.cs View File

@ -115,6 +115,8 @@ namespace ButcherWeight
{
if ((bool)row.Cells["M_FinishWeight"].Value)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
if ((int)row.Cells["M_PrintNumber"].Value > 0)
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
}
billGrid.Refresh();
}
@ -530,6 +532,20 @@ namespace ButcherWeight
ClientPrint.BwpClientPrint print = new ClientPrint.BwpClientPrint("WeightBillPrint.xaml", entity, new DocumentRenderer());
print.PrintDirect();
WeightBillRpc.DoCheck(Dmo.ID);
var first = dmoList.FirstOrDefault(x => x.ID == Dmo.ID);
if (first != null)
{
first.PrintNumber += 1;
foreach (DataGridViewRow row in billGrid.Rows)
{
if ((long)row.Cells["M_ID"].Value == Dmo.ID)
{
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
break;
}
}
billGrid.Refresh();
}
}
}
}

+ 3
- 0
ButcherWeight/WeightForm.resx View File

@ -204,6 +204,9 @@
<metadata name="M_FinishWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_PrintNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_B3ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>


Loading…
Cancel
Save