Browse Source

一系列调整。

master
yibo 7 years ago
parent
commit
23c6d555b1
17 changed files with 280 additions and 137 deletions
  1. +15
    -6
      ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs
  2. +1
    -0
      ButcherFactory.Form/ButcherFactory.Form.csproj
  3. +85
    -85
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs
  4. +17
    -22
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs
  5. +4
    -4
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx
  6. +15
    -0
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutFormConfig.cs
  7. +20
    -8
      ButcherFactory.Form/Dialogs/AddWeightRecord.Designer.cs
  8. +8
    -4
      ButcherFactory.Form/Dialogs/AddWeightRecord.cs
  9. +4
    -0
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs
  10. +1
    -0
      ButcherFactory.Form/Dialogs/NumberSetDialog.Designer.cs
  11. +1
    -0
      ButcherFactory.Form/Dialogs/SelectBillStateDialog.Designer.cs
  12. +1
    -0
      ButcherFactory.Form/Dialogs/SelectCustomerDialog.Designer.cs
  13. +1
    -0
      ButcherFactory.Form/Dialogs/SelectDeliverGoodsLineDialog.Designer.cs
  14. +1
    -0
      ButcherFactory.Form/Dialogs/SelectStoreDialog.Designer.cs
  15. +56
    -7
      ButcherFactory.Form/Dialogs/WeightRecordDialog.Designer.cs
  16. +36
    -1
      ButcherFactory.Form/Dialogs/WeightRecordDialog.cs
  17. +14
    -0
      ButcherFactory.Form/Dialogs/WeightRecordDialog.resx

+ 15
- 6
ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs View File

@ -197,11 +197,6 @@ namespace ButcherFactory.BO.LocalBL
detail.SSecondNumber = (detail.SSecondNumber ?? 0) + details.Sum(x => x.Number); detail.SSecondNumber = (detail.SSecondNumber ?? 0) + details.Sum(x => x.Number);
} }
public static void SaveAssignNum(long id, decimal number)
{
RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/SaveAssignNum", id, number);
}
public static void SetGoodsFinish(long id) public static void SetGoodsFinish(long id)
{ {
RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/SetFinishAssignState", id, true); RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/SetFinishAssignState", id, true);
@ -240,10 +235,24 @@ namespace ButcherFactory.BO.LocalBL
public static void DeleteAndUpdate(CarcassSaleOut_Detail tag) public static void DeleteAndUpdate(CarcassSaleOut_Detail tag)
{ {
var json = JsonConvert.SerializeObject(new ExtensionObj { LongExt1 = tag.DetailID, LongExt2 = tag.WeightRecord_ID, LongExt3 = tag.ScanRecord_ID });
var json = JsonConvert.SerializeObject(new List<ExtensionObj>() { new ExtensionObj { LongExt1 = tag.DetailID, LongExt2 = tag.WeightRecord_ID, LongExt3 = tag.ScanRecord_ID } });
RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/DeleteAndUpdate", json); RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/DeleteAndUpdate", json);
Delete(tag.ID); Delete(tag.ID);
} }
public static void RollBackDetails(List<CarcassSaleOut_Detail> backList)
{
var list = backList.Select(x => new ExtensionObj { LongExt1 = x.DetailID, LongExt2 = x.WeightRecord_ID, LongExt3 = x.ScanRecord_ID });
RpcFacade.Call<int>(RpcPath + "SaleOutStoreRpc/DeleteAndUpdate", JsonConvert.SerializeObject(list));
var update = new DQUpdateDom(typeof(CarcassSaleOut_Detail));
update.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("ID"), backList.Select(x => DQExpression.Value(x.ID)).ToArray()));
update.Columns.Add(new DQUpdateColumn("BillID", DQExpression.NULL));
update.Columns.Add(new DQUpdateColumn("DetailID", DQExpression.NULL));
update.Columns.Add(new DQUpdateColumn("WeightRecord_ID", DQExpression.NULL));
update.Columns.Add(new DQUpdateColumn("ScanRecord_ID", DQExpression.NULL));
update.EExecute();
}
} }
class SaleOutCarcassObj class SaleOutCarcassObj


+ 1
- 0
ButcherFactory.Form/ButcherFactory.Form.csproj View File

@ -68,6 +68,7 @@
<Compile Include="CarcassSaleOut_\CarcassSaleOutForm.Designer.cs"> <Compile Include="CarcassSaleOut_\CarcassSaleOutForm.Designer.cs">
<DependentUpon>CarcassSaleOutForm.cs</DependentUpon> <DependentUpon>CarcassSaleOutForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="CarcassSaleOut_\CarcassSaleOutFormConfig.cs" />
<Compile Include="CarcassTakeOut_\CarcassTakeOutFormConfig.cs" /> <Compile Include="CarcassTakeOut_\CarcassTakeOutFormConfig.cs" />
<Compile Include="Dialogs\AddWeightRecord.cs"> <Compile Include="Dialogs\AddWeightRecord.cs">
<SubType>Form</SubType> <SubType>Form</SubType>


+ 85
- 85
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs View File

