| @ -0,0 +1,125 @@ | |||
| | |||
| namespace ButcherFactory.SegmentProductionAuto_ | |||
| { | |||
| partial class GoodsNumberInputDialog | |||
| { | |||
| /// <summary> | |||
| /// Required designer variable. | |||
| /// </summary> | |||
| private System.ComponentModel.IContainer components = null; | |||
| /// <summary> | |||
| /// Clean up any resources being used. | |||
| /// </summary> | |||
| /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> | |||
| protected override void Dispose(bool disposing) | |||
| { | |||
| if (disposing && (components != null)) | |||
| { | |||
| components.Dispose(); | |||
| } | |||
| base.Dispose(disposing); | |||
| } | |||
| #region Windows Form Designer generated code | |||
| /// <summary> | |||
| /// Required method for Designer support - do not modify | |||
| /// the contents of this method with the code editor. | |||
| /// </summary> | |||
| private void InitializeComponent() | |||
| { | |||
| this.okBtn = new ButcherFactory.Controls.ColorButton(); | |||
| this.cancelBtn = new ButcherFactory.Controls.ColorButton(); | |||
| this.goodsNameLbl = new System.Windows.Forms.Label(); | |||
| this.identityRemark = new System.Windows.Forms.Label(); | |||
| this.numberBox = new System.Windows.Forms.TextBox(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // okBtn | |||
| // | |||
| this.okBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); | |||
| this.okBtn.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); | |||
| this.okBtn.ForeColor = System.Drawing.Color.White; | |||
| this.okBtn.Location = new System.Drawing.Point(66, 194); | |||
| this.okBtn.Name = "okBtn"; | |||
| this.okBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); | |||
| this.okBtn.Size = new System.Drawing.Size(140, 56); | |||
| this.okBtn.TabIndex = 1; | |||
| this.okBtn.Text = "确定"; | |||
| this.okBtn.UseVisualStyleBackColor = false; | |||
| this.okBtn.Click += new System.EventHandler(this.okBtn_Click); | |||
| // | |||
| // cancelBtn | |||
| // | |||
| this.cancelBtn.BackColor = System.Drawing.Color.Red; | |||
| this.cancelBtn.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); | |||
| this.cancelBtn.ForeColor = System.Drawing.Color.White; | |||
| this.cancelBtn.Location = new System.Drawing.Point(298, 194); | |||
| this.cancelBtn.Name = "cancelBtn"; | |||
| this.cancelBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); | |||
| this.cancelBtn.Size = new System.Drawing.Size(137, 56); | |||
| this.cancelBtn.TabIndex = 2; | |||
| this.cancelBtn.Text = "取消"; | |||
| this.cancelBtn.UseVisualStyleBackColor = false; | |||
| this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); | |||
| // | |||
| // goodsNameLbl | |||
| // | |||
| this.goodsNameLbl.AutoSize = true; | |||
| this.goodsNameLbl.Font = new System.Drawing.Font("微软雅黑", 17F, System.Drawing.FontStyle.Bold); | |||
| this.goodsNameLbl.ForeColor = System.Drawing.Color.DeepSkyBlue; | |||
| this.goodsNameLbl.Location = new System.Drawing.Point(29, 22); | |||
| this.goodsNameLbl.Name = "goodsNameLbl"; | |||
| this.goodsNameLbl.Size = new System.Drawing.Size(83, 31); | |||
| this.goodsNameLbl.TabIndex = 5; | |||
| this.goodsNameLbl.Text = "冻带皮"; | |||
| // | |||
| // identityRemark | |||
| // | |||
| this.identityRemark.AutoSize = true; | |||
| this.identityRemark.Font = new System.Drawing.Font("微软雅黑", 14F); | |||
| this.identityRemark.ForeColor = System.Drawing.Color.Black; | |||
| this.identityRemark.Location = new System.Drawing.Point(105, 101); | |||
| this.identityRemark.Name = "identityRemark"; | |||
| this.identityRemark.Size = new System.Drawing.Size(50, 25); | |||
| this.identityRemark.TabIndex = 6; | |||
| this.identityRemark.Text = "件数"; | |||
| // | |||
| // numberBox | |||
| // | |||
| this.numberBox.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); | |||
| this.numberBox.Location = new System.Drawing.Point(200, 99); | |||
| this.numberBox.Name = "numberBox"; | |||
| this.numberBox.Size = new System.Drawing.Size(194, 29); | |||
| this.numberBox.TabIndex = 7; | |||
| this.numberBox.Click += new System.EventHandler(this.numberBox_Click); | |||
| // | |||
| // GoodsNumberInputDialog | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(532, 290); | |||
| this.Controls.Add(this.numberBox); | |||
| this.Controls.Add(this.identityRemark); | |||
| this.Controls.Add(this.goodsNameLbl); | |||
| this.Controls.Add(this.cancelBtn); | |||
| this.Controls.Add(this.okBtn); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; | |||
| this.Name = "GoodsNumberInputDialog"; | |||
| this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; | |||
| this.Text = "产品件数录入"; | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private Controls.ColorButton okBtn; | |||
| private Controls.ColorButton cancelBtn; | |||
| private System.Windows.Forms.Label goodsNameLbl; | |||
| private System.Windows.Forms.Label identityRemark; | |||
| private System.Windows.Forms.TextBox numberBox; | |||
| } | |||
| } | |||
| @ -0,0 +1,68 @@ | |||
| using ButcherFactory.BO; | |||
| 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; | |||
| using WinFormControl; | |||
| namespace ButcherFactory.SegmentProductionAuto_ | |||
| { | |||
| public partial class GoodsNumberInputDialog : Form | |||
| { | |||
| ClientGoodsSet_Detail goodsInfo; | |||
| int number = 0; | |||
| public GoodsNumberInputDialog(ClientGoodsSet_Detail mGoods) | |||
| { | |||
| goodsInfo = mGoods; | |||
| InitializeComponent(); | |||
| goodsNameLbl.Text = goodsInfo.Goods_Name; | |||
| } | |||
| private void numberBox_Click(object sender, EventArgs e) | |||
| { | |||
| var keyBoard = new NumberPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| { | |||
| if (string.IsNullOrEmpty(keyBoard.Result)) | |||
| numberBox.Text = null; | |||
| else | |||
| { | |||
| int pics; | |||
| if (int.TryParse(keyBoard.Result, out pics)) | |||
| { | |||
| numberBox.Text = pics.ToString(); | |||
| number = pics; | |||
| } | |||
| else | |||
| { | |||
| numberBox.Text = null; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| private void okBtn_Click(object sender, EventArgs e) | |||
| { | |||
| if (number == 0) | |||
| throw new Exception("请输入数量"); | |||
| var log = new SegmentGoodsProductNumLog(); | |||
| log.Goods_ID = goodsInfo.Goods_ID; | |||
| log.Goods_Code = goodsInfo.Goods_Code; | |||
| log.Goods_Name = goodsInfo.Goods_Name; | |||
| log.Number = number; | |||
| SegmentProductionBL.InsertProductNumLog(log); | |||
| DialogResult = DialogResult.OK; | |||
| } | |||
| private void cancelBtn_Click(object sender, EventArgs e) | |||
| { | |||
| DialogResult = DialogResult.Cancel; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,120 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <root> | |||
| <!-- | |||
| Microsoft ResX Schema | |||
| Version 2.0 | |||
| The primary goals of this format is to allow a simple XML format | |||
| that is mostly human readable. The generation and parsing of the | |||
| various data types are done through the TypeConverter classes | |||
| associated with the data types. | |||
| Example: | |||
| ... ado.net/XML headers & schema ... | |||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | |||
| <resheader name="version">2.0</resheader> | |||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | |||
| </data> | |||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||
| <comment>This is a comment</comment> | |||
| </data> | |||
| There are any number of "resheader" rows that contain simple | |||
| name/value pairs. | |||
| Each data row contains a name, and value. The row also contains a | |||
| type or mimetype. Type corresponds to a .NET class that support | |||
| text/value conversion through the TypeConverter architecture. | |||
| Classes that don't support this are serialized and stored with the | |||
| mimetype set. | |||
| The mimetype is used for serialized objects, and tells the | |||
| ResXResourceReader how to depersist the object. This is currently not | |||
| extensible. For a given mimetype the value must be set accordingly: | |||
| Note - application/x-microsoft.net.object.binary.base64 is the format | |||
| that the ResXResourceWriter will generate, however the reader can | |||
| read any of the formats listed below. | |||
| mimetype: application/x-microsoft.net.object.binary.base64 | |||
| value : The object must be serialized with | |||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |||
| : and then encoded with base64 encoding. | |||
| mimetype: application/x-microsoft.net.object.soap.base64 | |||
| value : The object must be serialized with | |||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||
| : and then encoded with base64 encoding. | |||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | |||
| value : The object must be serialized into a byte array | |||
| : using a System.ComponentModel.TypeConverter | |||
| : and then encoded with base64 encoding. | |||
| --> | |||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | |||
| <xsd:element name="root" msdata:IsDataSet="true"> | |||
| <xsd:complexType> | |||
| <xsd:choice maxOccurs="unbounded"> | |||
| <xsd:element name="metadata"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | |||
| <xsd:attribute name="type" type="xsd:string" /> | |||
| <xsd:attribute name="mimetype" type="xsd:string" /> | |||
| <xsd:attribute ref="xml:space" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="assembly"> | |||
| <xsd:complexType> | |||
| <xsd:attribute name="alias" type="xsd:string" /> | |||
| <xsd:attribute name="name" type="xsd:string" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="data"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | |||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||
| <xsd:attribute ref="xml:space" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="resheader"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| </xsd:choice> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| </xsd:schema> | |||
| <resheader name="resmimetype"> | |||
| <value>text/microsoft-resx</value> | |||
| </resheader> | |||
| <resheader name="version"> | |||
| <value>2.0</value> | |||
| </resheader> | |||
| <resheader name="reader"> | |||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
| </resheader> | |||
| <resheader name="writer"> | |||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
| </resheader> | |||
| </root> | |||