From a66bb0ef085d1e757549cbb06a852182777bb89a Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Wed, 24 Apr 2019 13:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=20=E6=95=B0=E6=8D=AE=E4=B8=A4=E5=88=86=E9=92=9F=E4=B9=8B?= =?UTF-8?q?=E5=86=85=E5=85=81=E8=AE=B8=E5=88=A0=E9=99=A4=EF=BC=8C=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E4=B8=A4=E5=88=86=E9=92=9F=E4=B8=8A=E4=BC=A0=E5=88=B0?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E3=80=82=E5=90=8C=E6=97=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD=E3=80=82=E7=A7=B0?= =?UTF-8?q?=E9=87=8D=E8=AE=A1=E6=95=B0=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ButcherFactory.BO/Bill/SegmentProduction.cs | 42 +- .../LocalBL/SegmentProductionBL.cs | 76 +- .../LocalBL/WeightCountEntityBL.cs | 7 + .../ButcherFactory.Form.csproj | 9 + .../LogForm.Designer.cs | 169 +++ .../SegmentProductionAuto_/LogForm.cs | 52 + .../SegmentProductionAuto_/LogForm.resx | 120 ++ .../SegmentProductionAutoForm.Designer.cs | 1038 +++++++++-------- .../SegmentProductionAutoForm.cs | 59 +- .../SegmentProductionAutoForm.resx | 256 ++-- .../WeightCount_/DiscontWeightSetDialog.cs | 17 + .../WeightCount_/WeightCountForm.Designer.cs | 187 +-- .../WeightCount_/WeightCountForm.cs | 13 + .../WeightCount_/WeightCountForm.resx | 8 + ButcherFactory.Login/Login.xaml.cs | 4 +- 15 files changed, 1304 insertions(+), 753 deletions(-) create mode 100644 ButcherFactory.Form/SegmentProductionAuto_/LogForm.Designer.cs create mode 100644 ButcherFactory.Form/SegmentProductionAuto_/LogForm.cs create mode 100644 ButcherFactory.Form/SegmentProductionAuto_/LogForm.resx diff --git a/ButcherFactory.BO/Bill/SegmentProduction.cs b/ButcherFactory.BO/Bill/SegmentProduction.cs index f36aa90..bd11948 100644 --- a/ButcherFactory.BO/Bill/SegmentProduction.cs +++ b/ButcherFactory.BO/Bill/SegmentProduction.cs @@ -1,9 +1,10 @@ -using Forks.EnterpriseServices.DataDictionary; -using Forks.EnterpriseServices.DomainObjects2; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Forks.EnterpriseServices.DataDictionary; +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; using System.Threading.Tasks; namespace ButcherFactory.BO @@ -62,7 +63,34 @@ namespace ButcherFactory.BO public bool InStored { get; set; } [DbColumn(DefaultValue = 0)] - public bool StandardPic { get; set; } + public bool StandardPic { get; set; } + + public string MsgID { get; set; } + } + + [MapToTable("Butcher_SegmentLog")] + [KeyField("ID", KeyGenType.identity)] + public class SegmentLog + { + private SegmentLog() + { } + + public SegmentLog(string barCode,string action) + { + Time = DateTime.Now; + BarCode = barCode; + Action = action; + } + + public long ID { get; set; } + + public string Message { get; set; } + + public string BarCode { get; set; } + + public string Action { get; set; } + + public DateTime Time { get; set; } } public class ProductTask diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index a0c8c5c..61b282d 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -75,10 +75,19 @@ namespace ButcherFactory.BO.LocalBL entity.ProductBatch_ID = productBatchID; entity.RowIndex = GenerateRowIndex(productBatchID, session); entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate, AppContext.ConnectInfo.ClientCode, entity.RowIndex); - session.Insert(entity); + session.Insert(entity); + FillMsgID(session, entity); session.Commit(); return entity; } + } + + static void FillMsgID(IDmoSession session, SegmentProduction item) + { + var update = new DQUpdateDom(typeof(SegmentProduction)); + update.Where.Conditions.Add(DQCondition.EQ("ID", item.ID)); + update.Columns.Add(new DQUpdateColumn("MsgID", string.Format("{0}_{1}", AppContext.ConnectInfo.ClientCode, item.ID))); + session.ExecuteNonQuery(update); } public static SegmentProduction InsertAndSetGroupID(SegmentProduction entity, DateTime batchDate) @@ -258,9 +267,11 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("Goods_ID")); query.Columns.Add(DQSelectColumn.Field("Weight")); query.Columns.Add(DQSelectColumn.Field("CreateTime")); - query.Columns.Add(DQSelectColumn.Field("Delete")); - query.Columns.Add(DQSelectColumn.Field("StandardPic")); - query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false))); + query.Columns.Add(DQSelectColumn.Field("Delete")); + query.Columns.Add(DQSelectColumn.Field("StandardPic")); + query.Columns.Add(DQSelectColumn.Field("MsgID")); + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false))); + query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", DateTime.Now.AddMinutes(-2))); query.Range = SelectRange.Top(10); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); @@ -279,8 +290,9 @@ namespace ButcherFactory.BO.LocalBL obj.Goods_ID = (long)reader[6]; obj.Weight = (decimal)reader[7]; obj.ProductTime = (DateTime)reader[8]; - obj.Delete = (bool)reader[9]; - obj.StandardPic = (bool)reader[10]; + obj.Delete = (bool)reader[9]; + obj.StandardPic = (bool)reader[10]; + obj.MsgID = (string)reader[11]; upload.Add(obj); } } @@ -309,6 +321,20 @@ namespace ButcherFactory.BO.LocalBL update.Columns.Add(new DQUpdateColumn("Delete", true)); update.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1)))); update.EExecute(); + } + + public static void Delete(SegmentProduction entity) + { + var update = new DQUpdateDom(typeof(SegmentProduction)); + update.Where.Conditions.Add(DQCondition.EQ("ID", entity.ID)); + update.Columns.Add(new DQUpdateColumn("Sync", true)); + update.Columns.Add(new DQUpdateColumn("Delete", true)); + update.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1)))); + update.EExecute(); + + var log = new SegmentLog(entity.BarCode, "删除"); + log.Message = string.Format("存货名称:{0} 重量:{1:#0.###}", entity.Goods_Name, entity.Weight); + InsertLog(log); } static bool? CheckCanDelete(string barCode) @@ -328,8 +354,39 @@ namespace ButcherFactory.BO.LocalBL { var delete = new DQDeleteDom(typeof(SegmentProduction)); delete.Where.Conditions.Add(DQCondition.LessThan("CreateTime", new DateTime(2018, 10, 15))); - delete.EExecute(); - } + delete.EExecute(); + + var delete2 = new DQDeleteDom(typeof(SegmentLog)); + delete2.Where.Conditions.Add(DQCondition.LessThan("Time", DateTime.Today.AddDays(-30))); + delete2.EExecute(); + } + + public static int GetUnSyncCount() + { + var query = new DQueryDom(new JoinAlias("_main", typeof(SegmentProduction))); + query.Columns.Add(DQSelectColumn.Count()); + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false))); + return Convert.ToInt32(query.EExecuteScalar()); + } + + public static void InsertLog(SegmentLog log) + { + using (var session = DmoSession.New()) + { + session.Insert(log); + session.Commit(); + } + } + + public static IEnumerable GetLog(string type) + { + var query = new DmoQuery(typeof(SegmentLog)); + query.Where.Conditions.Add(DQCondition.GreaterThan("Time", DateTime.Today.AddDays(-2))); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); + if (!string.IsNullOrEmpty(type)) + query.Where.Conditions.Add(DQCondition.EQ("Action", type)); + return query.EExecuteList().Cast(); + } } class SegmentProductionMin @@ -347,7 +404,8 @@ namespace ButcherFactory.BO.LocalBL public decimal? Weight { get; set; } public DateTime? InStoreTime { get; set; } public bool Delete { get; set; } - public bool StandardPic { get; set; } + public bool StandardPic { get; set; } + public string MsgID { get; set; } } class TaskTemp diff --git a/ButcherFactory.BO/LocalBL/WeightCountEntityBL.cs b/ButcherFactory.BO/LocalBL/WeightCountEntityBL.cs index af317c4..635a97e 100644 --- a/ButcherFactory.BO/LocalBL/WeightCountEntityBL.cs +++ b/ButcherFactory.BO/LocalBL/WeightCountEntityBL.cs @@ -159,5 +159,12 @@ namespace ButcherFactory.BO.LocalBL update.Columns.Add(new DQUpdateColumn("Sync", true)); session.ExecuteNonQuery(update); } + + public static void Delete(long id) + { + var delete = new DQUpdateDom(typeof(WeightCountEntity)); + delete.Where.Conditions.Add(DQCondition.EQ("ID", id)); + delete.EExecute(); + } } } diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index f313d65..77741a9 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -212,6 +212,12 @@ SegmentPickUpForm.cs + + Form + + + LogForm.cs + Form @@ -362,6 +368,9 @@ SegmentPickUpForm.cs + + LogForm.cs + SegmentProductionAutoForm.cs diff --git a/ButcherFactory.Form/SegmentProductionAuto_/LogForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/LogForm.Designer.cs new file mode 100644 index 0000000..d0b6ec0 --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/LogForm.Designer.cs @@ -0,0 +1,169 @@ +namespace ButcherFactory.SegmentProductionAuto_ +{ + partial class LogForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.BarCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.Action = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.Message = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.Time = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.colorButton1 = new ButcherFactory.Controls.ColorButton(); + this.colorButton2 = new ButcherFactory.Controls.ColorButton(); + this.colorButton3 = new ButcherFactory.Controls.ColorButton(); + this.colorButton4 = new ButcherFactory.Controls.ColorButton(); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.BarCode, + this.Action, + this.Message, + this.Time}); + this.listView1.Font = new System.Drawing.Font("宋体", 12F); + this.listView1.FullRowSelect = true; + this.listView1.Location = new System.Drawing.Point(12, 70); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(835, 589); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // BarCode + // + this.BarCode.Text = "条码"; + this.BarCode.Width = 250; + // + // Action + // + this.Action.Text = "操作"; + this.Action.Width = 100; + // + // Message + // + this.Message.Text = "详细"; + this.Message.Width = 300; + // + // Time + // + this.Time.Text = "时间"; + this.Time.Width = 150; + // + // colorButton1 + // + this.colorButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.colorButton1.Font = new System.Drawing.Font("宋体", 12F); + this.colorButton1.ForeColor = System.Drawing.Color.White; + this.colorButton1.Location = new System.Drawing.Point(38, 20); + this.colorButton1.Name = "colorButton1"; + this.colorButton1.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton1.Size = new System.Drawing.Size(90, 37); + this.colorButton1.TabIndex = 1; + this.colorButton1.Tag = "打印"; + this.colorButton1.Text = "打 印"; + this.colorButton1.UseVisualStyleBackColor = false; + this.colorButton1.Click += new System.EventHandler(this.colorButton1_Click); + // + // colorButton2 + // + this.colorButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.colorButton2.Font = new System.Drawing.Font("宋体", 12F); + this.colorButton2.ForeColor = System.Drawing.Color.White; + this.colorButton2.Location = new System.Drawing.Point(151, 20); + this.colorButton2.Name = "colorButton2"; + this.colorButton2.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton2.Size = new System.Drawing.Size(90, 37); + this.colorButton2.TabIndex = 2; + this.colorButton2.Tag = "删除"; + this.colorButton2.Text = "删 除"; + this.colorButton2.UseVisualStyleBackColor = false; + this.colorButton2.Click += new System.EventHandler(this.colorButton1_Click); + // + // colorButton3 + // + this.colorButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.colorButton3.Font = new System.Drawing.Font("宋体", 12F); + this.colorButton3.ForeColor = System.Drawing.Color.White; + this.colorButton3.Location = new System.Drawing.Point(268, 20); + this.colorButton3.Name = "colorButton3"; + this.colorButton3.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton3.Size = new System.Drawing.Size(90, 37); + this.colorButton3.TabIndex = 3; + this.colorButton3.Tag = "补打"; + this.colorButton3.Text = "补 打"; + this.colorButton3.UseVisualStyleBackColor = false; + this.colorButton3.Click += new System.EventHandler(this.colorButton1_Click); + // + // colorButton4 + // + this.colorButton4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.colorButton4.Font = new System.Drawing.Font("宋体", 12F); + this.colorButton4.ForeColor = System.Drawing.Color.White; + this.colorButton4.Location = new System.Drawing.Point(394, 20); + this.colorButton4.Name = "colorButton4"; + this.colorButton4.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton4.Size = new System.Drawing.Size(90, 37); + this.colorButton4.TabIndex = 4; + this.colorButton4.Tag = ""; + this.colorButton4.Text = "全 部"; + this.colorButton4.UseVisualStyleBackColor = false; + this.colorButton4.Click += new System.EventHandler(this.colorButton1_Click); + // + // LogForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(859, 671); + this.Controls.Add(this.colorButton4); + this.Controls.Add(this.colorButton3); + this.Controls.Add(this.colorButton2); + this.Controls.Add(this.colorButton1); + this.Controls.Add(this.listView1); + this.Name = "LogForm"; + this.Text = "操作日志"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ColumnHeader BarCode; + private System.Windows.Forms.ColumnHeader Action; + private System.Windows.Forms.ColumnHeader Message; + private System.Windows.Forms.ColumnHeader Time; + private Controls.ColorButton colorButton1; + private Controls.ColorButton colorButton2; + private Controls.ColorButton colorButton3; + private Controls.ColorButton colorButton4; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/LogForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/LogForm.cs new file mode 100644 index 0000000..a0cd6e3 --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/LogForm.cs @@ -0,0 +1,52 @@ +using ButcherFactory.BO.LocalBL; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory.SegmentProductionAuto_ +{ + public partial class LogForm : Form + { + public LogForm() + { + InitializeComponent(); + this.Load += LogForm_Load; + } + + void LogForm_Load(object sender, EventArgs e) + { + BindListView(null); + } + + void BindListView(string type) + { + listView1.Items.Clear(); + var list = SegmentProductionBL.GetLog(type); + foreach (var u in list) + { + ListViewItem lv = new ListViewItem(); + lv.Text = u.BarCode; + lv.SubItems.Add(u.Action); + lv.SubItems.Add(u.Message); + lv.SubItems.Add(u.Time.ToString("yyyy/MM/dd HH:mm")); + listView1.Items.Add(lv); + } + listView1.Refresh(); + } + + private void colorButton1_Click(object sender, EventArgs e) + { + var tag = (sender as Button).Tag; + if (tag == null) + BindListView(null); + else + BindListView(tag.ToString()); + } + } +} diff --git a/ButcherFactory.Form/SegmentProductionAuto_/LogForm.resx b/ButcherFactory.Form/SegmentProductionAuto_/LogForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/LogForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs index 426c58c..99e77d1 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -28,515 +28,532 @@ /// 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 dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - this.uLabel3 = new WinFormControl.ULabel(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.taskDataGrid = new WinFormControl.UDataGridView(); - this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.GoodsLabel = new WinFormControl.ULabel(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.msglbl = new System.Windows.Forms.Label(); - this.closeBtn = new ButcherFactory.Controls.ColorButton(); - this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); - this.barPrintCheck = new System.Windows.Forms.CheckBox(); - this.uTimerLabel1 = new WinFormControl.UTimerLabel(); - this.productBatchSelect = new System.Windows.Forms.ComboBox(); - this.workUnitSelect = new System.Windows.Forms.ComboBox(); - this.uLabel1 = new WinFormControl.ULabel(); - this.uLabel2 = new WinFormControl.ULabel(); - this.netStateWatch1 = new WinFormControl.NetStateWatch(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.deleteBtn = new ButcherFactory.Controls.ColorButton(); - this.rePrintBtn = new ButcherFactory.Controls.ColorButton(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.historyDataGrid = new WinFormControl.UDataGridView(); - this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit(); - this.SuspendLayout(); - // - // uLabel3 - // - this.uLabel3.AutoSize = true; - this.uLabel3.BackColor = System.Drawing.Color.White; - this.uLabel3.Font = new System.Drawing.Font("宋体", 12F); - this.uLabel3.Location = new System.Drawing.Point(8, 0); - this.uLabel3.Name = "uLabel3"; - this.uLabel3.Size = new System.Drawing.Size(72, 16); - this.uLabel3.TabIndex = 1; - this.uLabel3.Text = "生产历史"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.taskDataGrid); - this.groupBox2.Controls.Add(this.GoodsLabel); - this.groupBox2.Location = new System.Drawing.Point(3, 3); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(5); - this.groupBox2.Size = new System.Drawing.Size(452, 120); - this.groupBox2.TabIndex = 4; - this.groupBox2.TabStop = false; - // - // taskDataGrid - // - this.taskDataGrid.AllowUserToAddRows = false; - this.taskDataGrid.AllowUserToDeleteRows = false; - this.taskDataGrid.AllowUserToResizeColumns = false; - this.taskDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; - this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.T_Item, - this.T_Need, - this.T_Done, - this.T_Last}); - this.taskDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.taskDataGrid.Location = new System.Drawing.Point(5, 19); - this.taskDataGrid.MultiSelect = false; - this.taskDataGrid.Name = "taskDataGrid"; - this.taskDataGrid.ReadOnly = true; - this.taskDataGrid.RowHeadersVisible = false; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; - this.taskDataGrid.RowTemplate.Height = 23; - this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.taskDataGrid.Size = new System.Drawing.Size(442, 96); - this.taskDataGrid.TabIndex = 2; - // - // T_Item - // - this.T_Item.DataPropertyName = "Item"; - this.T_Item.HeaderText = "项目"; - this.T_Item.Name = "T_Item"; - this.T_Item.ReadOnly = true; - // - // T_Need - // - this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.T_Need.DataPropertyName = "Need"; - dataGridViewCellStyle3.Format = "#0.######"; - this.T_Need.DefaultCellStyle = dataGridViewCellStyle3; - this.T_Need.HeaderText = "订货"; - this.T_Need.Name = "T_Need"; - this.T_Need.ReadOnly = true; - // - // T_Done - // - this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.T_Done.DataPropertyName = "Done"; - dataGridViewCellStyle4.Format = "#0.######"; - this.T_Done.DefaultCellStyle = dataGridViewCellStyle4; - this.T_Done.HeaderText = "完工"; - this.T_Done.Name = "T_Done"; - this.T_Done.ReadOnly = true; - // - // T_Last - // - this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.T_Last.DataPropertyName = "Last"; - dataGridViewCellStyle5.Format = "#0.######"; - this.T_Last.DefaultCellStyle = dataGridViewCellStyle5; - this.T_Last.HeaderText = "剩余"; - this.T_Last.Name = "T_Last"; - this.T_Last.ReadOnly = true; - // - // GoodsLabel - // - this.GoodsLabel.AutoSize = true; - this.GoodsLabel.BackColor = System.Drawing.Color.White; - this.GoodsLabel.Font = new System.Drawing.Font("宋体", 12F); - this.GoodsLabel.ForeColor = System.Drawing.Color.Red; - this.GoodsLabel.Location = new System.Drawing.Point(8, 0); - this.GoodsLabel.Name = "GoodsLabel"; - this.GoodsLabel.Size = new System.Drawing.Size(72, 16); - this.GoodsLabel.TabIndex = 1; - this.GoodsLabel.Text = "存货名称"; - // - // splitContainer1 - // - this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer1.IsSplitterFixed = true; - this.splitContainer1.Location = new System.Drawing.Point(0, 0); - this.splitContainer1.Name = "splitContainer1"; - this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.msglbl); - this.splitContainer1.Panel1.Controls.Add(this.closeBtn); - this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); - this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck); - this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1); - this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect); - this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect); - this.splitContainer1.Panel1.Controls.Add(this.uLabel1); - this.splitContainer1.Panel1.Controls.Add(this.uLabel2); - this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); - this.splitContainer1.Size = new System.Drawing.Size(1226, 602); - this.splitContainer1.SplitterDistance = 87; - this.splitContainer1.TabIndex = 1; - // - // msglbl - // - this.msglbl.AutoSize = true; - this.msglbl.ForeColor = System.Drawing.Color.Red; - this.msglbl.Location = new System.Drawing.Point(458, 14); - this.msglbl.Name = "msglbl"; - this.msglbl.Size = new System.Drawing.Size(101, 12); - this.msglbl.TabIndex = 24; - this.msglbl.Text = "正在获取基础信息"; - // - // closeBtn - // - this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); - this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.ForeColor = System.Drawing.Color.White; - this.closeBtn.Location = new System.Drawing.Point(1109, 7); - this.closeBtn.Name = "closeBtn"; - this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.closeBtn.Size = new System.Drawing.Size(111, 41); - this.closeBtn.TabIndex = 18; - this.closeBtn.Text = "关闭"; - this.closeBtn.UseVisualStyleBackColor = false; - this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); - // - // uWeightControl1 - // - this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; - this.uWeightControl1.Location = new System.Drawing.Point(12, 7); - this.uWeightControl1.Name = "uWeightControl1"; - this.uWeightControl1.Size = new System.Drawing.Size(262, 74); - this.uWeightControl1.TabIndex = 17; - this.uWeightControl1.WeightFalg = null; - // - // barPrintCheck - // - this.barPrintCheck.AutoSize = true; - this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); - this.barPrintCheck.Location = new System.Drawing.Point(292, 50); - this.barPrintCheck.Name = "barPrintCheck"; - this.barPrintCheck.Size = new System.Drawing.Size(108, 24); - this.barPrintCheck.TabIndex = 16; - this.barPrintCheck.Text = "启用打码"; - this.barPrintCheck.UseVisualStyleBackColor = true; - // - // uTimerLabel1 - // - this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.uTimerLabel1.AutoSize = true; - this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; - this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F); - this.uTimerLabel1.Format = "M月d日 H:mm:ss"; - this.uTimerLabel1.Location = new System.Drawing.Point(1084, 53); - this.uTimerLabel1.Name = "uTimerLabel1"; - this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); - this.uTimerLabel1.TabIndex = 14; - this.uTimerLabel1.Text = "4月21日 16:32:19"; - // - // productBatchSelect - // - this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F); - this.productBatchSelect.FormattingEnabled = true; - this.productBatchSelect.Location = new System.Drawing.Point(903, 47); - this.productBatchSelect.Name = "productBatchSelect"; - this.productBatchSelect.Size = new System.Drawing.Size(170, 28); - this.productBatchSelect.TabIndex = 11; - // - // workUnitSelect - // - this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F); - this.workUnitSelect.FormattingEnabled = true; - this.workUnitSelect.Location = new System.Drawing.Point(903, 11); - this.workUnitSelect.Name = "workUnitSelect"; - this.workUnitSelect.Size = new System.Drawing.Size(170, 28); - this.workUnitSelect.TabIndex = 10; - // - // uLabel1 - // - this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.uLabel1.AutoSize = true; - this.uLabel1.BackColor = System.Drawing.Color.Transparent; - this.uLabel1.Font = new System.Drawing.Font("宋体", 15F); - this.uLabel1.Location = new System.Drawing.Point(802, 14); - this.uLabel1.Name = "uLabel1"; - this.uLabel1.Size = new System.Drawing.Size(109, 20); - this.uLabel1.TabIndex = 12; - this.uLabel1.Text = "工作单元:"; - // - // uLabel2 - // - this.uLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.uLabel2.AutoSize = true; - this.uLabel2.BackColor = System.Drawing.Color.Transparent; - this.uLabel2.Font = new System.Drawing.Font("宋体", 15F); - this.uLabel2.Location = new System.Drawing.Point(802, 50); - this.uLabel2.Name = "uLabel2"; - this.uLabel2.Size = new System.Drawing.Size(109, 20); - this.uLabel2.TabIndex = 13; - this.uLabel2.Text = "生产批次:"; - // - // netStateWatch1 - // - this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; - this.netStateWatch1.Location = new System.Drawing.Point(292, 2); - this.netStateWatch1.Name = "netStateWatch1"; - this.netStateWatch1.Size = new System.Drawing.Size(90, 39); - this.netStateWatch1.TabIndex = 1; - // - // splitContainer2 - // - this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer2.Location = new System.Drawing.Point(0, 0); - this.splitContainer2.Name = "splitContainer2"; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.goodsSetBtn); - this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel2); - this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel1); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.deleteBtn); - this.splitContainer2.Panel2.Controls.Add(this.rePrintBtn); - this.splitContainer2.Panel2.Controls.Add(this.groupBox1); - this.splitContainer2.Panel2.Controls.Add(this.groupBox2); - this.splitContainer2.Size = new System.Drawing.Size(1226, 511); - this.splitContainer2.SplitterDistance = 761; - this.splitContainer2.TabIndex = 0; - // - // goodsSetBtn - // - this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); - this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); - this.goodsSetBtn.ForeColor = System.Drawing.Color.White; - this.goodsSetBtn.Location = new System.Drawing.Point(645, 3); - this.goodsSetBtn.Name = "goodsSetBtn"; - this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); - this.goodsSetBtn.TabIndex = 19; - this.goodsSetBtn.Text = "产品设置"; - this.goodsSetBtn.UseVisualStyleBackColor = false; - this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click); - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel2.AutoScroll = true; - this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowLayoutPanel2.Location = new System.Drawing.Point(-1, 75); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(757, 434); - this.flowLayoutPanel2.TabIndex = 24; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, -1); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); - this.flowLayoutPanel1.TabIndex = 22; - // - // deleteBtn - // - this.deleteBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.deleteBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); - this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); - this.deleteBtn.ForeColor = System.Drawing.Color.White; - this.deleteBtn.Location = new System.Drawing.Point(178, 129); - this.deleteBtn.Name = "deleteBtn"; - this.deleteBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.deleteBtn.Size = new System.Drawing.Size(111, 41); - this.deleteBtn.TabIndex = 23; - this.deleteBtn.Text = "删除"; - this.deleteBtn.UseVisualStyleBackColor = false; - this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click); - // - // rePrintBtn - // - this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); - this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F); - this.rePrintBtn.ForeColor = System.Drawing.Color.White; - this.rePrintBtn.Location = new System.Drawing.Point(338, 129); - this.rePrintBtn.Name = "rePrintBtn"; - this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.rePrintBtn.Size = new System.Drawing.Size(111, 41); - this.rePrintBtn.TabIndex = 22; - this.rePrintBtn.Text = "补打"; - this.rePrintBtn.UseVisualStyleBackColor = false; - this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click); - // - // groupBox1 - // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.groupBox1.Controls.Add(this.historyDataGrid); - this.groupBox1.Controls.Add(this.uLabel3); - this.groupBox1.Location = new System.Drawing.Point(8, 169); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(5); - this.groupBox1.Size = new System.Drawing.Size(447, 332); - this.groupBox1.TabIndex = 5; - this.groupBox1.TabStop = false; - // - // historyDataGrid - // - this.historyDataGrid.AllowUserToAddRows = false; - this.historyDataGrid.AllowUserToDeleteRows = false; - this.historyDataGrid.AllowUserToResizeColumns = false; - this.historyDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; - this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; - this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; - this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.H_ID, - this.H_RowIndex, - this.H_BarCode, - this.H_Goods_Name, - this.H_Weight}); - this.historyDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.historyDataGrid.Location = new System.Drawing.Point(5, 19); - this.historyDataGrid.MultiSelect = false; - this.historyDataGrid.Name = "historyDataGrid"; - this.historyDataGrid.ReadOnly = true; - this.historyDataGrid.RowHeadersVisible = false; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle10; - this.historyDataGrid.RowTemplate.Height = 23; - this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.historyDataGrid.Size = new System.Drawing.Size(437, 308); - this.historyDataGrid.TabIndex = 2; - // - // H_ID - // - this.H_ID.DataPropertyName = "ID"; - this.H_ID.HeaderText = "ID"; - this.H_ID.Name = "H_ID"; - this.H_ID.ReadOnly = true; - this.H_ID.Visible = false; - // - // H_RowIndex - // - this.H_RowIndex.DataPropertyName = "RowIndex"; - this.H_RowIndex.HeaderText = "序号"; - this.H_RowIndex.Name = "H_RowIndex"; - this.H_RowIndex.ReadOnly = true; - this.H_RowIndex.Width = 70; - // - // H_BarCode - // - this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_BarCode.DataPropertyName = "ShortCode"; - this.H_BarCode.HeaderText = "条码"; - this.H_BarCode.Name = "H_BarCode"; - this.H_BarCode.ReadOnly = true; - // - // H_Goods_Name - // - this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_Goods_Name.DataPropertyName = "Goods_Name"; - this.H_Goods_Name.HeaderText = "产品"; - this.H_Goods_Name.Name = "H_Goods_Name"; - this.H_Goods_Name.ReadOnly = true; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle9.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle9; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - // - // SegmentProductionAutoForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(1226, 602); - this.Controls.Add(this.splitContainer1); - this.Name = "SegmentProductionAutoForm"; - this.Text = "分割品车间称重计数"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel1.PerformLayout(); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); - this.splitContainer2.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit(); - this.ResumeLayout(false); - + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + this.uLabel3 = new WinFormControl.ULabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.taskDataGrid = new WinFormControl.UDataGridView(); + this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.GoodsLabel = new WinFormControl.ULabel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.msglbl = new System.Windows.Forms.Label(); + this.barPrintCheck = new System.Windows.Forms.CheckBox(); + this.uTimerLabel1 = new WinFormControl.UTimerLabel(); + this.productBatchSelect = new System.Windows.Forms.ComboBox(); + this.workUnitSelect = new System.Windows.Forms.ComboBox(); + this.uLabel1 = new WinFormControl.ULabel(); + this.uLabel2 = new WinFormControl.ULabel(); + this.netStateWatch1 = new WinFormControl.NetStateWatch(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.historyDataGrid = new WinFormControl.UDataGridView(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.logBtn = new ButcherFactory.Controls.ColorButton(); + this.closeBtn = new ButcherFactory.Controls.ColorButton(); + this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); + this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); + this.deleteBtn = new ButcherFactory.Controls.ColorButton(); + this.rePrintBtn = new ButcherFactory.Controls.ColorButton(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit(); + this.SuspendLayout(); + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.White; + this.uLabel3.Font = new System.Drawing.Font("宋体", 12F); + this.uLabel3.Location = new System.Drawing.Point(8, 0); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(72, 16); + this.uLabel3.TabIndex = 1; + this.uLabel3.Text = "生产历史"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.taskDataGrid); + this.groupBox2.Controls.Add(this.GoodsLabel); + this.groupBox2.Location = new System.Drawing.Point(3, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(5); + this.groupBox2.Size = new System.Drawing.Size(452, 120); + this.groupBox2.TabIndex = 4; + this.groupBox2.TabStop = false; + // + // taskDataGrid + // + this.taskDataGrid.AllowUserToAddRows = false; + this.taskDataGrid.AllowUserToDeleteRows = false; + this.taskDataGrid.AllowUserToResizeColumns = false; + this.taskDataGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; + this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.T_Item, + this.T_Need, + this.T_Done, + this.T_Last}); + this.taskDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.taskDataGrid.Location = new System.Drawing.Point(5, 19); + this.taskDataGrid.MultiSelect = false; + this.taskDataGrid.Name = "taskDataGrid"; + this.taskDataGrid.ReadOnly = true; + this.taskDataGrid.RowHeadersVisible = false; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; + this.taskDataGrid.RowTemplate.Height = 23; + this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.taskDataGrid.Size = new System.Drawing.Size(442, 96); + this.taskDataGrid.TabIndex = 2; + // + // T_Item + // + this.T_Item.DataPropertyName = "Item"; + this.T_Item.HeaderText = "项目"; + this.T_Item.Name = "T_Item"; + this.T_Item.ReadOnly = true; + // + // T_Need + // + this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Need.DataPropertyName = "Need"; + dataGridViewCellStyle3.Format = "#0.######"; + this.T_Need.DefaultCellStyle = dataGridViewCellStyle3; + this.T_Need.HeaderText = "订货"; + this.T_Need.Name = "T_Need"; + this.T_Need.ReadOnly = true; + // + // T_Done + // + this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Done.DataPropertyName = "Done"; + dataGridViewCellStyle4.Format = "#0.######"; + this.T_Done.DefaultCellStyle = dataGridViewCellStyle4; + this.T_Done.HeaderText = "完工"; + this.T_Done.Name = "T_Done"; + this.T_Done.ReadOnly = true; + // + // T_Last + // + this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Last.DataPropertyName = "Last"; + dataGridViewCellStyle5.Format = "#0.######"; + this.T_Last.DefaultCellStyle = dataGridViewCellStyle5; + this.T_Last.HeaderText = "剩余"; + this.T_Last.Name = "T_Last"; + this.T_Last.ReadOnly = true; + // + // GoodsLabel + // + this.GoodsLabel.AutoSize = true; + this.GoodsLabel.BackColor = System.Drawing.Color.White; + this.GoodsLabel.Font = new System.Drawing.Font("宋体", 12F); + this.GoodsLabel.ForeColor = System.Drawing.Color.Red; + this.GoodsLabel.Location = new System.Drawing.Point(8, 0); + this.GoodsLabel.Name = "GoodsLabel"; + this.GoodsLabel.Size = new System.Drawing.Size(72, 16); + this.GoodsLabel.TabIndex = 1; + this.GoodsLabel.Text = "存货名称"; + // + // splitContainer1 + // + this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.IsSplitterFixed = true; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.logBtn); + this.splitContainer1.Panel1.Controls.Add(this.msglbl); + this.splitContainer1.Panel1.Controls.Add(this.closeBtn); + this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); + this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck); + this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1); + this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect); + this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect); + this.splitContainer1.Panel1.Controls.Add(this.uLabel1); + this.splitContainer1.Panel1.Controls.Add(this.uLabel2); + this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(1226, 602); + this.splitContainer1.SplitterDistance = 87; + this.splitContainer1.TabIndex = 1; + // + // msglbl + // + this.msglbl.AutoSize = true; + this.msglbl.ForeColor = System.Drawing.Color.Red; + this.msglbl.Location = new System.Drawing.Point(458, 14); + this.msglbl.Name = "msglbl"; + this.msglbl.Size = new System.Drawing.Size(101, 12); + this.msglbl.TabIndex = 24; + this.msglbl.Text = "正在获取基础信息"; + // + // barPrintCheck + // + this.barPrintCheck.AutoSize = true; + this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); + this.barPrintCheck.Location = new System.Drawing.Point(292, 50); + this.barPrintCheck.Name = "barPrintCheck"; + this.barPrintCheck.Size = new System.Drawing.Size(108, 24); + this.barPrintCheck.TabIndex = 16; + this.barPrintCheck.Text = "启用打码"; + this.barPrintCheck.UseVisualStyleBackColor = true; + // + // uTimerLabel1 + // + this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uTimerLabel1.AutoSize = true; + this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; + this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F); + this.uTimerLabel1.Format = "M月d日 H:mm:ss"; + this.uTimerLabel1.Location = new System.Drawing.Point(1084, 53); + this.uTimerLabel1.Name = "uTimerLabel1"; + this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); + this.uTimerLabel1.TabIndex = 14; + this.uTimerLabel1.Text = "4月21日 16:32:19"; + // + // productBatchSelect + // + this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F); + this.productBatchSelect.FormattingEnabled = true; + this.productBatchSelect.Location = new System.Drawing.Point(903, 47); + this.productBatchSelect.Name = "productBatchSelect"; + this.productBatchSelect.Size = new System.Drawing.Size(170, 28); + this.productBatchSelect.TabIndex = 11; + // + // workUnitSelect + // + this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F); + this.workUnitSelect.FormattingEnabled = true; + this.workUnitSelect.Location = new System.Drawing.Point(903, 11); + this.workUnitSelect.Name = "workUnitSelect"; + this.workUnitSelect.Size = new System.Drawing.Size(170, 28); + this.workUnitSelect.TabIndex = 10; + // + // uLabel1 + // + this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uLabel1.AutoSize = true; + this.uLabel1.BackColor = System.Drawing.Color.Transparent; + this.uLabel1.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel1.Location = new System.Drawing.Point(802, 14); + this.uLabel1.Name = "uLabel1"; + this.uLabel1.Size = new System.Drawing.Size(109, 20); + this.uLabel1.TabIndex = 12; + this.uLabel1.Text = "工作单元:"; + // + // uLabel2 + // + this.uLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uLabel2.AutoSize = true; + this.uLabel2.BackColor = System.Drawing.Color.Transparent; + this.uLabel2.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel2.Location = new System.Drawing.Point(802, 50); + this.uLabel2.Name = "uLabel2"; + this.uLabel2.Size = new System.Drawing.Size(109, 20); + this.uLabel2.TabIndex = 13; + this.uLabel2.Text = "生产批次:"; + // + // netStateWatch1 + // + this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; + this.netStateWatch1.Location = new System.Drawing.Point(292, 2); + this.netStateWatch1.Name = "netStateWatch1"; + this.netStateWatch1.Size = new System.Drawing.Size(90, 39); + this.netStateWatch1.TabIndex = 1; + // + // splitContainer2 + // + this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.goodsSetBtn); + this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel2); + this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel1); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.deleteBtn); + this.splitContainer2.Panel2.Controls.Add(this.rePrintBtn); + this.splitContainer2.Panel2.Controls.Add(this.groupBox1); + this.splitContainer2.Panel2.Controls.Add(this.groupBox2); + this.splitContainer2.Size = new System.Drawing.Size(1226, 511); + this.splitContainer2.SplitterDistance = 761; + this.splitContainer2.TabIndex = 0; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel2.AutoScroll = true; + this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel2.Location = new System.Drawing.Point(-1, 75); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(757, 434); + this.flowLayoutPanel2.TabIndex = 24; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, -1); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); + this.flowLayoutPanel1.TabIndex = 22; + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.groupBox1.Controls.Add(this.historyDataGrid); + this.groupBox1.Controls.Add(this.uLabel3); + this.groupBox1.Location = new System.Drawing.Point(8, 169); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(5); + this.groupBox1.Size = new System.Drawing.Size(447, 332); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + // + // historyDataGrid + // + this.historyDataGrid.AllowUserToAddRows = false; + this.historyDataGrid.AllowUserToDeleteRows = false; + this.historyDataGrid.AllowUserToResizeColumns = false; + this.historyDataGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; + this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.H_ID, + this.H_RowIndex, + this.H_BarCode, + this.H_Goods_Name, + this.H_Weight}); + this.historyDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.historyDataGrid.Location = new System.Drawing.Point(5, 19); + this.historyDataGrid.MultiSelect = false; + this.historyDataGrid.Name = "historyDataGrid"; + this.historyDataGrid.ReadOnly = true; + this.historyDataGrid.RowHeadersVisible = false; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle10; + this.historyDataGrid.RowTemplate.Height = 23; + this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.historyDataGrid.Size = new System.Drawing.Size(437, 308); + this.historyDataGrid.TabIndex = 2; + // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // H_RowIndex + // + this.H_RowIndex.DataPropertyName = "RowIndex"; + this.H_RowIndex.HeaderText = "序号"; + this.H_RowIndex.Name = "H_RowIndex"; + this.H_RowIndex.ReadOnly = true; + this.H_RowIndex.Width = 70; + // + // H_BarCode + // + this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_BarCode.DataPropertyName = "ShortCode"; + this.H_BarCode.HeaderText = "条码"; + this.H_BarCode.Name = "H_BarCode"; + this.H_BarCode.ReadOnly = true; + // + // H_Goods_Name + // + this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.H_Goods_Name.DataPropertyName = "Goods_Name"; + this.H_Goods_Name.HeaderText = "产品"; + this.H_Goods_Name.Name = "H_Goods_Name"; + this.H_Goods_Name.ReadOnly = true; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle9.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle9; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + // + // logBtn + // + this.logBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.logBtn.BackColor = System.Drawing.Color.CadetBlue; + this.logBtn.Font = new System.Drawing.Font("宋体", 15F); + this.logBtn.ForeColor = System.Drawing.Color.White; + this.logBtn.Location = new System.Drawing.Point(670, 7); + this.logBtn.Name = "logBtn"; + this.logBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.logBtn.Size = new System.Drawing.Size(111, 41); + this.logBtn.TabIndex = 25; + this.logBtn.Text = "日志"; + this.logBtn.UseVisualStyleBackColor = false; + this.logBtn.Click += new System.EventHandler(this.logBtn_Click); + // + // closeBtn + // + this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.White; + this.closeBtn.Location = new System.Drawing.Point(1109, 7); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.closeBtn.Size = new System.Drawing.Size(111, 41); + this.closeBtn.TabIndex = 18; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = false; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // uWeightControl1 + // + this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; + this.uWeightControl1.Location = new System.Drawing.Point(12, 7); + this.uWeightControl1.Name = "uWeightControl1"; + this.uWeightControl1.Size = new System.Drawing.Size(262, 74); + this.uWeightControl1.TabIndex = 17; + this.uWeightControl1.WeightFalg = null; + // + // goodsSetBtn + // + this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); + this.goodsSetBtn.ForeColor = System.Drawing.Color.White; + this.goodsSetBtn.Location = new System.Drawing.Point(645, 3); + this.goodsSetBtn.Name = "goodsSetBtn"; + this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); + this.goodsSetBtn.TabIndex = 19; + this.goodsSetBtn.Text = "产品设置"; + this.goodsSetBtn.UseVisualStyleBackColor = false; + this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click); + // + // deleteBtn + // + this.deleteBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.deleteBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); + this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); + this.deleteBtn.ForeColor = System.Drawing.Color.White; + this.deleteBtn.Location = new System.Drawing.Point(178, 129); + this.deleteBtn.Name = "deleteBtn"; + this.deleteBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.deleteBtn.Size = new System.Drawing.Size(111, 41); + this.deleteBtn.TabIndex = 23; + this.deleteBtn.Text = "删除"; + this.deleteBtn.UseVisualStyleBackColor = false; + this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click); + // + // rePrintBtn + // + this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); + this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F); + this.rePrintBtn.ForeColor = System.Drawing.Color.White; + this.rePrintBtn.Location = new System.Drawing.Point(338, 129); + this.rePrintBtn.Name = "rePrintBtn"; + this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.rePrintBtn.Size = new System.Drawing.Size(111, 41); + this.rePrintBtn.TabIndex = 22; + this.rePrintBtn.Text = "补打"; + this.rePrintBtn.UseVisualStyleBackColor = false; + this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click); + // + // SegmentProductionAutoForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1226, 602); + this.Controls.Add(this.splitContainer1); + this.Name = "SegmentProductionAutoForm"; + this.Text = "分割品车间称重计数"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit(); + this.ResumeLayout(false); + } #endregion @@ -572,6 +589,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex; private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode; private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; + private Controls.ColorButton logBtn; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index a801ecc..d2d493d 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -41,20 +41,11 @@ namespace ButcherFactory.SegmentProductionAuto_ long? batchID; DateTime? batchDate; NotAuto.SegmentProductionFormConfig config; - public SegmentProductionAutoForm() { InitializeComponent(); - netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500); - this.FormClosing += delegate - { - if (initTask != null && initTask.IsAlive) - initTask.Abort(); - if (uploadData != null && uploadData.IsAlive) - uploadData.Abort(); - if (checkInStoreState != null && checkInStoreState.IsAlive) - checkInStoreState.Abort(); - }; + netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500); + this.FormClosing += SegmentProductionAutoForm_FormClosing; workUnitSelect.SelectedIndexChanged += delegate { if (workUnitSelect.SelectedValue == null) @@ -77,6 +68,25 @@ namespace ButcherFactory.SegmentProductionAuto_ batchDate = entity.Date; } }; + } + + void SegmentProductionAutoForm_FormClosing(object sender, FormClosingEventArgs e) + { + var unSyncCount = SegmentProductionBL.GetUnSyncCount(); + if (unSyncCount > 0) + { + if (MessageBox.Show(string.Format("{0}条数据等待上传,确认关闭?", unSyncCount), "关闭确认", MessageBoxButtons.OKCancel) != DialogResult.OK) + { + e.Cancel = true; + } + } + + if (initTask != null && initTask.IsAlive) + initTask.Abort(); + if (uploadData != null && uploadData.IsAlive) + uploadData.Abort(); + if (checkInStoreState != null && checkInStoreState.IsAlive) + checkInStoreState.Abort(); } protected override void OnLoad(EventArgs e) @@ -208,8 +218,11 @@ namespace ButcherFactory.SegmentProductionAuto_ { var template = config.Template; if (detail.GoodsType.HasValue) - template = detail.GoodsType == 0 ? "SegmentProductionPrint.html" : "SegmentProductionPrint1.html"; - NotAuto.SegmentProductionPrint.Print(entity, batchDate, template); + template = detail.GoodsType == 0 ? "SegmentProductionPrint.html" : "SegmentProductionPrint1.html"; + NotAuto.SegmentProductionPrint.Print(entity, batchDate, template); + var log = new SegmentLog(entity.BarCode, "打印"); + log.Message = string.Format("存货名称:{0} 重量:{1:#0.###}", entity.Goods_Name, entity.Weight); + SegmentProductionBL.InsertLog(log); } var thd = new Thread(new ParameterizedThreadStart(RefreshTask)); thd.Start(entity); @@ -309,7 +322,10 @@ namespace ButcherFactory.SegmentProductionAuto_ item = row[0].DataBoundItem as SegmentProduction; else item = historyList.First(); - NotAuto.SegmentProductionPrint.Print(item, batchDate, config.Template); + NotAuto.SegmentProductionPrint.Print(item, batchDate, config.Template); + var log = new SegmentLog(item.BarCode, "补打"); + log.Message = string.Format("存货名称:{0} 重量:{1:#0.###}", item.Goods_Name, item.Weight); + SegmentProductionBL.InsertLog(log); } } @@ -325,8 +341,14 @@ namespace ButcherFactory.SegmentProductionAuto_ return; if (MessageBox.Show("确定删除选中记录?", "删除确认", MessageBoxButtons.OKCancel) != DialogResult.OK) return; - var tag = historyDataGrid.SelectedRows[0].DataBoundItem as SegmentProduction; - SegmentProductionBL.SetAsDelete(tag.ID, tag.BarCode); + var tag = historyDataGrid.SelectedRows[0].DataBoundItem as SegmentProduction; + if (tag.CreateTime.AddMinutes(2) < DateTime.Now) + { + MessageBox.Show("已超出可删除时间范围"); + return; + } + SegmentProductionBL.Delete(tag); + //SegmentProductionBL.SetAsDelete(tag.ID, tag.BarCode); historyList.Remove(tag); historyDataGrid.DataSource = historyList; historyDataGrid.ClearSelection(); @@ -334,6 +356,11 @@ namespace ButcherFactory.SegmentProductionAuto_ var thd = new Thread(new ParameterizedThreadStart(RefreshTask)); thd.Start(tag); + } + + private void logBtn_Click(object sender, EventArgs e) + { + new LogForm().ShowDialog(); } } } diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx index e6b3498..f2185bc 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx @@ -1,129 +1,129 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - True - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + \ No newline at end of file diff --git a/ButcherFactory.Form/WeightCount_/DiscontWeightSetDialog.cs b/ButcherFactory.Form/WeightCount_/DiscontWeightSetDialog.cs index 3750774..7d1357f 100644 --- a/ButcherFactory.Form/WeightCount_/DiscontWeightSetDialog.cs +++ b/ButcherFactory.Form/WeightCount_/DiscontWeightSetDialog.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using WinFormControl; namespace ButcherFactory.WeightCount_ { @@ -129,6 +130,22 @@ namespace ButcherFactory.WeightCount_ //判断当前鼠标在哪个“按钮”范围内 if (rectDel.Contains(curPosition))//- SubStract(entity); + else if (rectMod.Contains(curPosition)) + { + var keyBoard = new NumberPad(); + if (keyBoard.ShowDialog() == true) + { + var v = 0; + if (int.TryParse(keyBoard.Result, out v) && v > 0) + { + entity.Number = v; + mGrid.Refresh(); + BindTotalLbl(); + } + else + throw new Exception("输入数量有误!"); + } + } else if (rectLook.Contains(curPosition))//+ Add(entity); } diff --git a/ButcherFactory.Form/WeightCount_/WeightCountForm.Designer.cs b/ButcherFactory.Form/WeightCount_/WeightCountForm.Designer.cs index 537b11b..4b75f59 100644 --- a/ButcherFactory.Form/WeightCount_/WeightCountForm.Designer.cs +++ b/ButcherFactory.Form/WeightCount_/WeightCountForm.Designer.cs @@ -28,19 +28,19 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WeightCountForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = 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 dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); this.historyDataGrid = new WinFormControl.UDataGridView(); this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -55,6 +55,7 @@ this.storeSelect = new System.Windows.Forms.ComboBox(); this.uLabel5 = new WinFormControl.ULabel(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.barPrintCheck = new System.Windows.Forms.CheckBox(); this.numSetBtn = new WinFormControl.UButton(); this.productBatchSelect = new System.Windows.Forms.ComboBox(); this.uLabel2 = new WinFormControl.ULabel(); @@ -69,6 +70,8 @@ this.uLabel7 = new WinFormControl.ULabel(); this.uLabel6 = new WinFormControl.ULabel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.deleteBtn = new WinFormControl.UButton(); + this.rePrint = new WinFormControl.UButton(); this.needSubmitGrid = new WinFormControl.UDataGridView(); this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -80,8 +83,6 @@ this.numFlowPanel = new System.Windows.Forms.FlowLayoutPanel(); this.submitBtn = new WinFormControl.UButton(); this.uLabel3 = new WinFormControl.ULabel(); - this.barPrintCheck = new System.Windows.Forms.CheckBox(); - this.rePrint = new WinFormControl.UButton(); ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -98,15 +99,15 @@ this.historyDataGrid.AllowUserToDeleteRows = false; this.historyDataGrid.AllowUserToResizeColumns = false; this.historyDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle37; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle38.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle38.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle38; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_ID, @@ -122,9 +123,9 @@ this.historyDataGrid.Name = "historyDataGrid"; this.historyDataGrid.ReadOnly = true; this.historyDataGrid.RowHeadersVisible = false; - dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle42; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; this.historyDataGrid.RowTemplate.Height = 23; this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyDataGrid.Size = new System.Drawing.Size(683, 158); @@ -163,8 +164,8 @@ // H_GrossWeight // this.H_GrossWeight.DataPropertyName = "GrossWeight"; - dataGridViewCellStyle39.Format = "#0.######"; - this.H_GrossWeight.DefaultCellStyle = dataGridViewCellStyle39; + dataGridViewCellStyle3.Format = "#0.######"; + this.H_GrossWeight.DefaultCellStyle = dataGridViewCellStyle3; this.H_GrossWeight.HeaderText = "毛重"; this.H_GrossWeight.Name = "H_GrossWeight"; this.H_GrossWeight.ReadOnly = true; @@ -172,8 +173,8 @@ // H_Discont // this.H_Discont.DataPropertyName = "Discont"; - dataGridViewCellStyle40.Format = "#0.######"; - this.H_Discont.DefaultCellStyle = dataGridViewCellStyle40; + dataGridViewCellStyle4.Format = "#0.######"; + this.H_Discont.DefaultCellStyle = dataGridViewCellStyle4; this.H_Discont.HeaderText = "扣重"; this.H_Discont.Name = "H_Discont"; this.H_Discont.ReadOnly = true; @@ -181,8 +182,8 @@ // H_Weight // this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle41.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle41; + dataGridViewCellStyle5.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle5; this.H_Weight.HeaderText = "重量"; this.H_Weight.Name = "H_Weight"; this.H_Weight.ReadOnly = true; @@ -285,6 +286,17 @@ this.splitContainer1.SplitterDistance = 86; this.splitContainer1.TabIndex = 3; // + // barPrintCheck + // + this.barPrintCheck.AutoSize = true; + this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); + this.barPrintCheck.Location = new System.Drawing.Point(498, 53); + this.barPrintCheck.Name = "barPrintCheck"; + this.barPrintCheck.Size = new System.Drawing.Size(108, 24); + this.barPrintCheck.TabIndex = 24; + this.barPrintCheck.Text = "启用打码"; + this.barPrintCheck.UseVisualStyleBackColor = true; + // // numSetBtn // this.numSetBtn.AsClicked = false; @@ -477,6 +489,7 @@ // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.deleteBtn); this.groupBox1.Controls.Add(this.rePrint); this.groupBox1.Controls.Add(this.needSubmitGrid); this.groupBox1.Controls.Add(this.numFlowPanel); @@ -489,23 +502,67 @@ this.groupBox1.TabIndex = 2; this.groupBox1.TabStop = false; // + // deleteBtn + // + this.deleteBtn.AsClicked = false; + this.deleteBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("deleteBtn.BackgroundImage"))); + this.deleteBtn.EnableGroup = false; + this.deleteBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.deleteBtn.FlatAppearance.BorderSize = 0; + this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); + this.deleteBtn.ForeColor = System.Drawing.Color.Black; + this.deleteBtn.Location = new System.Drawing.Point(211, 19); + this.deleteBtn.Name = "deleteBtn"; + this.deleteBtn.PlaySound = false; + this.deleteBtn.SelfControlEnable = false; + this.deleteBtn.Size = new System.Drawing.Size(94, 34); + this.deleteBtn.SoundType = WinFormControl.SoundType.Click; + this.deleteBtn.TabIndex = 18; + this.deleteBtn.Text = "删 除"; + this.deleteBtn.UseVisualStyleBackColor = true; + this.deleteBtn.WithStataHode = false; + this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click); + // + // rePrint + // + this.rePrint.AsClicked = false; + this.rePrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("rePrint.BackgroundImage"))); + this.rePrint.EnableGroup = false; + this.rePrint.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.rePrint.FlatAppearance.BorderSize = 0; + this.rePrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.rePrint.Font = new System.Drawing.Font("宋体", 15F); + this.rePrint.ForeColor = System.Drawing.Color.Black; + this.rePrint.Location = new System.Drawing.Point(109, 19); + this.rePrint.Name = "rePrint"; + this.rePrint.PlaySound = false; + this.rePrint.SelfControlEnable = false; + this.rePrint.Size = new System.Drawing.Size(94, 34); + this.rePrint.SoundType = WinFormControl.SoundType.Click; + this.rePrint.TabIndex = 17; + this.rePrint.Text = "补 打"; + this.rePrint.UseVisualStyleBackColor = true; + this.rePrint.WithStataHode = false; + this.rePrint.Click += new System.EventHandler(this.rePrint_Click); + // // needSubmitGrid // this.needSubmitGrid.AllowUserToAddRows = false; this.needSubmitGrid.AllowUserToDeleteRows = false; this.needSubmitGrid.AllowUserToResizeColumns = false; this.needSubmitGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle43.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.needSubmitGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle43; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.needSubmitGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; this.needSubmitGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.needSubmitGrid.BackgroundColor = System.Drawing.Color.White; this.needSubmitGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle44.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle44.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.needSubmitGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle44; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.needSubmitGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; this.needSubmitGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.needSubmitGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.U_ID, @@ -520,9 +577,9 @@ this.needSubmitGrid.Name = "needSubmitGrid"; this.needSubmitGrid.ReadOnly = true; this.needSubmitGrid.RowHeadersVisible = false; - dataGridViewCellStyle48.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle48.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.needSubmitGrid.RowsDefaultCellStyle = dataGridViewCellStyle48; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.needSubmitGrid.RowsDefaultCellStyle = dataGridViewCellStyle12; this.needSubmitGrid.RowTemplate.Height = 30; this.needSubmitGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.needSubmitGrid.Size = new System.Drawing.Size(683, 240); @@ -561,8 +618,8 @@ // U_GrossWeight // this.U_GrossWeight.DataPropertyName = "GrossWeight"; - dataGridViewCellStyle45.Format = "#0.######"; - this.U_GrossWeight.DefaultCellStyle = dataGridViewCellStyle45; + dataGridViewCellStyle9.Format = "#0.######"; + this.U_GrossWeight.DefaultCellStyle = dataGridViewCellStyle9; this.U_GrossWeight.HeaderText = "毛重"; this.U_GrossWeight.Name = "U_GrossWeight"; this.U_GrossWeight.ReadOnly = true; @@ -570,8 +627,8 @@ // U_Discont // this.U_Discont.DataPropertyName = "Discont"; - dataGridViewCellStyle46.Format = "#0.######"; - this.U_Discont.DefaultCellStyle = dataGridViewCellStyle46; + dataGridViewCellStyle10.Format = "#0.######"; + this.U_Discont.DefaultCellStyle = dataGridViewCellStyle10; this.U_Discont.HeaderText = "扣重"; this.U_Discont.Name = "U_Discont"; this.U_Discont.ReadOnly = true; @@ -579,8 +636,8 @@ // U_Weight // this.U_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle47.Format = "#0.######"; - this.U_Weight.DefaultCellStyle = dataGridViewCellStyle47; + dataGridViewCellStyle11.Format = "#0.######"; + this.U_Weight.DefaultCellStyle = dataGridViewCellStyle11; this.U_Weight.HeaderText = "净重"; this.U_Weight.Name = "U_Weight"; this.U_Weight.ReadOnly = true; @@ -589,9 +646,9 @@ // this.numFlowPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.numFlowPanel.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.numFlowPanel.Location = new System.Drawing.Point(211, 13); + this.numFlowPanel.Location = new System.Drawing.Point(311, 13); this.numFlowPanel.Name = "numFlowPanel"; - this.numFlowPanel.Size = new System.Drawing.Size(477, 41); + this.numFlowPanel.Size = new System.Drawing.Size(377, 41); this.numFlowPanel.TabIndex = 15; // // submitBtn @@ -627,39 +684,6 @@ this.uLabel3.TabIndex = 0; this.uLabel3.Text = "称重明细"; // - // barPrintCheck - // - this.barPrintCheck.AutoSize = true; - this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); - this.barPrintCheck.Location = new System.Drawing.Point(498, 53); - this.barPrintCheck.Name = "barPrintCheck"; - this.barPrintCheck.Size = new System.Drawing.Size(108, 24); - this.barPrintCheck.TabIndex = 24; - this.barPrintCheck.Text = "启用打码"; - this.barPrintCheck.UseVisualStyleBackColor = true; - // - // rePrint - // - this.rePrint.AsClicked = false; - this.rePrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("rePrint.BackgroundImage"))); - this.rePrint.EnableGroup = false; - this.rePrint.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); - this.rePrint.FlatAppearance.BorderSize = 0; - this.rePrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.rePrint.Font = new System.Drawing.Font("宋体", 15F); - this.rePrint.ForeColor = System.Drawing.Color.Black; - this.rePrint.Location = new System.Drawing.Point(111, 19); - this.rePrint.Name = "rePrint"; - this.rePrint.PlaySound = false; - this.rePrint.SelfControlEnable = false; - this.rePrint.Size = new System.Drawing.Size(94, 34); - this.rePrint.SoundType = WinFormControl.SoundType.Click; - this.rePrint.TabIndex = 17; - this.rePrint.Text = "补 打"; - this.rePrint.UseVisualStyleBackColor = true; - this.rePrint.WithStataHode = false; - this.rePrint.Click += new System.EventHandler(this.rePrint_Click); - // // WeightCountForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -730,5 +754,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn U_Weight; private System.Windows.Forms.CheckBox barPrintCheck; private WinFormControl.UButton rePrint; + private WinFormControl.UButton deleteBtn; } } \ No newline at end of file diff --git a/ButcherFactory.Form/WeightCount_/WeightCountForm.cs b/ButcherFactory.Form/WeightCount_/WeightCountForm.cs index eb79f56..ba04769 100644 --- a/ButcherFactory.Form/WeightCount_/WeightCountForm.cs +++ b/ButcherFactory.Form/WeightCount_/WeightCountForm.cs @@ -305,5 +305,18 @@ namespace ButcherFactory.WeightCount_ return; WeightCountPrint.Print(needSubmitGrid.CurrentRow.DataBoundItem as WeightCountEntity); } + + private void deleteBtn_Click(object sender, EventArgs e) + { + if (needSubmitGrid.CurrentRow == null) + return; + if (MessageBox.Show("确定要删除选中记录?", "删除确认", MessageBoxButtons.OKCancel) == DialogResult.OK) + { + var entity = needSubmitGrid.CurrentRow.DataBoundItem as WeightCountEntity; + WeightCountEntityBL.Delete(entity.ID); + needSubmitedList.Remove(entity); + needSubmitGrid.Refresh(); + } + } } } diff --git a/ButcherFactory.Form/WeightCount_/WeightCountForm.resx b/ButcherFactory.Form/WeightCount_/WeightCountForm.resx index 32fb8a5..caf1315 100644 --- a/ButcherFactory.Form/WeightCount_/WeightCountForm.resx +++ b/ButcherFactory.Form/WeightCount_/WeightCountForm.resx @@ -160,6 +160,14 @@ wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= diff --git a/ButcherFactory.Login/Login.xaml.cs b/ButcherFactory.Login/Login.xaml.cs index 09f71a0..eb1de30 100644 --- a/ButcherFactory.Login/Login.xaml.cs +++ b/ButcherFactory.Login/Login.xaml.cs @@ -62,8 +62,8 @@ namespace ButcherFactory.Login var form = FormUtil.CreateFrom(); if (form == null) - throw new Exception("权限不符"); - form.FormClosing += delegate + throw new Exception("权限不符"); + form.FormClosed += delegate { this.Show(); };