@ -29,27 +29,27 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassSaleOutForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassSaleOutForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle51 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle52 = 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 dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = 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 dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
this.uWeightControl1 = new WinFormControl.UWeightControl(); this.uWeightControl1 = new WinFormControl.UWeightControl();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.carNumberLabel = new WinFormControl.ULabel(); this.carNumberLabel = new WinFormControl.ULabel();
@ -304,7 +304,7 @@
this.uTimerLabel1.Name = "uTimerLabel1"; this.uTimerLabel1.Name = "uTimerLabel1";
this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); this.uTimerLabel1.Size = new System.Drawing.Size(136, 16);
this.uTimerLabel1.TabIndex = 11; this.uTimerLabel1.TabIndex = 11;
this.uTimerLabel1.Text = "5月24日 15:28:37";
this.uTimerLabel1.Text = "5月26日 10:37:38";
// //
// uScanPanel1 // uScanPanel1
// //
@ -565,12 +565,13 @@
this.weightRecordBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); this.weightRecordBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.weightRecordBtn.FlatAppearance.BorderSize = 0; this.weightRecordBtn.FlatAppearance.BorderSize = 0;
this.weightRecordBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.weightRecordBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.weightRecordBtn.Font = new System.Drawing.Font("宋体", 12F);
this.weightRecordBtn.ForeColor = System.Drawing.Color.Black; this.weightRecordBtn.ForeColor = System.Drawing.Color.Black;
this.weightRecordBtn.Location = new System.Drawing.Point(182, 17);
this.weightRecordBtn.Location = new System.Drawing.Point(191, 25);
this.weightRecordBtn.Name = "weightRecordBtn"; this.weightRecordBtn.Name = "weightRecordBtn";
this.weightRecordBtn.PlaySound = false; this.weightRecordBtn.PlaySound = false;
this.weightRecordBtn.SelfControlEnable = false; this.weightRecordBtn.SelfControlEnable = false;
this.weightRecordBtn.Size = new System.Drawing.Size(100, 30);
this.weightRecordBtn.Size = new System.Drawing.Size(100, 60);
this.weightRecordBtn.SoundType = WinFormControl.SoundType.Click; this.weightRecordBtn.SoundType = WinFormControl.SoundType.Click;
this.weightRecordBtn.TabIndex = 12; this.weightRecordBtn.TabIndex = 12;
this.weightRecordBtn.Text = "称重记录"; this.weightRecordBtn.Text = "称重记录";
@ -584,17 +585,17 @@
this.mainGridView.AllowUserToDeleteRows = false; this.mainGridView.AllowUserToDeleteRows = false;
this.mainGridView.AllowUserToResizeColumns = false; this.mainGridView.AllowUserToResizeColumns = false;
this.mainGridView.AllowUserToResizeRows = false; this.mainGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle43.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle43;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
this.mainGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.mainGridView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.mainGridView.BackgroundColor = System.Drawing.Color.White; this.mainGridView.BackgroundColor = System.Drawing.Color.White;
this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle44.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle44.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle44;
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle23.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_ID, this.M_ID,
@ -605,18 +606,18 @@
this.mainGridView.MultiSelect = false; this.mainGridView.MultiSelect = false;
this.mainGridView.Name = "mainGridView"; this.mainGridView.Name = "mainGridView";
this.mainGridView.ReadOnly = true; this.mainGridView.ReadOnly = true;
dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle46.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle46.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle46.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle46.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle46.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle46;
dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle25.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle25;
this.mainGridView.RowHeadersVisible = false; this.mainGridView.RowHeadersVisible = false;
dataGridViewCellStyle47.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle47.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle47;
dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle26;
this.mainGridView.RowTemplate.Height = 40; this.mainGridView.RowTemplate.Height = 40;
this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.mainGridView.Size = new System.Drawing.Size(493, 254); this.mainGridView.Size = new System.Drawing.Size(493, 254);
@ -643,8 +644,8 @@
// //
this.M_SendTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.M_SendTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.M_SendTime.DataPropertyName = "SendTime"; this.M_SendTime.DataPropertyName = "SendTime";
dataGridViewCellStyle45.Format = "yyyy/MM/dd";
this.M_SendTime.DefaultCellStyle = dataGridViewCellStyle45;
dataGridViewCellStyle24.Format = "yyyy/MM/dd";
this.M_SendTime.DefaultCellStyle = dataGridViewCellStyle24;
this.M_SendTime.HeaderText = "发货时间"; this.M_SendTime.HeaderText = "发货时间";
this.M_SendTime.Name = "M_SendTime"; this.M_SendTime.Name = "M_SendTime";
this.M_SendTime.ReadOnly = true; this.M_SendTime.ReadOnly = true;
@ -687,15 +688,15 @@
this.orderGridView.AllowUserToDeleteRows = false; this.orderGridView.AllowUserToDeleteRows = false;
this.orderGridView.AllowUserToResizeColumns = false; this.orderGridView.AllowUserToResizeColumns = false;
this.orderGridView.AllowUserToResizeRows = false; this.orderGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle48.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle48;
dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27;
this.orderGridView.BackgroundColor = System.Drawing.Color.White; this.orderGridView.BackgroundColor = System.Drawing.Color.White;
this.orderGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.orderGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle49.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle49.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle49;
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle28.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.D_ID, this.D_ID,
@ -714,14 +715,13 @@
this.orderGridView.Name = "orderGridView"; this.orderGridView.Name = "orderGridView";
this.orderGridView.ReadOnly = true; this.orderGridView.ReadOnly = true;
this.orderGridView.RowHeadersVisible = false; this.orderGridView.RowHeadersVisible = false;
dataGridViewCellStyle55.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle55.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle55;
dataGridViewCellStyle34.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle34;
this.orderGridView.RowTemplate.Height = 40; this.orderGridView.RowTemplate.Height = 40;
this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.orderGridView.Size = new System.Drawing.Size(789, 200); this.orderGridView.Size = new System.Drawing.Size(789, 200);
this.orderGridView.TabIndex = 0; this.orderGridView.TabIndex = 0;
this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick);
this.orderGridView.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.orderGridView_RowPrePaint); this.orderGridView.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.orderGridView_RowPrePaint);
// //
// D_ID // D_ID
@ -770,8 +770,8 @@
// D_SecondNumber // D_SecondNumber
// //
this.D_SecondNumber.DataPropertyName = "SecondNumber"; this.D_SecondNumber.DataPropertyName = "SecondNumber";
dataGridViewCellStyle50.Format = "#0.######";
this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle50;
dataGridViewCellStyle29.Format = "#0.######";
this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle29;
this.D_SecondNumber.HeaderText = "辅数量"; this.D_SecondNumber.HeaderText = "辅数量";
this.D_SecondNumber.Name = "D_SecondNumber"; this.D_SecondNumber.Name = "D_SecondNumber";
this.D_SecondNumber.ReadOnly = true; this.D_SecondNumber.ReadOnly = true;
@ -779,8 +779,8 @@
// D_Number // D_Number
// //
this.D_Number.DataPropertyName = "Number"; this.D_Number.DataPropertyName = "Number";
dataGridViewCellStyle51.Format = "#0.######";
this.D_Number.DefaultCellStyle = dataGridViewCellStyle51;
dataGridViewCellStyle30.Format = "#0.######";
this.D_Number.DefaultCellStyle = dataGridViewCellStyle30;
this.D_Number.HeaderText = "报价数量"; this.D_Number.HeaderText = "报价数量";
this.D_Number.Name = "D_Number"; this.D_Number.Name = "D_Number";
this.D_Number.ReadOnly = true; this.D_Number.ReadOnly = true;
@ -788,8 +788,8 @@
// D_SSecondNumber // D_SSecondNumber
// //
this.D_SSecondNumber.DataPropertyName = "SSecondNumber"; this.D_SSecondNumber.DataPropertyName = "SSecondNumber";
dataGridViewCellStyle52.Format = "#0.######";
this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle52;
dataGridViewCellStyle31.Format = "#0.######";
this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle31;
this.D_SSecondNumber.HeaderText = "配货辅数量"; this.D_SSecondNumber.HeaderText = "配货辅数量";
this.D_SSecondNumber.Name = "D_SSecondNumber"; this.D_SSecondNumber.Name = "D_SSecondNumber";
this.D_SSecondNumber.ReadOnly = true; this.D_SSecondNumber.ReadOnly = true;
@ -797,8 +797,8 @@
// D_SNumber // D_SNumber
// //
this.D_SNumber.DataPropertyName = "SNumber"; this.D_SNumber.DataPropertyName = "SNumber";
dataGridViewCellStyle53.Format = "#0.######";
this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle53;
dataGridViewCellStyle32.Format = "#0.######";
this.D_SNumber.DefaultCellStyle = dataGridViewCellStyle32;
this.D_SNumber.HeaderText = "配货数量"; this.D_SNumber.HeaderText = "配货数量";
this.D_SNumber.Name = "D_SNumber"; this.D_SNumber.Name = "D_SNumber";
this.D_SNumber.ReadOnly = true; this.D_SNumber.ReadOnly = true;
@ -806,8 +806,8 @@
// D_DiffNumber // D_DiffNumber
// //
this.D_DiffNumber.DataPropertyName = "DiffNumber"; this.D_DiffNumber.DataPropertyName = "DiffNumber";
dataGridViewCellStyle54.Format = "#0.######";
this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle54;
dataGridViewCellStyle33.Format = "#0.######";
this.D_DiffNumber.DefaultCellStyle = dataGridViewCellStyle33;
this.D_DiffNumber.HeaderText = "差异数量"; this.D_DiffNumber.HeaderText = "差异数量";
this.D_DiffNumber.Name = "D_DiffNumber"; this.D_DiffNumber.Name = "D_DiffNumber";
this.D_DiffNumber.ReadOnly = true; this.D_DiffNumber.ReadOnly = true;
@ -829,15 +829,15 @@
this.sendGridView.AllowUserToDeleteRows = false; this.sendGridView.AllowUserToDeleteRows = false;
this.sendGridView.AllowUserToResizeColumns = false; this.sendGridView.AllowUserToResizeColumns = false;
this.sendGridView.AllowUserToResizeRows = false; this.sendGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle56.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle56;
dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.sendGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35;
this.sendGridView.BackgroundColor = System.Drawing.Color.White; this.sendGridView.BackgroundColor = System.Drawing.Color.White;
this.sendGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.sendGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle57.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle57.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle57.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle57.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle57;
dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle36.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle36.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.sendGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36;
this.sendGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.sendGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.sendGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.sendGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.F_ID, this.F_ID,
@ -858,9 +858,9 @@
this.sendGridView.Name = "sendGridView"; this.sendGridView.Name = "sendGridView";
this.sendGridView.ReadOnly = true; this.sendGridView.ReadOnly = true;
this.sendGridView.RowHeadersVisible = false; this.sendGridView.RowHeadersVisible = false;
dataGridViewCellStyle63.Font = new System.Drawing.Font("宋体", 10F);
dataGridViewCellStyle63.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle63;
dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 10F);
dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.sendGridView.RowsDefaultCellStyle = dataGridViewCellStyle42;
this.sendGridView.RowTemplate.Height = 40; this.sendGridView.RowTemplate.Height = 40;
this.sendGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.sendGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.sendGridView.Size = new System.Drawing.Size(789, 200); this.sendGridView.Size = new System.Drawing.Size(789, 200);
@ -929,8 +929,8 @@
// F_Number // F_Number
// //
this.F_Number.DataPropertyName = "Number"; this.F_Number.DataPropertyName = "Number";
dataGridViewCellStyle58.Format = "#0.######";
this.F_Number.DefaultCellStyle = dataGridViewCellStyle58;
dataGridViewCellStyle37.Format = "#0.######";
this.F_Number.DefaultCellStyle = dataGridViewCellStyle37;
this.F_Number.HeaderText = "数量"; this.F_Number.HeaderText = "数量";
this.F_Number.Name = "F_Number"; this.F_Number.Name = "F_Number";
this.F_Number.ReadOnly = true; this.F_Number.ReadOnly = true;
@ -939,8 +939,8 @@
// F_InStoreWeight // F_InStoreWeight
// //
this.F_InStoreWeight.DataPropertyName = "InStoreWeight"; this.F_InStoreWeight.DataPropertyName = "InStoreWeight";
dataGridViewCellStyle59.Format = "#0.######";
this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle59;
dataGridViewCellStyle38.Format = "#0.######";
this.F_InStoreWeight.DefaultCellStyle = dataGridViewCellStyle38;
this.F_InStoreWeight.HeaderText = "入库重量"; this.F_InStoreWeight.HeaderText = "入库重量";
this.F_InStoreWeight.Name = "F_InStoreWeight"; this.F_InStoreWeight.Name = "F_InStoreWeight";
this.F_InStoreWeight.ReadOnly = true; this.F_InStoreWeight.ReadOnly = true;
@ -949,8 +949,8 @@
// F_Weight // F_Weight
// //
this.F_Weight.DataPropertyName = "Weight"; this.F_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle60.Format = "#0.######";
this.F_Weight.DefaultCellStyle = dataGridViewCellStyle60;
dataGridViewCellStyle39.Format = "#0.######";
this.F_Weight.DefaultCellStyle = dataGridViewCellStyle39;
this.F_Weight.HeaderText = "重量"; this.F_Weight.HeaderText = "重量";
this.F_Weight.Name = "F_Weight"; this.F_Weight.Name = "F_Weight";
this.F_Weight.ReadOnly = true; this.F_Weight.ReadOnly = true;
@ -959,8 +959,8 @@
// F_DiffWeight // F_DiffWeight
// //
this.F_DiffWeight.DataPropertyName = "DiffWeight"; this.F_DiffWeight.DataPropertyName = "DiffWeight";
dataGridViewCellStyle61.Format = "#0.######";
this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle61;
dataGridViewCellStyle40.Format = "#0.######";
this.F_DiffWeight.DefaultCellStyle = dataGridViewCellStyle40;
this.F_DiffWeight.HeaderText = "差异"; this.F_DiffWeight.HeaderText = "差异";
this.F_DiffWeight.Name = "F_DiffWeight"; this.F_DiffWeight.Name = "F_DiffWeight";
this.F_DiffWeight.ReadOnly = true; this.F_DiffWeight.ReadOnly = true;
@ -969,8 +969,8 @@
// F_Time // F_Time
// //
this.F_Time.DataPropertyName = "Time"; this.F_Time.DataPropertyName = "Time";
dataGridViewCellStyle62.Format = "MM.dd HH:mm:ss";
this.F_Time.DefaultCellStyle = dataGridViewCellStyle62;
dataGridViewCellStyle41.Format = "MM.dd HH:mm:ss";
this.F_Time.DefaultCellStyle = dataGridViewCellStyle41;
this.F_Time.HeaderText = "时间"; this.F_Time.HeaderText = "时间";
this.F_Time.Name = "F_Time"; this.F_Time.Name = "F_Time";
this.F_Time.ReadOnly = true; this.F_Time.ReadOnly = true;


