12 changed files with 789 additions and 9 deletions
@ -0,0 +1,27 @@ |
|||||
|
using Gm_WMS.DataAccess.DataService; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Stone.Entity |
||||
|
{ |
||||
|
public class Entity_t_PartPO : EntityBase |
||||
|
|
||||
|
{ |
||||
|
public static string TableNameNew = "t_PartPONumber"; |
||||
|
|
||||
|
public Entity_t_PartPO() |
||||
|
{ |
||||
|
base.TableName = TableNameNew; |
||||
|
base.Init(); |
||||
|
} |
||||
|
|
||||
|
public Entity_t_PartPO(LocalDBService myDB) |
||||
|
{ |
||||
|
base.db = myDB; |
||||
|
base.TableName = TableNameNew; |
||||
|
base.Init(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Windows.Forms; |
||||
|
using System.Data; |
||||
|
using Stone.Entity; |
||||
|
using Gm_WMS.DataAccess.DataService; |
||||
|
using Stone.Common; |
||||
|
|
||||
|
namespace Stone.WinBiz.BasicData |
||||
|
{ |
||||
|
public class F_PartPO : F_Base |
||||
|
{ |
||||
|
public F_PartPO() |
||||
|
{ |
||||
|
this.type = "PartPO"; |
||||
|
this.name = "基础资料_零件订单管理"; |
||||
|
this.entity = new Entity_t_PartPO(); |
||||
|
} |
||||
|
|
||||
|
public override void GetView(DataGridView dgv) |
||||
|
{ |
||||
|
base.GetView(dgv); |
||||
|
|
||||
|
dgv.Columns["Code"].HeaderText = "存货代码"; |
||||
|
dgv.Columns["PONumber"].HeaderText = "订单号"; |
||||
|
dgv.Columns["IsCheck"].HeaderText = "发运校验"; |
||||
|
} |
||||
|
|
||||
|
public override void Checking(DataRow drData, bool isNew) |
||||
|
{ |
||||
|
Entity_t_Product product = new Entity_t_Product(); |
||||
|
if (product.GetData("", "Code='" + drData["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count < 1) |
||||
|
{ |
||||
|
//这NM的是个魔鬼~!
|
||||
|
throw new Exception(drData["Code"].ToString()+"不存在"); |
||||
|
} |
||||
|
|
||||
|
base.Checking(drData, isNew); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
public override void InputData(DataSet dsData, LocalDBService db) |
||||
|
{ |
||||
|
Entity_t_PartPO t_Input = new Entity_t_PartPO(db); |
||||
|
DataRow drInput = null; |
||||
|
|
||||
|
foreach (DataRow drData in dsData.Tables[0].Rows) |
||||
|
{ |
||||
|
|
||||
|
drInput = t_Input.Table.NewRow(); |
||||
|
drInput["Code"] = drData["存货代码"].ToString().Trim(); |
||||
|
drInput["PONumber"] = drData["订单号"].ToString().Trim(); |
||||
|
drInput["IsCheck"] = drData["发运校验"].ToString().Trim(); |
||||
|
if (drInput["Code"].ToString().Trim() == "") |
||||
|
throw new Exception("存货代码不能为空!"); |
||||
|
|
||||
|
|
||||
|
if (t_Input.GetData("", "Code='" + drInput["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count > 0) |
||||
|
throw new Exception("存货代码 " + drInput["Code"].ToString() + " 已经存在!"); |
||||
|
t_Input.Add(drInput); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
namespace Stone.WinModule.BasicData |
||||
|
{ |
||||
|
partial class frmPartPO |
||||
|
{ |
||||
|
/// <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.components = new System.ComponentModel.Container(); |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Data; |
||||
|
using System.Drawing; |
||||
|
using System.Text; |
||||
|
using System.Windows.Forms; |
||||
|
|
||||
|
namespace Stone.WinModule.BasicData |
||||
|
{ |
||||
|
public partial class frmPartPO : Stone.WinModule.BasicData.frmBaseMain |
||||
|
{ |
||||
|
public frmPartPO() |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
} |
||||
|
|
||||
|
public override void Search(string code) |
||||
|
{ |
||||
|
base.Search(code); |
||||
|
|
||||
|
strWhere += " or [Code] like '%" + code + "%'"; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,131 @@ |
|||||
|
namespace Stone.WinModule.BasicData |
||||
|
{ |
||||
|
partial class frmPartPODetail |
||||
|
{ |
||||
|
/// <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.tbPONumber = new System.Windows.Forms.TextBox(); |
||||
|
this.txtCode = new System.Windows.Forms.TextBox(); |
||||
|
this.label2 = new System.Windows.Forms.Label(); |
||||
|
this.label1 = new System.Windows.Forms.Label(); |
||||
|
this.colorDialog1 = new System.Windows.Forms.ColorDialog(); |
||||
|
this.txtIsCheck = new System.Windows.Forms.CheckBox(); |
||||
|
this.SuspendLayout(); |
||||
|
//
|
||||
|
// btnAddNewLine
|
||||
|
//
|
||||
|
this.btnAddNewLine.Location = new System.Drawing.Point(41, 123); |
||||
|
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(4); |
||||
|
//
|
||||
|
// btnClose
|
||||
|
//
|
||||
|
this.btnClose.Location = new System.Drawing.Point(254, 123); |
||||
|
this.btnClose.Margin = new System.Windows.Forms.Padding(4); |
||||
|
//
|
||||
|
// btnOK
|
||||
|
//
|
||||
|
this.btnOK.Location = new System.Drawing.Point(166, 123); |
||||
|
this.btnOK.Margin = new System.Windows.Forms.Padding(4); |
||||
|
//
|
||||
|
// tbPONumber
|
||||
|
//
|
||||
|
this.tbPONumber.Location = new System.Drawing.Point(113, 71); |
||||
|
this.tbPONumber.MaxLength = 100; |
||||
|
this.tbPONumber.Name = "tbPONumber"; |
||||
|
this.tbPONumber.Size = new System.Drawing.Size(222, 21); |
||||
|
this.tbPONumber.TabIndex = 1; |
||||
|
//
|
||||
|
// txtCode
|
||||
|
//
|
||||
|
this.txtCode.Location = new System.Drawing.Point(113, 40); |
||||
|
this.txtCode.MaxLength = 10; |
||||
|
this.txtCode.Name = "txtCode"; |
||||
|
this.txtCode.Size = new System.Drawing.Size(222, 21); |
||||
|
this.txtCode.TabIndex = 0; |
||||
|
//
|
||||
|
// label2
|
||||
|
//
|
||||
|
this.label2.AutoSize = true; |
||||
|
this.label2.Location = new System.Drawing.Point(23, 74); |
||||
|
this.label2.Name = "label2"; |
||||
|
this.label2.Size = new System.Drawing.Size(53, 12); |
||||
|
this.label2.TabIndex = 109; |
||||
|
this.label2.Text = "订单号:"; |
||||
|
//
|
||||
|
// label1
|
||||
|
//
|
||||
|
this.label1.AutoSize = true; |
||||
|
this.label1.Location = new System.Drawing.Point(23, 44); |
||||
|
this.label1.Name = "label1"; |
||||
|
this.label1.Size = new System.Drawing.Size(53, 12); |
||||
|
this.label1.TabIndex = 108; |
||||
|
this.label1.Text = "物料号:"; |
||||
|
//
|
||||
|
// txtIsCheck
|
||||
|
//
|
||||
|
this.txtIsCheck.AutoSize = true; |
||||
|
this.txtIsCheck.Location = new System.Drawing.Point(254, 100); |
||||
|
this.txtIsCheck.Name = "txtIsCheck"; |
||||
|
this.txtIsCheck.Size = new System.Drawing.Size(96, 16); |
||||
|
this.txtIsCheck.TabIndex = 110; |
||||
|
this.txtIsCheck.Text = "是否发运校验"; |
||||
|
this.txtIsCheck.UseVisualStyleBackColor = true; |
||||
|
//
|
||||
|
// frmPartPODetail
|
||||
|
//
|
||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
||||
|
this.ClientSize = new System.Drawing.Size(381, 170); |
||||
|
this.Controls.Add(this.txtIsCheck); |
||||
|
this.Controls.Add(this.tbPONumber); |
||||
|
this.Controls.Add(this.txtCode); |
||||
|
this.Controls.Add(this.label2); |
||||
|
this.Controls.Add(this.label1); |
||||
|
this.Margin = new System.Windows.Forms.Padding(4); |
||||
|
this.Name = "frmPartPODetail"; |
||||
|
this.Load += new System.EventHandler(this.frmColorDetail_Load); |
||||
|
this.Controls.SetChildIndex(this.btnOK, 0); |
||||
|
this.Controls.SetChildIndex(this.btnClose, 0); |
||||
|
this.Controls.SetChildIndex(this.btnAddNewLine, 0); |
||||
|
this.Controls.SetChildIndex(this.label1, 0); |
||||
|
this.Controls.SetChildIndex(this.label2, 0); |
||||
|
this.Controls.SetChildIndex(this.txtCode, 0); |
||||
|
this.Controls.SetChildIndex(this.tbPONumber, 0); |
||||
|
this.Controls.SetChildIndex(this.txtIsCheck, 0); |
||||
|
this.ResumeLayout(false); |
||||
|
this.PerformLayout(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
private System.Windows.Forms.TextBox tbPONumber; |
||||
|
private System.Windows.Forms.TextBox txtCode; |
||||
|
private System.Windows.Forms.Label label2; |
||||
|
private System.Windows.Forms.Label label1; |
||||
|
private System.Windows.Forms.ColorDialog colorDialog1; |
||||
|
private System.Windows.Forms.CheckBox txtIsCheck; |
||||
|
} |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Data; |
||||
|
using System.Drawing; |
||||
|
using System.Text; |
||||
|
using System.Windows.Forms; |
||||
|
using Stone.Common; |
||||
|
|
||||
|
namespace Stone.WinModule.BasicData |
||||
|
{ |
||||
|
public partial class frmPartPODetail : Stone.WinModule.BasicData.frmBaseMainDetail |
||||
|
{ |
||||
|
public frmPartPODetail() |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
} |
||||
|
|
||||
|
private void frmColorDetail_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public override bool GetData() |
||||
|
{ |
||||
|
if (!MyValidator.IsEmpty(this.txtCode, "")) return false; |
||||
|
if (!MyValidator.IsEmpty(this.tbPONumber, "")) return false; |
||||
|
base.GetData(); |
||||
|
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim()); |
||||
|
drData["PONumber"] = MyStrings.GetString(this.tbPONumber.Text.Trim()); |
||||
|
drData["IsCheck"] = this.txtIsCheck.Checked ? true : false; |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
public override bool SetData() |
||||
|
{ |
||||
|
if (type == 2) |
||||
|
{ |
||||
|
this.txtCode.ReadOnly = true; |
||||
|
} |
||||
|
|
||||
|
if (base.SetData()) |
||||
|
{ |
||||
|
this.txtCode.Text = drData["Code"].ToString(); |
||||
|
this.tbPONumber.Text = drData["PONumber"].ToString(); |
||||
|
this.txtIsCheck.Checked = Convert.ToBoolean(drData["IsCheck"]); |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
public override void Clear() |
||||
|
{ |
||||
|
base.Clear(); |
||||
|
this.txtCode.Text = ""; |
||||
|
this.tbPONumber.Text = ""; |
||||
|
this.txtCode.Focus(); |
||||
|
txtIsCheck.Checked = true; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,123 @@ |
|||||
|
<?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> |
||||
|
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
||||
|
<value>17, 17</value> |
||||
|
</metadata> |
||||
|
</root> |
@ -0,0 +1,93 @@ |
|||||
|
namespace Stone.WinModule.Standard |
||||
|
{ |
||||
|
partial class frmASNScan |
||||
|
{ |
||||
|
/// <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.lblName = new System.Windows.Forms.Label(); |
||||
|
this.txtAsnNumber = new System.Windows.Forms.TextBox(); |
||||
|
this.btnClose = new System.Windows.Forms.Button(); |
||||
|
this.SuspendLayout(); |
||||
|
//
|
||||
|
// lblName
|
||||
|
//
|
||||
|
this.lblName.AutoSize = true; |
||||
|
this.lblName.Location = new System.Drawing.Point(21, 20); |
||||
|
this.lblName.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); |
||||
|
this.lblName.Name = "lblName"; |
||||
|
this.lblName.Size = new System.Drawing.Size(69, 27); |
||||
|
this.lblName.TabIndex = 0; |
||||
|
this.lblName.Text = "label1"; |
||||
|
//
|
||||
|
// txtAsnNumber
|
||||
|
//
|
||||
|
this.txtAsnNumber.Location = new System.Drawing.Point(26, 63); |
||||
|
this.txtAsnNumber.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7); |
||||
|
this.txtAsnNumber.Name = "txtAsnNumber"; |
||||
|
this.txtAsnNumber.PasswordChar = '*'; |
||||
|
this.txtAsnNumber.Size = new System.Drawing.Size(350, 34); |
||||
|
this.txtAsnNumber.TabIndex = 1; |
||||
|
this.txtAsnNumber.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPassword_KeyDown); |
||||
|
//
|
||||
|
// btnClose
|
||||
|
//
|
||||
|
this.btnClose.Location = new System.Drawing.Point(109, 111); |
||||
|
this.btnClose.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7); |
||||
|
this.btnClose.Name = "btnClose"; |
||||
|
this.btnClose.Size = new System.Drawing.Size(150, 51); |
||||
|
this.btnClose.TabIndex = 3; |
||||
|
this.btnClose.Text = "退出"; |
||||
|
this.btnClose.UseVisualStyleBackColor = true; |
||||
|
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); |
||||
|
//
|
||||
|
// frmASNScan
|
||||
|
//
|
||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F); |
||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
||||
|
this.ClientSize = new System.Drawing.Size(407, 192); |
||||
|
this.Controls.Add(this.btnClose); |
||||
|
this.Controls.Add(this.txtAsnNumber); |
||||
|
this.Controls.Add(this.lblName); |
||||
|
this.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; |
||||
|
this.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7); |
||||
|
this.Name = "frmASNScan"; |
||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
||||
|
this.Text = "ASN发运扫描"; |
||||
|
this.Load += new System.EventHandler(this.frmPasswordVerify_Load); |
||||
|
this.ResumeLayout(false); |
||||
|
this.PerformLayout(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
public System.Windows.Forms.Label lblName; |
||||
|
private System.Windows.Forms.TextBox txtAsnNumber; |
||||
|
private System.Windows.Forms.Button btnClose; |
||||
|
} |
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
using Stone.Common; |
||||
|
using Stone.Entity; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Data; |
||||
|
using System.Drawing; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Windows.Forms; |
||||
|
|
||||
|
namespace Stone.WinModule.Standard |
||||
|
{ |
||||
|
public partial class frmASNScan : Form |
||||
|
{ |
||||
|
public frmASNScan() |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
} |
||||
|
|
||||
|
private void frmPasswordVerify_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
this.lblName.Text = $"请扫描ASN号进行发运"; |
||||
|
} |
||||
|
|
||||
|
private void txtPassword_KeyDown(object sender, KeyEventArgs e) |
||||
|
{ |
||||
|
if (e.KeyCode == Keys.Enter) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
string asnNumber = this.txtAsnNumber.Text.Trim(); |
||||
|
Entity_t_JIS_VDA t_jis_vda = new Entity_t_JIS_VDA(); |
||||
|
DataSet dsAsn = t_jis_vda.GetData("", "[AsnNumber]='" + asnNumber + "'", "ID asc"); |
||||
|
if (dsAsn.Tables[0].Rows.Count == 0) throw new Exception("扫描的ASN无效!"); |
||||
|
var dtAsn = dsAsn.Tables[0]; |
||||
|
if (dtAsn.Select("[IsShipingVerification]=0").Length > 0) |
||||
|
{ |
||||
|
//取未校验的
|
||||
|
var needCheck = dtAsn.Select("IsPackingVerification = 0"); |
||||
|
//允许设置零件号不进行校验,判断未校验的零件是否在清单中
|
||||
|
Entity_t_PartPO t_partpo = new Entity_t_PartPO(); |
||||
|
DataSet dsPartPO = t_partpo.GetData("", "1 = 1", "ID asc"); |
||||
|
if (dsPartPO.Tables[0].Rows.Count == 0) |
||||
|
{ |
||||
|
throw new Exception("ASN中有未进行装箱校验的明细,禁止操作发货!"); |
||||
|
} |
||||
|
|
||||
|
var dtpartPO = dsPartPO.Tables[0]; |
||||
|
foreach (var row in needCheck) |
||||
|
{ |
||||
|
var partCode = row["PartNumber"].ToString(); |
||||
|
var partRow = dtpartPO.Select("Code = '" + partCode + "'"); |
||||
|
if (partRow.Length != 1) |
||||
|
{ |
||||
|
throw new Exception("系统未定义唯一的零件号 " + partCode + " !"); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (bool.Parse(partRow[0]["IsCheck"].ToString())) |
||||
|
{ |
||||
|
throw new Exception("零件号 " + partCode + " 未通过装箱校验,禁止操作发货!"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw new Exception("扫描的ASN已发运!"); |
||||
|
} |
||||
|
//保存数据
|
||||
|
var db = new Gm_WMS.DataAccess.DataService.LocalDBService(); |
||||
|
db.BeginTrans(); |
||||
|
Entity_v_JIS_VDA t_JIS_VDA = new Entity_v_JIS_VDA(db); |
||||
|
t_JIS_VDA.Edit($"UpLoadTime='" + DateTime.Now + "',IsShipingVerification = 1", $"[AsnNumber]='{asnNumber}'"); |
||||
|
db.Commit(); |
||||
|
|
||||
|
this.DialogResult = DialogResult.OK; |
||||
|
this.Close(); |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
MyMessageBox.ShowErrorMessage(ex.Message); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private void btnClose_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
this.Close(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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> |
Loading…
Reference in new issue