hao.jin
3 years ago
15 changed files with 573 additions and 861 deletions
Binary file not shown.
@ -0,0 +1,102 @@ |
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
partial class frmBarCodeSelect |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
private System.Windows.Forms.MainMenu mainMenu1; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.mainMenu1 = new System.Windows.Forms.MainMenu(); |
|||
this.txt_barcode = new System.Windows.Forms.TextBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.txt_vda = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txt_barcode
|
|||
//
|
|||
this.txt_barcode.Location = new System.Drawing.Point(3, 158); |
|||
this.txt_barcode.MaxLength = 40; |
|||
this.txt_barcode.Multiline = true; |
|||
this.txt_barcode.Name = "txt_barcode"; |
|||
this.txt_barcode.ReadOnly = true; |
|||
this.txt_barcode.Size = new System.Drawing.Size(228, 72); |
|||
this.txt_barcode.TabIndex = 22; |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Location = new System.Drawing.Point(3, 136); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(127, 20); |
|||
this.label2.Text = "内部标签参考号:"; |
|||
//
|
|||
// txt_vda
|
|||
//
|
|||
this.txt_vda.Location = new System.Drawing.Point(5, 52); |
|||
this.txt_vda.MaxLength = 40; |
|||
this.txt_vda.Multiline = true; |
|||
this.txt_vda.Name = "txt_vda"; |
|||
this.txt_vda.Size = new System.Drawing.Size(228, 64); |
|||
this.txt_vda.TabIndex = 21; |
|||
this.txt_vda.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_vda_KeyPress); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Location = new System.Drawing.Point(5, 31); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(121, 20); |
|||
this.label3.Text = "VDA标签扫描:"; |
|||
//
|
|||
// frmBarCodeSelect
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txt_barcode); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.txt_vda); |
|||
this.Controls.Add(this.label3); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.Menu = this.mainMenu1; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmBarCodeSelect"; |
|||
this.Text = "内部参考号查询"; |
|||
this.Load += new System.EventHandler(this.frmBarCodeSelect_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.TextBox txt_barcode; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.TextBox txt_vda; |
|||
private System.Windows.Forms.Label label3; |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
using System; |
|||
|
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
public partial class frmBarCodeSelect : Form |
|||
{ |
|||
public frmBarCodeSelect() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void txtPackageNo2_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void txtPackageNo1_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void frmBarCodeSelect_Load(object sender, EventArgs e) |
|||
{ |
|||
txt_vda.Focus(); |
|||
} |
|||
|
|||
private void txt_vda_KeyPress(object sender, KeyPressEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
} |
|||
catch (Exception) |
|||
{ |
|||
|
|||
throw; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,103 @@ |
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
partial class frmVDACheck |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
private System.Windows.Forms.MainMenu mainMenu1; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.mainMenu1 = new System.Windows.Forms.MainMenu(); |
|||
this.mainMenu2 = new System.Windows.Forms.MainMenu(); |
|||
this.txt_barcode = new System.Windows.Forms.TextBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.txt_vda = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txt_barcode
|
|||
//
|
|||
this.txt_barcode.Location = new System.Drawing.Point(4, 165); |
|||
this.txt_barcode.MaxLength = 40; |
|||
this.txt_barcode.Multiline = true; |
|||
this.txt_barcode.Name = "txt_barcode"; |
|||
this.txt_barcode.ReadOnly = true; |
|||
this.txt_barcode.Size = new System.Drawing.Size(228, 72); |
|||
this.txt_barcode.TabIndex = 26; |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Location = new System.Drawing.Point(4, 143); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(127, 20); |
|||
this.label2.Text = "内部标签扫描:"; |
|||
//
|
|||
// txt_vda
|
|||
//
|
|||
this.txt_vda.Location = new System.Drawing.Point(6, 59); |
|||
this.txt_vda.MaxLength = 40; |
|||
this.txt_vda.Multiline = true; |
|||
this.txt_vda.Name = "txt_vda"; |
|||
this.txt_vda.Size = new System.Drawing.Size(228, 64); |
|||
this.txt_vda.TabIndex = 25; |
|||
this.txt_vda.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_vda_KeyPress_1); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Location = new System.Drawing.Point(6, 38); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(121, 20); |
|||
this.label3.Text = "VDA标签扫描:"; |
|||
//
|
|||
// frmVDACheck
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txt_barcode); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.txt_vda); |
|||
this.Controls.Add(this.label3); |
|||
this.MaximizeBox = false; |
|||
this.Menu = this.mainMenu1; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmVDACheck"; |
|||
this.Text = "VDA标签照核"; |
|||
this.Load += new System.EventHandler(this.frmVDACheck_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.MainMenu mainMenu2; |
|||
private System.Windows.Forms.TextBox txt_barcode; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.TextBox txt_vda; |
|||
private System.Windows.Forms.Label label3; |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
using System; |
|||
|
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
public partial class frmVDACheck : Form |
|||
{ |
|||
public frmVDACheck() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void txt_vda_KeyPress(object sender, KeyPressEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void frmVDACheck_Load(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
} |
|||
catch (Exception) |
|||
{ |
|||
|
|||
throw; |
|||
} |
|||
} |
|||
|
|||
private void txt_vda_KeyPress_1(object sender, KeyPressEventArgs e) |
|||
{ |
|||
|
|||
txt_vda.Focus(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,132 @@ |
|||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>17, 17</value> |
|||
</metadata> |
|||
<metadata name="mainMenu2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<value>139, 17</value> |
|||
</metadata> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -1,61 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using System.Data; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
public class F_VDA |
|||
{ |
|||
//单据编号
|
|||
public string BillNo = ""; |
|||
public string billType = "VDA"; |
|||
public DataSet dsBill = null; |
|||
|
|||
/// <summary>
|
|||
/// 新建单据
|
|||
/// </summary>
|
|||
public void BillNew(DataGrid dg) |
|||
{ |
|||
string Cmd = "BILL_NEW_" + billType; |
|||
string Pars = BillNo + ";" + UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
dg.DataSource = dsBill.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBill.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["PartNumber"].HeaderText = "零件号"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "校验条码"; |
|||
dg.TableStyles[0].GridColumnStyles["PackageNo"].HeaderText = "包装号"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["Qtyed"].HeaderText = "校验数量"; |
|||
dg.TableStyles[0].GridColumnStyles["EnglishName"].HeaderText = "描述"; |
|||
dg.TableStyles[0].GridColumnStyles["AsnNumber"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["IsCheck"].HeaderText = "是否校验"; |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 提交单据
|
|||
/// </summary>
|
|||
public void BillSubmit() |
|||
{ |
|||
string Cmd = "BILL_SUBMIT_" + billType; |
|||
string Pars = UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsBill); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -1,236 +0,0 @@ |
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
partial class frmVDA |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtBillNo = new System.Windows.Forms.TextBox(); |
|||
this.txtBarCode = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.btnSubmit = new System.Windows.Forms.Button(); |
|||
this.btnExit = new System.Windows.Forms.Button(); |
|||
this.btnDelete = new System.Windows.Forms.Button(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.txtBarCode1 = new System.Windows.Forms.TextBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.txtBarCode2 = new System.Windows.Forms.TextBox(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.txtQty = new System.Windows.Forms.TextBox(); |
|||
this.label5 = new System.Windows.Forms.Label(); |
|||
this.chkBox = new System.Windows.Forms.CheckBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(2, 142); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(234, 86); |
|||
this.dgShow.TabIndex = 3; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(3, 6); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "ASN单号:"; |
|||
//
|
|||
// txtBillNo
|
|||
//
|
|||
this.txtBillNo.Location = new System.Drawing.Point(76, 2); |
|||
this.txtBillNo.MaxLength = 30; |
|||
this.txtBillNo.Name = "txtBillNo"; |
|||
this.txtBillNo.Size = new System.Drawing.Size(159, 23); |
|||
this.txtBillNo.TabIndex = 0; |
|||
this.txtBillNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBillNo_KeyDown); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Location = new System.Drawing.Point(76, 29); |
|||
this.txtBarCode.MaxLength = 40; |
|||
this.txtBarCode.Name = "txtBarCode"; |
|||
this.txtBarCode.Size = new System.Drawing.Size(159, 23); |
|||
this.txtBarCode.TabIndex = 2; |
|||
this.txtBarCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode_KeyDown); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Location = new System.Drawing.Point(3, 32); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(100, 20); |
|||
this.label3.Text = "左Kolli号:"; |
|||
//
|
|||
// btnSubmit
|
|||
//
|
|||
this.btnSubmit.Location = new System.Drawing.Point(7, 234); |
|||
this.btnSubmit.Name = "btnSubmit"; |
|||
this.btnSubmit.Size = new System.Drawing.Size(72, 38); |
|||
this.btnSubmit.TabIndex = 4; |
|||
this.btnSubmit.Text = "提交数据"; |
|||
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); |
|||
//
|
|||
// btnExit
|
|||
//
|
|||
this.btnExit.Location = new System.Drawing.Point(163, 234); |
|||
this.btnExit.Name = "btnExit"; |
|||
this.btnExit.Size = new System.Drawing.Size(72, 38); |
|||
this.btnExit.TabIndex = 5; |
|||
this.btnExit.Text = "返回主菜单"; |
|||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click); |
|||
//
|
|||
// btnDelete
|
|||
//
|
|||
this.btnDelete.Location = new System.Drawing.Point(85, 234); |
|||
this.btnDelete.Name = "btnDelete"; |
|||
this.btnDelete.Size = new System.Drawing.Size(72, 38); |
|||
this.btnDelete.TabIndex = 14; |
|||
this.btnDelete.Text = "删除记录"; |
|||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Location = new System.Drawing.Point(184, 117); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(54, 20); |
|||
this.lblState.TextAlign = System.Drawing.ContentAlignment.TopCenter; |
|||
//
|
|||
// txtBarCode1
|
|||
//
|
|||
this.txtBarCode1.Location = new System.Drawing.Point(76, 58); |
|||
this.txtBarCode1.MaxLength = 40; |
|||
this.txtBarCode1.Name = "txtBarCode1"; |
|||
this.txtBarCode1.Size = new System.Drawing.Size(159, 23); |
|||
this.txtBarCode1.TabIndex = 18; |
|||
this.txtBarCode1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode1_KeyDown); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Location = new System.Drawing.Point(3, 61); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(100, 20); |
|||
this.label2.Text = "右Kolli号:"; |
|||
//
|
|||
// txtBarCode2
|
|||
//
|
|||
this.txtBarCode2.Location = new System.Drawing.Point(76, 87); |
|||
this.txtBarCode2.MaxLength = 40; |
|||
this.txtBarCode2.Name = "txtBarCode2"; |
|||
this.txtBarCode2.Size = new System.Drawing.Size(159, 23); |
|||
this.txtBarCode2.TabIndex = 24; |
|||
this.txtBarCode2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode2_KeyDown); |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Location = new System.Drawing.Point(14, 90); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "零件号:"; |
|||
//
|
|||
// txtQty
|
|||
//
|
|||
this.txtQty.Location = new System.Drawing.Point(76, 116); |
|||
this.txtQty.MaxLength = 40; |
|||
this.txtQty.Name = "txtQty"; |
|||
this.txtQty.ReadOnly = true; |
|||
this.txtQty.Size = new System.Drawing.Size(51, 23); |
|||
this.txtQty.TabIndex = 31; |
|||
this.txtQty.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtQty_KeyDown); |
|||
//
|
|||
// label5
|
|||
//
|
|||
this.label5.Location = new System.Drawing.Point(0, 117); |
|||
this.label5.Name = "label5"; |
|||
this.label5.Size = new System.Drawing.Size(100, 20); |
|||
this.label5.Text = "小箱数量:"; |
|||
//
|
|||
// chkBox
|
|||
//
|
|||
this.chkBox.Checked = true; |
|||
this.chkBox.CheckState = System.Windows.Forms.CheckState.Checked; |
|||
this.chkBox.Location = new System.Drawing.Point(129, 117); |
|||
this.chkBox.Name = "chkBox"; |
|||
this.chkBox.Size = new System.Drawing.Size(59, 20); |
|||
this.chkBox.TabIndex = 33; |
|||
this.chkBox.Text = "整箱"; |
|||
this.chkBox.CheckStateChanged += new System.EventHandler(this.chkBox_CheckStateChanged); |
|||
//
|
|||
// frmVDA
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.chkBox); |
|||
this.Controls.Add(this.txtQty); |
|||
this.Controls.Add(this.label5); |
|||
this.Controls.Add(this.txtBarCode2); |
|||
this.Controls.Add(this.label4); |
|||
this.Controls.Add(this.txtBarCode1); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.txtBarCode); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.btnDelete); |
|||
this.Controls.Add(this.btnExit); |
|||
this.Controls.Add(this.btnSubmit); |
|||
this.Controls.Add(this.txtBillNo); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Controls.Add(this.lblState); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmVDA"; |
|||
this.Text = "校验单"; |
|||
this.Load += new System.EventHandler(this.frmVerify_Load); |
|||
this.Closing += new System.ComponentModel.CancelEventHandler(this.frmVerify_Closing); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox txtBillNo; |
|||
private System.Windows.Forms.TextBox txtBarCode; |
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.Button btnSubmit; |
|||
private System.Windows.Forms.Button btnExit; |
|||
private System.Windows.Forms.Button btnDelete; |
|||
private System.Windows.Forms.Label lblState; |
|||
private System.Windows.Forms.TextBox txtBarCode1; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.TextBox txtBarCode2; |
|||
private System.Windows.Forms.Label label4; |
|||
private System.Windows.Forms.TextBox txtQty; |
|||
private System.Windows.Forms.Label label5; |
|||
private System.Windows.Forms.CheckBox chkBox; |
|||
} |
|||
} |
@ -1,505 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.SelectComm; |
|||
|
|||
namespace PDAForm.Bill.VDA |
|||
{ |
|||
public partial class frmVDA : Form |
|||
{ |
|||
public F_VDA m_base = null; |
|||
public frmVDA() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmVerify_Load(object sender, EventArgs e) |
|||
{ |
|||
this.Text += "(机器号:" + MyAppconfig.GetValue("机器号") + ")"; |
|||
|
|||
this.txtBillNo.Focus(); |
|||
} |
|||
|
|||
private void txtBillNo_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (this.txtBillNo.Text.Trim() == "") |
|||
{ |
|||
throw new Exception("序列单号不能为空!"); |
|||
} |
|||
|
|||
this.txtBillNo.Enabled = false; |
|||
this.Update(); |
|||
m_base = new F_VDA(); |
|||
m_base.BillNo = this.txtBillNo.Text.Trim(); |
|||
m_base.BillNew(this.dgShow); |
|||
|
|||
Total(); |
|||
|
|||
this.txtBillNo.Enabled = true; |
|||
} |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
m_base = null; |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBillNo.Enabled = true; |
|||
this.txtBillNo.Focus(); |
|||
this.txtBillNo.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
private void txtBarCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (m_base == null) throw new Exception("请选扫ASN单号!"); |
|||
|
|||
string BarCode = this.txtBarCode.Text.Trim(); |
|||
if (BarCode.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("左Kolli号不能为空!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (BarCode.Substring(0, 2) != "01") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("左Kolli号需以01开头!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
this.txtBarCode.Text = BarCode.Substring(2, BarCode.Length - 2); |
|||
|
|||
|
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
private void btnSubmit_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
this.btnSubmit.Enabled = false; |
|||
this.Update(); |
|||
|
|||
if (m_base == null) throw new Exception("没有需要提交的数据!"); |
|||
if (MyMessageBox.ShowQuestion("是否要提交数据?")) |
|||
{ |
|||
if (m_base.dsBill.Tables[0].Rows.Count == 0) |
|||
{ |
|||
throw new Exception("没有需要提交的数据!"); |
|||
} |
|||
|
|||
if (m_base.dsBill.Tables[0].Select("[BarCode]=''").Length > 0) |
|||
{ |
|||
throw new Exception("有未扫描的托盘"); |
|||
} |
|||
|
|||
if (m_base.dsBill.Tables[0].Select("[Qty] <> [Qtyed]").Length > 0) |
|||
{ |
|||
throw new Exception("有未扫描的单箱"); |
|||
} |
|||
|
|||
|
|||
m_base.BillSubmit(); |
|||
m_base = null; |
|||
Total(); |
|||
|
|||
this.txtBillNo.Text = ""; |
|||
this.txtBarCode.Text = ""; |
|||
this.txtBarCode1.Text = ""; |
|||
this.txtBarCode2.Text = ""; |
|||
this.txtQty.Text = ""; |
|||
this.dgShow.DataSource = null; |
|||
MyMessageBox.ShowInfoMessage("数据提交成功!"); |
|||
this.txtBillNo.Focus(); |
|||
this.txtBillNo.SelectAll(); |
|||
|
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
finally |
|||
{ |
|||
this.btnSubmit.Enabled = true; |
|||
} |
|||
} |
|||
|
|||
private void btnDelete_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (m_base == null) throw new Exception("请选扫描ASN单号!"); |
|||
|
|||
if (MyMessageBox.ShowQuestion("是否要删除选择的记录!")) |
|||
{ |
|||
m_base.dsBill.Tables[0].Rows[dgShow.CurrentRowIndex]["BarCode"] = ""; |
|||
m_base.dsBill.Tables[0].Rows[dgShow.CurrentRowIndex]["Qtyed"] = 0; |
|||
|
|||
Total(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnExit_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
private void frmVerify_Closing(object sender, CancelEventArgs e) |
|||
{ |
|||
if (m_base != null) |
|||
{ |
|||
if (!MyMessageBox.ShowQuestion("未提交数据,是否要退出!")) e.Cancel = true; |
|||
} |
|||
} |
|||
|
|||
private void Total() |
|||
{ |
|||
if (m_base == null) |
|||
{ |
|||
this.lblState.Text = ""; |
|||
} |
|||
else |
|||
{ |
|||
int a1 = m_base.dsBill.Tables[0].Rows.Count; |
|||
int a2 = m_base.dsBill.Tables[0].Select("[BarCode]<>''").Length; |
|||
|
|||
this.lblState.Text = a1 + "\\" + a2; |
|||
} |
|||
|
|||
} |
|||
|
|||
private void txtBarCode1_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
string BarCode = this.txtBarCode.Text.Trim(); |
|||
if (BarCode.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("实物条码不能为空!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
string BarCode1 = this.txtBarCode1.Text.Trim(); |
|||
if (BarCode1.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("右Kolli号不能为空!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (BarCode1.Substring(0, 2) != "02") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("左Kolli号需以02开头!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
this.txtBarCode1.Text = BarCode1.Substring(2, BarCode1.Length - 2); |
|||
|
|||
BarCode1 = this.txtBarCode1.Text.Trim().ToUpper(); |
|||
|
|||
|
|||
if (BarCode.ToUpper() != BarCode1.ToUpper()) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("左右Kolli不一样!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
this.txtBarCode2.Focus(); |
|||
this.txtBarCode2.SelectAll(); |
|||
|
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void txtBarCode2_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
string BarCode = this.txtBarCode.Text.Trim(); |
|||
if (BarCode.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("实物条码不能为空!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
string BarCode1 = this.txtBarCode1.Text.Trim(); |
|||
if (BarCode1.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("校验条码不能为空!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (BarCode.ToUpper() != BarCode1.ToUpper()) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("实物和校验条码不一样!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
|
|||
} |
|||
|
|||
|
|||
string BarCode2 = this.txtBarCode2.Text.Trim(); |
|||
if (BarCode2.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("零件号不能为空"); |
|||
this.txtBarCode2.Focus(); |
|||
this.txtBarCode2.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
|
|||
DataRow[] drs = m_base.dsBill.Tables[0].Select("[PackageNo]='" + BarCode + "'"); |
|||
if (drs.Length == 0) |
|||
{ |
|||
throw new Exception("Kolli " + BarCode + " 在系统中不存在"); |
|||
} |
|||
|
|||
|
|||
if (drs[0]["PartNumber"].ToString() != BarCode2) |
|||
{ |
|||
throw new Exception("零件号 " + BarCode2 + " 不正确"); |
|||
} |
|||
|
|||
DataRow[] drs_product = F_Update.ProductData.Tables[0].Select("[Code]='" + BarCode2 + "'"); |
|||
if (drs_product.Length == 0) throw new Exception("零件号 " + BarCode2 + " 在系统中不存在"); |
|||
|
|||
this.txtQty.Text = drs_product[0]["PackQty"].ToString(); |
|||
|
|||
if (this.chkBox.Checked) |
|||
{ |
|||
if (Convert.ToInt32(drs[0]["Qtyed"]) + Convert.ToInt32(this.txtQty.Text.Trim()) > Convert.ToInt32(drs[0]["Qty"])) |
|||
{ |
|||
throw new Exception("数量超过装箱要求"); |
|||
} |
|||
else |
|||
{ |
|||
|
|||
drs[0]["Qtyed"] = Convert.ToInt32(drs[0]["Qtyed"]) + Convert.ToInt32(this.txtQty.Text.Trim()); |
|||
drs[0]["BarCode"] = BarCode; |
|||
|
|||
Total(); |
|||
|
|||
if (Convert.ToInt32(drs[0]["Qtyed"]) < Convert.ToInt32(drs[0]["Qty"])) |
|||
{ |
|||
this.txtBarCode2.Text = ""; |
|||
this.txtBarCode2.Focus(); |
|||
} |
|||
else |
|||
{ |
|||
//扫描下一箱
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtBarCode1.Text = ""; |
|||
this.txtBarCode2.Text = ""; |
|||
this.txtBarCode.Focus(); |
|||
} |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
this.txtQty.Focus(); |
|||
this.txtQty.SelectAll(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode2.Focus(); |
|||
this.txtBarCode2.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void txtQty_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (!this.chkBox.Checked) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
string BarCode = this.txtBarCode.Text.Trim(); |
|||
if (BarCode.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("实物条码不能为空!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
string BarCode1 = this.txtBarCode1.Text.Trim(); |
|||
if (BarCode1.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("校验条码不能为空!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (BarCode.ToUpper() != BarCode1.ToUpper()) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("实物和校验条码不一样!"); |
|||
this.txtBarCode1.Focus(); |
|||
this.txtBarCode1.SelectAll(); |
|||
return; |
|||
|
|||
} |
|||
|
|||
|
|||
string BarCode2 = this.txtBarCode2.Text.Trim(); |
|||
if (BarCode2.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("零件号不能为空"); |
|||
this.txtBarCode2.Focus(); |
|||
this.txtBarCode2.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
|
|||
DataRow[] drs = m_base.dsBill.Tables[0].Select("[PackageNo]='" + BarCode + "'"); |
|||
if (drs.Length == 0) |
|||
{ |
|||
throw new Exception("Kolli " + BarCode + " 在系统中不存在"); |
|||
} |
|||
|
|||
|
|||
if (drs[0]["PartNumber"].ToString() != BarCode2) |
|||
{ |
|||
throw new Exception("零件号 " + BarCode2 + " 不正确"); |
|||
} |
|||
|
|||
DataRow[] drs_product = F_Update.ProductData.Tables[0].Select("[Code]='" + BarCode2 + "'"); |
|||
if (drs_product.Length == 0) throw new Exception("零件号 " + BarCode2 + " 在系统中不存在"); |
|||
|
|||
if(Convert.ToInt32(this.txtQty.Text) > Convert.ToInt32(drs_product[0]["PackQty"])) |
|||
{ |
|||
throw new Exception("数量不能大于标准装箱数"); |
|||
} |
|||
|
|||
|
|||
if (Convert.ToInt32(drs[0]["Qtyed"]) + Convert.ToInt32(this.txtQty.Text.Trim()) > Convert.ToInt32(drs[0]["Qty"])) |
|||
{ |
|||
throw new Exception("数量超过装箱要求"); |
|||
} |
|||
else |
|||
{ |
|||
|
|||
drs[0]["Qtyed"] = Convert.ToInt32(drs[0]["Qtyed"]) + Convert.ToInt32(this.txtQty.Text.Trim()); |
|||
drs[0]["BarCode"] = BarCode; |
|||
|
|||
Total(); |
|||
|
|||
if (Convert.ToInt32(drs[0]["Qtyed"]) < Convert.ToInt32(drs[0]["Qty"])) |
|||
{ |
|||
this.txtQty.Text = ""; |
|||
this.txtBarCode2.Text = ""; |
|||
this.txtBarCode2.Focus(); |
|||
} |
|||
else |
|||
{ |
|||
//扫描下一箱
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtBarCode1.Text = ""; |
|||
this.txtBarCode2.Text = ""; |
|||
this.txtBarCode.Focus(); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode2.Focus(); |
|||
this.txtBarCode2.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
private void chkBox_CheckStateChanged(object sender, EventArgs e) |
|||
{ |
|||
if (this.chkBox.Checked) |
|||
{ |
|||
this.txtQty.ReadOnly = true; |
|||
} |
|||
else |
|||
{ |
|||
this.txtQty.ReadOnly = false; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
Loading…
Reference in new issue