+ 17
- 22
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs View File

@ -74,11 +74,24 @@ namespace ButcherFactory.CarcassSaleOut_
billState = 0; billState = 0;
billStateBox.Text = "未审核"; billStateBox.Text = "未审核";
sendDateBox.Text = sendTime.ToString("yyyy-MM-dd"); sendDateBox.Text = sendTime.ToString("yyyy-MM-dd");
var config = XmlUtil.DeserializeFromFile<CarcassSaleOutFormConfig>();
if (config.Store_ID.HasValue)
{
storeBox.Text = config.Store_Name;
storeID = config.Store_ID;
}
this.mainGridView.BorderStyle = BorderStyle.FixedSingle; this.mainGridView.BorderStyle = BorderStyle.FixedSingle;
BindWeightRecord();
BindProductBatch();
}
void BindWeightRecord()
{
weightRecord = CarcassSaleOutBL.GetUnSubmitWeightRecord(); weightRecord = CarcassSaleOutBL.GetUnSubmitWeightRecord();
sendGridView.DataSource = weightRecord; sendGridView.DataSource = weightRecord;
sendGridView.Refresh(); sendGridView.Refresh();
BindProductBatch();
} }
private void BindProductBatch() private void BindProductBatch()
@ -161,6 +174,8 @@ namespace ButcherFactory.CarcassSaleOut_
dg.ShowDialog(); dg.ShowDialog();
if (dg.Changed) if (dg.Changed)
BindOrderGrid(detail.SaleOutStore_ID); BindOrderGrid(detail.SaleOutStore_ID);
if (dg.rolBack)
BindWeightRecord();
} }
private void goodsFinishBtn_Click(object sender, EventArgs e) private void goodsFinishBtn_Click(object sender, EventArgs e)
@ -278,6 +293,7 @@ namespace ButcherFactory.CarcassSaleOut_
{ {
textBox.Text = sb.Result.Item1; textBox.Text = sb.Result.Item1;
storeID = sb.Result.Item2; storeID = sb.Result.Item2;
XmlUtil.SerializerObjToFile(new CarcassSaleOutFormConfig { Store_ID = storeID, Store_Name = textBox.Text });
} }
break; break;
} }
@ -386,27 +402,6 @@ namespace ButcherFactory.CarcassSaleOut_
} }
} }
private void orderGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (already)
return;
if (e.RowIndex < 0 || e.ColumnIndex < orderGridView.Columns.Count - 3)
return;
var keyBoard = new NumberPad();
if (keyBoard.ShowDialog() == true)
{
decimal n = 0;
if (decimal.TryParse(keyBoard.Result, out n))
{
var d = details.First(x => x.ID == (long)orderGridView.CurrentRow.Cells[0].Value);
CarcassSaleOutBL.SaveAssignNum(d.ID, n);
d.SNumber = n;
orderGridView.Refresh();
}
}
}
private void sendGridView_CellClick(object sender, DataGridViewCellEventArgs e) private void sendGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{ {
if (e.RowIndex < 0) if (e.RowIndex < 0)


+ 4
- 4
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.resx View File

@ -142,7 +142,7 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="goodsFinishBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="unFinishBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
@ -150,7 +150,7 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="unFinishBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="alreadyViewBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
@ -158,7 +158,7 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="alreadyViewBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="weightRecordBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
@ -166,7 +166,7 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="weightRecordBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="goodsFinishBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK


+ 15
- 0
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutFormConfig.cs View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.CarcassSaleOut_
{
public class CarcassSaleOutFormConfig
{
public long? Store_ID { get; set; }
public string Store_Name { get; set; }
}
}

+ 20
- 8
ButcherFactory.Form/Dialogs/AddWeightRecord.Designer.cs View File

@ -39,6 +39,7 @@
this.fullBtn = new WinFormControl.UButton(); this.fullBtn = new WinFormControl.UButton();
this.helfBtn = new WinFormControl.UButton(); this.helfBtn = new WinFormControl.UButton();
this.weightInput = new WinFormControl.UTextBoxWithPad(); this.weightInput = new WinFormControl.UTextBoxWithPad();
this.numberInput = new WinFormControl.UTextBoxWithPad();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -69,7 +70,7 @@
this.uLabel3.AutoSize = true; this.uLabel3.AutoSize = true;
this.uLabel3.BackColor = System.Drawing.Color.Transparent; this.uLabel3.BackColor = System.Drawing.Color.Transparent;
this.uLabel3.Font = new System.Drawing.Font("宋体", 12F); this.uLabel3.Font = new System.Drawing.Font("宋体", 12F);
this.uLabel3.Location = new System.Drawing.Point(57, 190);
this.uLabel3.Location = new System.Drawing.Point(57, 235);
this.uLabel3.Name = "uLabel3"; this.uLabel3.Name = "uLabel3";
this.uLabel3.Size = new System.Drawing.Size(80, 16); this.uLabel3.Size = new System.Drawing.Size(80, 16);
this.uLabel3.TabIndex = 2; this.uLabel3.TabIndex = 2;
@ -85,13 +86,13 @@
this.okBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.okBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.okBtn.Font = new System.Drawing.Font("宋体", 12F); this.okBtn.Font = new System.Drawing.Font("宋体", 12F);
this.okBtn.ForeColor = System.Drawing.Color.Black; this.okBtn.ForeColor = System.Drawing.Color.Black;
this.okBtn.Location = new System.Drawing.Point(174, 280);
this.okBtn.Location = new System.Drawing.Point(174, 310);
this.okBtn.Name = "okBtn"; this.okBtn.Name = "okBtn";
this.okBtn.PlaySound = false; this.okBtn.PlaySound = false;
this.okBtn.SelfControlEnable = false; this.okBtn.SelfControlEnable = false;
this.okBtn.Size = new System.Drawing.Size(92, 40); this.okBtn.Size = new System.Drawing.Size(92, 40);
this.okBtn.SoundType = WinFormControl.SoundType.Click; this.okBtn.SoundType = WinFormControl.SoundType.Click;
this.okBtn.TabIndex = 3;
this.okBtn.TabIndex = 4;
this.okBtn.Text = "确定"; this.okBtn.Text = "确定";
this.okBtn.UseVisualStyleBackColor = true; this.okBtn.UseVisualStyleBackColor = true;
this.okBtn.WithStataHode = false; this.okBtn.WithStataHode = false;
@ -107,13 +108,13 @@
this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cancelBtn.Font = new System.Drawing.Font("宋体", 12F); this.cancelBtn.Font = new System.Drawing.Font("宋体", 12F);
this.cancelBtn.ForeColor = System.Drawing.Color.Black; this.cancelBtn.ForeColor = System.Drawing.Color.Black;
this.cancelBtn.Location = new System.Drawing.Point(332, 280);
this.cancelBtn.Location = new System.Drawing.Point(332, 310);
this.cancelBtn.Name = "cancelBtn"; this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.PlaySound = false; this.cancelBtn.PlaySound = false;
this.cancelBtn.SelfControlEnable = false; this.cancelBtn.SelfControlEnable = false;
this.cancelBtn.Size = new System.Drawing.Size(92, 40); this.cancelBtn.Size = new System.Drawing.Size(92, 40);
this.cancelBtn.SoundType = WinFormControl.SoundType.Click; this.cancelBtn.SoundType = WinFormControl.SoundType.Click;
this.cancelBtn.TabIndex = 4;
this.cancelBtn.TabIndex = 5;
this.cancelBtn.Text = "取消"; this.cancelBtn.Text = "取消";
this.cancelBtn.UseVisualStyleBackColor = true; this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.WithStataHode = false; this.cancelBtn.WithStataHode = false;
@ -187,19 +188,29 @@
// weightInput // weightInput
// //
this.weightInput.Font = new System.Drawing.Font("宋体", 20F); this.weightInput.Font = new System.Drawing.Font("宋体", 20F);
this.weightInput.Location = new System.Drawing.Point(178, 181);
this.weightInput.Location = new System.Drawing.Point(178, 226);
this.weightInput.Name = "weightInput"; this.weightInput.Name = "weightInput";
this.weightInput.Size = new System.Drawing.Size(242, 38); this.weightInput.Size = new System.Drawing.Size(242, 38);
this.weightInput.TabIndex = 7;
this.weightInput.TabIndex = 3;
this.weightInput.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number; this.weightInput.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
// //
// numberInput
//
this.numberInput.Font = new System.Drawing.Font("宋体", 20F);
this.numberInput.Location = new System.Drawing.Point(178, 163);
this.numberInput.Name = "numberInput";
this.numberInput.Size = new System.Drawing.Size(242, 38);
this.numberInput.TabIndex = 2;
this.numberInput.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// AddWeightRecord // AddWeightRecord
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(582, 357);
this.ClientSize = new System.Drawing.Size(582, 394);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.numberInput);
this.Controls.Add(this.weightInput); this.Controls.Add(this.weightInput);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.goodsLabel); this.Controls.Add(this.goodsLabel);
@ -230,5 +241,6 @@
private WinFormControl.UButton helfBtn; private WinFormControl.UButton helfBtn;
private WinFormControl.UTextBoxWithPad weightInput; private WinFormControl.UTextBoxWithPad weightInput;
private WinFormControl.UButton fullBtn; private WinFormControl.UButton fullBtn;
private WinFormControl.UTextBoxWithPad numberInput;
} }
} }

+ 8
- 4
ButcherFactory.Form/Dialogs/AddWeightRecord.cs View File

@ -17,12 +17,12 @@ namespace ButcherFactory.Dialogs
{ {
SaleOutStore_Detail mDetail; SaleOutStore_Detail mDetail;
long? mBatchID = null; long? mBatchID = null;
decimal number = 1;
public AddWeightRecord(SaleOutStore_Detail detail,long? batchID) public AddWeightRecord(SaleOutStore_Detail detail,long? batchID)
{ {
InitializeComponent(); InitializeComponent();
mDetail = detail; mDetail = detail;
mBatchID = batchID; mBatchID = batchID;
numberInput.Text = "1";
goodsLabel.Text = mDetail.Goods_Name; goodsLabel.Text = mDetail.Goods_Name;
} }
@ -31,7 +31,11 @@ namespace ButcherFactory.Dialogs
decimal weight = 0; decimal weight = 0;
if (!decimal.TryParse(weightInput.Text, out weight)) if (!decimal.TryParse(weightInput.Text, out weight))
throw new Exception("请输入重量"); throw new Exception("请输入重量");
decimal number = 0;
if (!decimal.TryParse(numberInput.Text, out number))
throw new Exception("请输入数量");
if (number < 0)
throw new Exception("数量不能为负");
var record = new CarcassSaleOut_Detail(); var record = new CarcassSaleOut_Detail();
record.BillID = mDetail.SaleOutStore_ID; record.BillID = mDetail.SaleOutStore_ID;
record.DetailID = mDetail.ID; record.DetailID = mDetail.ID;
@ -56,12 +60,12 @@ namespace ButcherFactory.Dialogs
private void helfBtn_Click(object sender, EventArgs e) private void helfBtn_Click(object sender, EventArgs e)
{ {
number = 0.5m;
numberInput.Text = "0.5";
} }
private void fullBtn_Click(object sender, EventArgs e) private void fullBtn_Click(object sender, EventArgs e)
{ {
number = 1;
numberInput.Text = "1";
} }
} }
} }

+ 4
- 0
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs View File

@ -69,6 +69,7 @@
this.closeBtn.Location = new System.Drawing.Point(696, 2); this.closeBtn.Location = new System.Drawing.Point(696, 2);
this.closeBtn.Name = "closeBtn"; this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false; this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34); this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click; this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 26; this.closeBtn.TabIndex = 26;
@ -86,7 +87,10 @@
this.Controls.Add(this.closeBtn); this.Controls.Add(this.closeBtn);
this.Controls.Add(this.flowLayoutPanel2); this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MinimizeBox = false;
this.Name = "ClientGoodsSetDialog"; this.Name = "ClientGoodsSetDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "存货设置"; this.Text = "存货设置";
this.ResumeLayout(false); this.ResumeLayout(false);


+ 1
- 0
ButcherFactory.Form/Dialogs/NumberSetDialog.Designer.cs View File

@ -119,6 +119,7 @@
this.Controls.Add(this.numBox); this.Controls.Add(this.numBox);
this.Controls.Add(this.uLabel1); this.Controls.Add(this.uLabel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MinimizeBox = false;
this.Name = "NumberSetDialog"; this.Name = "NumberSetDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "数量设置"; this.Text = "数量设置";


+ 1
- 0
ButcherFactory.Form/Dialogs/SelectBillStateDialog.Designer.cs View File

@ -133,6 +133,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(445, 263); this.ClientSize = new System.Drawing.Size(445, 263);
this.ControlBox = false;
this.Controls.Add(this.uButton4); this.Controls.Add(this.uButton4);
this.Controls.Add(this.uButton3); this.Controls.Add(this.uButton3);
this.Controls.Add(this.uButton2); this.Controls.Add(this.uButton2);


+ 1
- 0
ButcherFactory.Form/Dialogs/SelectCustomerDialog.Designer.cs View File

@ -156,6 +156,7 @@
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MinimizeBox = false;
this.Name = "SelectCustomerDialog"; this.Name = "SelectCustomerDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "选择客户"; this.Text = "选择客户";


+ 1
- 0
ButcherFactory.Form/Dialogs/SelectDeliverGoodsLineDialog.Designer.cs View File

@ -51,6 +51,7 @@
this.ClientSize = new System.Drawing.Size(1005, 536); this.ClientSize = new System.Drawing.Size(1005, 536);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MinimizeBox = false;
this.Name = "SelectDeliverGoodsLineDialog"; this.Name = "SelectDeliverGoodsLineDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "送货线路"; this.Text = "送货线路";


+ 1
- 0
ButcherFactory.Form/Dialogs/SelectStoreDialog.Designer.cs View File

@ -37,6 +37,7 @@
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1005, 536); this.ClientSize = new System.Drawing.Size(1005, 536);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MinimizeBox = false;
this.Name = "SelectStoreDialog"; this.Name = "SelectStoreDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "仓库"; this.Text = "仓库";


+ 56
- 7
ButcherFactory.Form/Dialogs/WeightRecordDialog.Designer.cs View File

@ -42,7 +42,10 @@
this.closeBtn = new WinFormControl.UButton(); this.closeBtn = new WinFormControl.UButton();
this.deleteBtn = new WinFormControl.UButton(); this.deleteBtn = new WinFormControl.UButton();
this.weightLabel = new WinFormControl.ULabel(); this.weightLabel = new WinFormControl.ULabel();
this.rollBackBtn = new WinFormControl.UButton();
this.R_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.R_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Selected = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Image = new System.Windows.Forms.DataGridViewImageColumn();
this.R_Idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.R_Idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.R_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.R_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -78,6 +81,8 @@
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.R_ID, this.R_ID,
this.R_Selected,
this.R_Image,
this.R_Idx, this.R_Idx,
this.R_BarCode, this.R_BarCode,
this.R_Goods_Code, this.R_Goods_Code,
@ -96,10 +101,12 @@
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle7; this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle7;
this.uDataGridView1.RowTemplate.Height = 23;
this.uDataGridView1.RowTemplate.Height = 40;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(1012, 434);
this.uDataGridView1.Size = new System.Drawing.Size(1045, 434);
this.uDataGridView1.TabIndex = 0; this.uDataGridView1.TabIndex = 0;
this.uDataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uDataGridView1_CellClick);
this.uDataGridView1.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.uDataGridView1_CellFormatting);
// //
// addBtn // addBtn
// //
@ -127,12 +134,13 @@
// //
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.rollBackBtn);
this.panel1.Controls.Add(this.closeBtn); this.panel1.Controls.Add(this.closeBtn);
this.panel1.Controls.Add(this.deleteBtn); this.panel1.Controls.Add(this.deleteBtn);
this.panel1.Controls.Add(this.addBtn); this.panel1.Controls.Add(this.addBtn);
this.panel1.Location = new System.Drawing.Point(219, 468);
this.panel1.Location = new System.Drawing.Point(185, 468);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(604, 52);
this.panel1.Size = new System.Drawing.Size(776, 52);
this.panel1.TabIndex = 2; this.panel1.TabIndex = 2;
// //
// closeBtn // closeBtn
@ -145,7 +153,7 @@
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 12F); this.closeBtn.Font = new System.Drawing.Font("宋体", 12F);
this.closeBtn.ForeColor = System.Drawing.Color.Black; this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(428, 5);
this.closeBtn.Location = new System.Drawing.Point(623, 5);
this.closeBtn.Name = "closeBtn"; this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false; this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false; this.closeBtn.SelfControlEnable = false;
@ -167,7 +175,7 @@
this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.deleteBtn.Font = new System.Drawing.Font("宋体", 12F); this.deleteBtn.Font = new System.Drawing.Font("宋体", 12F);
this.deleteBtn.ForeColor = System.Drawing.Color.Black; this.deleteBtn.ForeColor = System.Drawing.Color.Black;
this.deleteBtn.Location = new System.Drawing.Point(214, 5);
this.deleteBtn.Location = new System.Drawing.Point(204, 5);
this.deleteBtn.Name = "deleteBtn"; this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.PlaySound = false; this.deleteBtn.PlaySound = false;
this.deleteBtn.SelfControlEnable = false; this.deleteBtn.SelfControlEnable = false;
@ -192,6 +200,28 @@
this.weightLabel.TabIndex = 3; this.weightLabel.TabIndex = 3;
this.weightLabel.Text = "uLabel1"; this.weightLabel.Text = "uLabel1";
// //
// rollBackBtn
//
this.rollBackBtn.AsClicked = false;
this.rollBackBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("rollBackBtn.BackgroundImage")));
this.rollBackBtn.EnableGroup = false;
this.rollBackBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.rollBackBtn.FlatAppearance.BorderSize = 0;
this.rollBackBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rollBackBtn.Font = new System.Drawing.Font("宋体", 12F);
this.rollBackBtn.ForeColor = System.Drawing.Color.Black;
this.rollBackBtn.Location = new System.Drawing.Point(414, 5);
this.rollBackBtn.Name = "rollBackBtn";
this.rollBackBtn.PlaySound = false;
this.rollBackBtn.SelfControlEnable = false;
this.rollBackBtn.Size = new System.Drawing.Size(117, 43);
this.rollBackBtn.SoundType = WinFormControl.SoundType.Click;
this.rollBackBtn.TabIndex = 4;
this.rollBackBtn.Text = "退回";
this.rollBackBtn.UseVisualStyleBackColor = true;
this.rollBackBtn.WithStataHode = false;
this.rollBackBtn.Click += new System.EventHandler(this.rollBackBtn_Click);
//
// R_ID // R_ID
// //
this.R_ID.DataPropertyName = "ID"; this.R_ID.DataPropertyName = "ID";
@ -200,6 +230,21 @@
this.R_ID.ReadOnly = true; this.R_ID.ReadOnly = true;
this.R_ID.Visible = false; this.R_ID.Visible = false;
// //
// R_Selected
//
this.R_Selected.DataPropertyName = "Selected";
this.R_Selected.HeaderText = "Selected";
this.R_Selected.Name = "R_Selected";
this.R_Selected.ReadOnly = true;
this.R_Selected.Visible = false;
//
// R_Image
//
this.R_Image.HeaderText = "选中";
this.R_Image.Name = "R_Image";
this.R_Image.ReadOnly = true;
this.R_Image.Width = 50;
//
// R_Idx // R_Idx
// //
this.R_Idx.DataPropertyName = "Idx"; this.R_Idx.DataPropertyName = "Idx";
@ -293,11 +338,12 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1036, 528);
this.ClientSize = new System.Drawing.Size(1069, 528);
this.Controls.Add(this.weightLabel); this.Controls.Add(this.weightLabel);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.uDataGridView1); this.Controls.Add(this.uDataGridView1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MinimizeBox = false;
this.Name = "WeightRecordDialog"; this.Name = "WeightRecordDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "称重记录"; this.Text = "称重记录";
@ -316,7 +362,10 @@
private WinFormControl.UButton deleteBtn; private WinFormControl.UButton deleteBtn;
private WinFormControl.UButton closeBtn; private WinFormControl.UButton closeBtn;
private WinFormControl.ULabel weightLabel; private WinFormControl.ULabel weightLabel;
private WinFormControl.UButton rollBackBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn R_ID; private System.Windows.Forms.DataGridViewTextBoxColumn R_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Selected;
private System.Windows.Forms.DataGridViewImageColumn R_Image;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Idx; private System.Windows.Forms.DataGridViewTextBoxColumn R_Idx;
private System.Windows.Forms.DataGridViewTextBoxColumn R_BarCode; private System.Windows.Forms.DataGridViewTextBoxColumn R_BarCode;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Goods_Code; private System.Windows.Forms.DataGridViewTextBoxColumn R_Goods_Code;


+ 36
- 1
ButcherFactory.Form/Dialogs/WeightRecordDialog.cs View File

@ -14,10 +14,13 @@ namespace ButcherFactory.Dialogs
{ {
public partial class WeightRecordDialog : Form public partial class WeightRecordDialog : Form
{ {
static Image CheckImg = System.Drawing.Image.FromFile("Images\\check.png");
static Image UnCheckImg = System.Drawing.Image.FromFile("Images\\uCheck.png");
BindingList<CarcassSaleOut_Detail> list; BindingList<CarcassSaleOut_Detail> list;
SaleOutStore_Detail mDetail; SaleOutStore_Detail mDetail;
long? mBatchID = null; long? mBatchID = null;
public bool Changed = false; public bool Changed = false;
public bool rolBack = false;
public WeightRecordDialog(SaleOutStore_Detail detail, bool readOnly,long? batchID) public WeightRecordDialog(SaleOutStore_Detail detail, bool readOnly,long? batchID)
{ {
InitializeComponent(); InitializeComponent();
@ -26,7 +29,8 @@ namespace ButcherFactory.Dialogs
if (readOnly) if (readOnly)
{ {
addBtn.Enabled = false; addBtn.Enabled = false;
deleteBtn.Enabled = true;
deleteBtn.Enabled = false;
rollBackBtn.Enabled = false;
} }
uDataGridView1.BorderStyle = BorderStyle.FixedSingle; uDataGridView1.BorderStyle = BorderStyle.FixedSingle;
BindGrid(); BindGrid();
@ -64,5 +68,36 @@ namespace ButcherFactory.Dialogs
{ {
Close(); Close();
} }
private void uDataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex != 2)
return;
var v = (bool)uDataGridView1.Rows[e.RowIndex].Cells[1].Value;
e.Value = v ? CheckImg : UnCheckImg;
}
private void uDataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var id = (long)uDataGridView1.CurrentRow.Cells[0].Value;
var first = list.First(x => x.ID == id);
first.Selected = !first.Selected;
uDataGridView1.Refresh();
}
private void rollBackBtn_Click(object sender, EventArgs e)
{
var backList = list.Where(x => x.Selected).ToList();
if (backList.Count() == 0)
throw new Exception("没有称重记录");
if (MessageBox.Show("确定退回选中记录?", "请确认", MessageBoxButtons.OKCancel) != DialogResult.OK)
return;
CarcassSaleOutBL.RollBackDetails(backList);
BindGrid();
Changed = true;
rolBack = true;
}
} }
} }

+ 14
- 0
ButcherFactory.Form/Dialogs/WeightRecordDialog.resx View File

@ -120,6 +120,12 @@
<metadata name="R_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="R_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="R_Selected.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="R_Image.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="R_Idx.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="R_Idx.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -157,6 +163,14 @@
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="rollBackBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">


Loading…
Cancel
Save