Browse Source

注塑一码到底改动

master
ruoxing.wang 1 month ago
parent
commit
b095743f05
  1. 40
      InjectionPC/FrmLogin.Designer.cs
  2. 2
      InjectionPC/FrmLogin.cs
  3. 430
      InjectionPC/FrmMain.Designer.cs
  4. 900
      InjectionPC/FrmMain2408.Designer.cs
  5. 1054
      InjectionPC/FrmMain2408.cs
  6. 191
      InjectionPC/FrmPackageDetail.Designer.cs
  7. 37
      InjectionPC/FrmPackageDetail.cs
  8. 135
      InjectionPC/FrmPackageDetail.resx
  9. 174
      InjectionPC/FrmQuality.Designer.cs
  10. 136
      InjectionPC/FrmQuality.cs
  11. 9
      InjectionPC/InjectionPC.csproj
  12. 72
      InjectionPC/Program.cs
  13. BIN
      InjectionPC/bin/Debug/装箱单.grf
  14. BIN
      InjectionPC/装箱单.grf
  15. 42
      InjectionSearch/Form1.Designer.cs
  16. 3
      InjectionSearch/Form1.cs
  17. 153
      InjectionSearch/FrmBarCodeReplace.Designer.cs
  18. 125
      InjectionSearch/FrmBarCodeReplace.cs
  19. 120
      InjectionSearch/FrmBarCodeReplace.resx
  20. 662
      InjectionSearch/FrmBarCodeSearch2408.Designer.cs
  21. 1272
      InjectionSearch/FrmBarCodeSearch2408.cs
  22. 120
      InjectionSearch/FrmBarCodeSearch2408.resx
  23. 299
      InjectionSearch/FrmPackageDetail.Designer.cs
  24. 77
      InjectionSearch/FrmPackageDetail.cs
  25. 141
      InjectionSearch/FrmPackageDetail.resx
  26. 27
      InjectionSearch/InjectionSearch.csproj
  27. 70
      InjectionSearch/Program.cs
  28. BIN
      InjectionSearch/bin/Debug/装箱单.grf
  29. BIN
      InjectionSearch/装箱单.grf
  30. 60
      MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs
  31. 18
      MESClassLibrary/BLL/BasicInfo/BasicBLL1.cs
  32. 4
      MESClassLibrary/BLL/Injection/UniqueBll.cs
  33. 37
      MESClassLibrary/BLL/Inspection/InjectionBoxBLL.cs
  34. 14
      MESClassLibrary/BLL/PlasticBLL.cs
  35. 67
      MESClassLibrary/BLL/Wms/WmsBLL.cs
  36. 19
      MESClassLibrary/DAL/BasicInfo/BadInjectionDAL.cs
  37. 168
      MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs
  38. 28
      MESClassLibrary/DAL/BasicInfo/BasicDAL1.cs
  39. 20
      MESClassLibrary/DAL/BasicInfo/PlasticDAL.cs
  40. 108
      MESClassLibrary/DAL/Injection/InjectionBoxDAL.cs
  41. 23
      MESClassLibrary/DAL/Injection/UniqueDal.cs
  42. 110
      MESClassLibrary/DAL/LocalDBService.cs
  43. 20
      MESClassLibrary/DAL/SqlHelper.cs
  44. 102
      MESClassLibrary/DAL/Wms/WmsDAL.cs
  45. 12
      MESClassLibrary/Enum/WmsInterfaceEnum.cs
  46. 7
      MESClassLibrary/MESClassLibrary.csproj
  47. 8
      MESClassLibrary/Model/InjectionBoxModel.cs
  48. 12
      MESClassLibrary/Model/WmsModel.cs
  49. 66
      PaintingPC/Program.cs
  50. 56
      喷涂上线/Code/PaintingPC/FrmChainUp1.Designer.cs

40
InjectionPC/FrmLogin.Designer.cs

@ -43,9 +43,10 @@
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(216, 194);
this.label1.Location = new System.Drawing.Point(432, 388);
this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 19);
this.label1.Size = new System.Drawing.Size(131, 38);
this.label1.TabIndex = 0;
this.label1.Text = "用户名";
//
@ -54,28 +55,31 @@
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(216, 247);
this.label2.Location = new System.Drawing.Point(432, 494);
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(47, 19);
this.label2.Size = new System.Drawing.Size(93, 38);
this.label2.TabIndex = 1;
this.label2.Text = "密码";
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(296, 185);
this.textBox1.Location = new System.Drawing.Point(592, 370);
this.textBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(159, 29);
this.textBox1.Size = new System.Drawing.Size(314, 51);
this.textBox1.TabIndex = 2;
this.textBox1.Click += new System.EventHandler(this.textBox1_Click);
//
// textBox2
//
this.textBox2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox2.Location = new System.Drawing.Point(296, 247);
this.textBox2.Location = new System.Drawing.Point(592, 494);
this.textBox2.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new System.Drawing.Size(159, 29);
this.textBox2.Size = new System.Drawing.Size(314, 51);
this.textBox2.TabIndex = 3;
this.textBox2.Click += new System.EventHandler(this.textBox2_Click);
//
@ -83,11 +87,12 @@
//
this.button1.BackColor = System.Drawing.Color.LightSkyBlue;
this.button1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(231, 306);
this.button1.Location = new System.Drawing.Point(462, 612);
this.button1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(84, 38);
this.button1.Size = new System.Drawing.Size(168, 76);
this.button1.TabIndex = 4;
this.button1.Text = "登";
this.button1.Text = "登";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
@ -95,9 +100,10 @@
//
this.button2.BackColor = System.Drawing.Color.LightSkyBlue;
this.button2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.Location = new System.Drawing.Point(387, 306);
this.button2.Location = new System.Drawing.Point(774, 612);
this.button2.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(83, 38);
this.button2.Size = new System.Drawing.Size(166, 76);
this.button2.TabIndex = 5;
this.button2.Text = "取消";
this.button2.UseVisualStyleBackColor = false;
@ -108,17 +114,18 @@
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(703, 453);
this.pictureBox1.Size = new System.Drawing.Size(1406, 906);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 6;
this.pictureBox1.TabStop = false;
//
// FrmLogin
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(703, 453);
this.ClientSize = new System.Drawing.Size(1406, 906);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.textBox2);
@ -126,6 +133,7 @@
this.Controls.Add(this.button2);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.Name = "FrmLogin";
this.Text = "登录";
this.Load += new System.EventHandler(this.FrmLogin_Load);

2
InjectionPC/FrmLogin.cs

@ -91,7 +91,7 @@ namespace InjectionPC
if (dt != null && dt.Rows.Count > 0)
{
this.Visible = false;
// Form fr = new FrmMain();
//Form fr = new FrmMain();
Form fr = new FrmMain2408();
fr.Show();
//if (ConfigurationManager.AppSettings["Mode"] == "0")

430
InjectionPC/FrmMain.Designer.cs

File diff suppressed because it is too large

900
InjectionPC/FrmMain2408.Designer.cs

File diff suppressed because it is too large

1054
InjectionPC/FrmMain2408.cs

File diff suppressed because it is too large

191
InjectionPC/FrmPackageDetail.Designer.cs

@ -0,0 +1,191 @@

namespace InjectionPC
{
partial class FrmPackageDetail
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.txtPackageCode = new System.Windows.Forms.TextBox();
this.btnSearch = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1785, 967);
this.tableLayoutPanel1.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.txtPackageCode);
this.panel1.Controls.Add(this.btnSearch);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1779, 54);
this.panel1.TabIndex = 0;
//
// txtPackageCode
//
this.txtPackageCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPackageCode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPackageCode.Location = new System.Drawing.Point(1115, 5);
this.txtPackageCode.Name = "txtPackageCode";
this.txtPackageCode.Size = new System.Drawing.Size(483, 44);
this.txtPackageCode.TabIndex = 1;
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(1627, 0);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(153, 51);
this.btnSearch.TabIndex = 0;
this.btnSearch.Text = "查 询";
this.btnSearch.UseVisualStyleBackColor = true;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.,
this.,
this.,
this.,
this.});
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(3, 63);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 82;
this.dataGridView1.RowTemplate.Height = 37;
this.dataGridView1.Size = new System.Drawing.Size(1779, 841);
this.dataGridView1.TabIndex = 1;
//
// 箱单号
//
this..DataPropertyName = "BoxNo";
this..HeaderText = "箱单号";
this..MinimumWidth = 10;
this..Name = "箱单号";
this..Width = 300;
//
// 条码
//
this..DataPropertyName = "BarCode";
this..HeaderText = "条码";
this..MinimumWidth = 10;
this..Name = "条码";
this..Width = 300;
//
// 注塑码
//
this..DataPropertyName = "OneBarCode";
this..HeaderText = "注塑码";
this..MinimumWidth = 10;
this..Name = "注塑码";
this..Width = 200;
//
// 零件号
//
this..DataPropertyName = "PartNo";
this..HeaderText = "零件号";
this..MinimumWidth = 10;
this..Name = "零件号";
this..Width = 200;
//
// 时间
//
this..DataPropertyName = "CreateTime";
this..HeaderText = "时间";
this..MinimumWidth = 10;
this..Name = "时间";
this..Width = 200;
//
// FrmPackageDetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1785, 967);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "FrmPackageDetail";
this.Text = "箱单详细信息";
this.tableLayoutPanel1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtPackageCode;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
}
}

37
InjectionPC/FrmPackageDetail.cs

@ -0,0 +1,37 @@
using MESClassLibrary.BLL.BasicInfo;
using MESClassLibrary.BLL.Inspection;
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 InjectionPC
{
public partial class FrmPackageDetail : Form
{
private BarCodeBLL _barCodeBLL = new BarCodeBLL();
private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL();
private string _packageCode = string.Empty;
public FrmPackageDetail(string pPackageCode)
{
InitializeComponent();
this._packageCode = pPackageCode;
txtPackageCode.Text = pPackageCode;
dataGridView1.AutoGenerateColumns = false;
btnSearch_Click(null, null);
}
private void btnSearch_Click(object sender, EventArgs e)
{
string boxCode = txtPackageCode.Text?.Trim();
DataTable dt = _barCodeBLL.SearchBarCode(boxCode, Program.tableName, "200");
dataGridView1.DataSource = dt;
}
}
}

135
InjectionPC/FrmPackageDetail.resx

@ -0,0 +1,135 @@
<?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="箱单号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="注塑码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="零件号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

174
InjectionPC/FrmQuality.Designer.cs

@ -12,6 +12,8 @@
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
try
{
if (disposing && (components != null))
{
@ -19,6 +21,11 @@
}
base.Dispose(disposing);
}
catch
{
}
}
#region Windows Form Designer generated code
@ -57,9 +64,12 @@
this.label12 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.lbBoxCode = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// timer1
@ -71,9 +81,10 @@
this.label11.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label11.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(10, 595);
this.label11.Location = new System.Drawing.Point(20, 1189);
this.label11.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(169, 420);
this.label11.Size = new System.Drawing.Size(335, 838);
this.label11.TabIndex = 28;
this.label11.Text = "缺陷原因:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -82,9 +93,10 @@
//
this.label8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label8.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(809, 92);
this.label8.Location = new System.Drawing.Point(1619, 184);
this.label8.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(184, 52);
this.label8.Size = new System.Drawing.Size(366, 102);
this.label8.TabIndex = 24;
this.label8.Text = "cy";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -94,9 +106,10 @@
this.label7.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label7.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(703, 92);
this.label7.Location = new System.Drawing.Point(1405, 184);
this.label7.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(110, 52);
this.label7.Size = new System.Drawing.Size(218, 102);
this.label7.TabIndex = 23;
this.label7.Text = "用户:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -105,9 +118,10 @@
//
this.label6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label6.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(548, 93);
this.label6.Location = new System.Drawing.Point(1096, 187);
this.label6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(155, 52);
this.label6.Size = new System.Drawing.Size(309, 102);
this.label6.TabIndex = 22;
this.label6.Text = "IM01";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -117,9 +131,10 @@
this.label5.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label5.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(439, 93);
this.label5.Location = new System.Drawing.Point(877, 187);
this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(110, 52);
this.label5.Size = new System.Drawing.Size(218, 102);
this.label5.TabIndex = 21;
this.label5.Text = "工位:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -133,9 +148,10 @@
this.comboBox1.Items.AddRange(new object[] {
"白班",
"夜班"});
this.comboBox1.Location = new System.Drawing.Point(287, 93);
this.comboBox1.Location = new System.Drawing.Point(573, 187);
this.comboBox1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(152, 51);
this.comboBox1.Size = new System.Drawing.Size(300, 93);
this.comboBox1.TabIndex = 20;
//
// label4
@ -143,9 +159,10 @@
this.label4.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label4.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(178, 93);
this.label4.Location = new System.Drawing.Point(356, 187);
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(110, 52);
this.label4.Size = new System.Drawing.Size(218, 102);
this.label4.TabIndex = 19;
this.label4.Text = "班组:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -155,9 +172,10 @@
this.label3.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label3.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(10, 93);
this.label3.Location = new System.Drawing.Point(20, 187);
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(169, 52);
this.label3.Size = new System.Drawing.Size(335, 102);
this.label3.TabIndex = 18;
this.label3.Text = "用户信息:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -166,9 +184,10 @@
//
this.label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label2.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(1080, 4);
this.label2.Location = new System.Drawing.Point(2160, 8);
this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(187, 84);
this.label2.Size = new System.Drawing.Size(373, 166);
this.label2.TabIndex = 3;
this.label2.Text = "2019-05-29 10:30:31";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -178,9 +197,10 @@
//
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(4, 4);
this.pictureBox1.Location = new System.Drawing.Point(8, 8);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(169, 84);
this.pictureBox1.Size = new System.Drawing.Size(335, 166);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 2;
this.pictureBox1.TabStop = false;
@ -189,9 +209,10 @@
//
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label1.Font = new System.Drawing.Font("宋体", 28F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(172, 4);
this.label1.Location = new System.Drawing.Point(344, 8);
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(911, 84);
this.label1.Size = new System.Drawing.Size(1821, 166);
this.label1.TabIndex = 1;
this.label1.Text = "注塑车间质量信息录入";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -200,10 +221,12 @@
//
this.label10.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
this.label10.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(10, 246);
this.label10.Location = new System.Drawing.Point(5, 0);
this.label10.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(169, 350);
this.label10.Size = new System.Drawing.Size(325, 346);
this.label10.TabIndex = 26;
this.label10.Text = "产品展示:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -213,9 +236,10 @@
this.label9.BackColor = System.Drawing.Color.SpringGreen;
this.label9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label9.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(993, 92);
this.label9.Location = new System.Drawing.Point(1987, 184);
this.label9.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(282, 52);
this.label9.Size = new System.Drawing.Size(562, 102);
this.label9.TabIndex = 25;
this.label9.Text = "切换到:条码打印";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -226,9 +250,10 @@
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.pictureBox1);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(6, 5);
this.panel1.Location = new System.Drawing.Point(12, 11);
this.panel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1269, 91);
this.panel1.Size = new System.Drawing.Size(2539, 181);
this.panel1.TabIndex = 17;
//
// label20
@ -236,9 +261,10 @@
this.label20.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label20.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label20.Location = new System.Drawing.Point(10, 144);
this.label20.Location = new System.Drawing.Point(20, 288);
this.label20.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(169, 52);
this.label20.Size = new System.Drawing.Size(335, 102);
this.label20.TabIndex = 34;
this.label20.Text = "扫描箱单:";
this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -248,9 +274,10 @@
this.label23.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label23.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label23.Location = new System.Drawing.Point(10, 195);
this.label23.Location = new System.Drawing.Point(20, 389);
this.label23.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(169, 52);
this.label23.Size = new System.Drawing.Size(335, 102);
this.label23.TabIndex = 37;
this.label23.Text = "扫描条码:";
this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -258,9 +285,10 @@
// textBox3
//
this.textBox3.Font = new System.Drawing.Font("宋体", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox3.Location = new System.Drawing.Point(178, 195);
this.textBox3.Location = new System.Drawing.Point(356, 389);
this.textBox3.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(525, 50);
this.textBox3.Size = new System.Drawing.Size(1047, 93);
this.textBox3.TabIndex = 38;
this.textBox3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox3_KeyDown);
//
@ -269,9 +297,10 @@
this.label24.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label24.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label24.Location = new System.Drawing.Point(704, 193);
this.label24.Location = new System.Drawing.Point(1408, 387);
this.label24.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(150, 52);
this.label24.Size = new System.Drawing.Size(298, 102);
this.label24.TabIndex = 39;
this.label24.Text = "产品名称:";
this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -279,17 +308,19 @@
// textBox4
//
this.textBox4.Font = new System.Drawing.Font("宋体", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox4.Location = new System.Drawing.Point(853, 196);
this.textBox4.Location = new System.Drawing.Point(1707, 392);
this.textBox4.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(417, 50);
this.textBox4.Size = new System.Drawing.Size(831, 93);
this.textBox4.TabIndex = 40;
//
// pictureBox2
//
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox2.Location = new System.Drawing.Point(178, 248);
this.pictureBox2.Location = new System.Drawing.Point(356, 496);
this.pictureBox2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(1094, 348);
this.pictureBox2.Size = new System.Drawing.Size(2186, 694);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 41;
this.pictureBox2.TabStop = false;
@ -297,18 +328,20 @@
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Location = new System.Drawing.Point(178, 595);
this.panel2.Location = new System.Drawing.Point(355, 1189);
this.panel2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1017, 420);
this.panel2.Size = new System.Drawing.Size(2030, 838);
this.panel2.TabIndex = 42;
//
// button1
//
this.button1.BackColor = System.Drawing.Color.DeepSkyBlue;
this.button1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(1193, 595);
this.button1.Location = new System.Drawing.Point(2387, 1189);
this.button1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(77, 420);
this.button1.Size = new System.Drawing.Size(155, 840);
this.button1.TabIndex = 40;
this.button1.Text = "报废";
this.button1.UseVisualStyleBackColor = false;
@ -317,9 +350,10 @@
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("宋体", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(178, 146);
this.textBox1.Location = new System.Drawing.Point(356, 292);
this.textBox1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(525, 50);
this.textBox1.Size = new System.Drawing.Size(1047, 93);
this.textBox1.TabIndex = 43;
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
@ -328,9 +362,10 @@
this.label12.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label12.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(704, 145);
this.label12.Location = new System.Drawing.Point(1408, 291);
this.label12.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(150, 52);
this.label12.Size = new System.Drawing.Size(298, 102);
this.label12.TabIndex = 44;
this.label12.Text = "报废数量:";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -339,9 +374,10 @@
//
this.textBox2.Enabled = false;
this.textBox2.Font = new System.Drawing.Font("宋体", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox2.Location = new System.Drawing.Point(853, 145);
this.textBox2.Location = new System.Drawing.Point(1707, 291);
this.textBox2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(417, 50);
this.textBox2.Size = new System.Drawing.Size(831, 93);
this.textBox2.TabIndex = 45;
//
// timer2
@ -350,11 +386,39 @@
this.timer2.Interval = 60000;
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
//
// lbBoxCode
//
this.lbBoxCode.AutoSize = true;
this.lbBoxCode.BackColor = System.Drawing.Color.DeepSkyBlue;
this.lbBoxCode.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbBoxCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbBoxCode.Location = new System.Drawing.Point(4, 346);
this.lbBoxCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbBoxCode.Name = "lbBoxCode";
this.lbBoxCode.Size = new System.Drawing.Size(327, 346);
this.lbBoxCode.TabIndex = 46;
this.lbBoxCode.Text = "A2478850800.240923.002.001";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.lbBoxCode, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label10, 0, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 494);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(335, 692);
this.tableLayoutPanel1.TabIndex = 46;
//
// FrmQuality
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1280, 1024);
this.ClientSize = new System.Drawing.Size(2560, 2048);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label12);
this.Controls.Add(this.textBox1);
@ -374,10 +438,10 @@
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.Name = "FrmQuality";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "质量录入";
@ -385,6 +449,8 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -419,5 +485,7 @@
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label lbBoxCode;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
}
}

136
InjectionPC/FrmQuality.cs

@ -27,8 +27,9 @@ namespace InjectionPC
public partial class FrmQuality : Form
{
private static string position = "", reason = "";
private bool _isScanBarCode = true;
int count = 0; //缺陷图选择个数
private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL();
private string stationId = "";
public FrmQuality()
{
@ -174,11 +175,12 @@ namespace InjectionPC
#endregion
textBox3.Text = Program.strBarCode;
lbBoxCode.Text = Program.strBoxCode;
textBox3.SelectAll();
if (ConfigurationManager.AppSettings["IsLast"] == "1")
{
label9.Visible = false;
label9.Visible = true;
}
else if (ConfigurationManager.AppSettings["IsLast"] == "0")
{
@ -198,10 +200,17 @@ namespace InjectionPC
}
private void timer_Tick(object sender, EventArgs e)
{
try
{
label2.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Thread.Sleep(500);
}
catch
{
}
}
/// <summary>
@ -351,6 +360,7 @@ namespace InjectionPC
#region 保存报废详细信息和是否装过箱,装过箱子的不允许报废
badmd.ID = Guid.NewGuid().ToString();
//直供件条码
if (textBox3.Text.Trim().Contains("#"))
{
badmd.BarCode = textBox3.Text.Trim();
@ -359,26 +369,46 @@ namespace InjectionPC
{
badmd.OneBarCode = dt1.Rows[0]["OneBarCode"].ToString();
isbox = dt1.Rows[0]["BoxNo"].ToString();
if (!string.IsNullOrEmpty(isbox))
{
MessageBox.Show("请产品已做装箱,不能做报废!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
reason = "";
textBox3.Text = "";
textBox3.TabIndex = 0;
textBox3.Focus();
textBox4.Text = "";
pictureBox2.Image = null;
if (SubtrBoxCount(isbox) == false)
return;
pictureBox2.Controls.Clear();
//if (!string.IsNullOrEmpty(isbox))
//{
// DataTable boxTable = _injectionBoxBLL.SearchBox(isbox);
// if (boxTable.Rows.Count > 0)
// {
// if(boxTable.Rows[0]["IsPrint"].ToString() == "1")
// {
// MessageBox.Show("请产品已做装箱,不能做报废!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// reason = "";
// textBox3.Text = "";
// textBox3.TabIndex = 0;
// textBox3.Focus();
panel2.Controls.Clear();
return;
}
// textBox4.Text = "";
// pictureBox2.Image = null;
// pictureBox2.Controls.Clear();
// panel2.Controls.Clear();
// return;
// }
// else
// {
// _injectionBoxBLL.UpdateBoxCount(isbox, -1);
// }
// }
//}
}
}
else
{
//普通条码
if (textBox3.Text.Trim().Contains('.'))
{
badmd.BarCode = textBox3.Text.Trim();
@ -386,6 +416,11 @@ namespace InjectionPC
if (dt != null && dt.Rows.Count > 0)
{
badmd.OneBarCode = dt.Rows[0]["OneBarCode"].ToString();
isbox = dt.Rows[0]["BoxNo"].ToString();
if (SubtrBoxCount(isbox) == false)
return;
}
else
{
@ -393,6 +428,7 @@ namespace InjectionPC
return;
}
}
//20位注塑码
else
{
badmd.OneBarCode = textBox3.Text.Trim();
@ -402,20 +438,24 @@ namespace InjectionPC
{
badmd.BarCode = dt1.Rows[0]["BarCode"].ToString();
isbox = dt1.Rows[0]["BoxNo"].ToString();
if (!string.IsNullOrEmpty(isbox))
{
MessageBox.Show("请产品已做装箱,不能做报废!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
reason = "";
textBox3.Text = "";
textBox3.TabIndex = 0;
textBox3.Focus();
textBox4.Text = "";
pictureBox2.Image = null;
pictureBox2.Controls.Clear();
panel2.Controls.Clear();
if (SubtrBoxCount(isbox) == false)
return;
}
//if (!string.IsNullOrEmpty(isbox))
//{
// MessageBox.Show("请产品已做装箱,不能做报废!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// reason = "";
// textBox3.Text = "";
// textBox3.TabIndex = 0;
// textBox3.Focus();
// textBox4.Text = "";
// pictureBox2.Image = null;
// pictureBox2.Controls.Clear();
// panel2.Controls.Clear();
// return;
//}
}
}
@ -541,7 +581,44 @@ namespace InjectionPC
position = "";
reason = "";
}
/// <summary>
/// 扣减箱码数量
/// </summary>
/// <param name="boxCode"></param>
/// <returns></returns>
bool SubtrBoxCount(string boxCode)
{
if (!string.IsNullOrEmpty(boxCode))
{
DataTable boxTable = _injectionBoxBLL.SearchBox(boxCode);
if (boxTable.Rows.Count > 0)
{
if (boxTable.Rows[0]["IsPrint"].ToString() == "1")
{
MessageBox.Show("请产品已做装箱,不能做报废!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
reason = "";
textBox3.Text = "";
textBox3.TabIndex = 0;
textBox3.Focus();
textBox4.Text = "";
pictureBox2.Image = null;
pictureBox2.Controls.Clear();
panel2.Controls.Clear();
return false;
}
else
{
_injectionBoxBLL.UpdateBoxCount(boxCode, -1);
}
}
}
return true;
}
private static bool IsNumeric(string str)
{
System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[0-9]\d*$");
@ -675,6 +752,7 @@ namespace InjectionPC
{
if (e.KeyCode == Keys.Enter)
{
_isScanBarCode = true;
string code = "";
string[] barcode=new string[3];
int row = 0, col = 0;
@ -840,7 +918,7 @@ namespace InjectionPC
LineID = sdt.Rows[0]["LineID"].ToString();
}
sdt.Dispose();
//sdt.Dispose();
int drow = 0, dcol = 6;
@ -946,7 +1024,7 @@ namespace InjectionPC
}
#endregion
_isScanBarCode = false;
DataTable dt1 = bll.SearchBox(textBox1.Text);
if (dt1 != null && dt1.Rows.Count > 0)
{

9
InjectionPC/InjectionPC.csproj

@ -130,6 +130,12 @@
<Compile Include="FrmMain_Injection.Designer.cs">
<DependentUpon>FrmMain_Injection.cs</DependentUpon>
</Compile>
<Compile Include="FrmPackageDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmPackageDetail.Designer.cs">
<DependentUpon>FrmPackageDetail.cs</DependentUpon>
</Compile>
<Compile Include="FrmQuality_New.cs">
<SubType>Form</SubType>
</Compile>
@ -192,6 +198,9 @@
<EmbeddedResource Include="FrmMain_Injection.resx">
<DependentUpon>FrmMain_Injection.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmPackageDetail.resx">
<DependentUpon>FrmPackageDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmQuality_New.resx">
<DependentUpon>FrmQuality_New.cs</DependentUpon>
</EmbeddedResource>

72
InjectionPC/Program.cs

@ -4,6 +4,8 @@ using System.Linq;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Diagnostics;
namespace InjectionPC
{
@ -29,6 +31,7 @@ namespace InjectionPC
public static string WeightPsw;
public static string tableName;
public static string strBarCode;
public static string strBoxCode;
public static int interVal;
@ -41,6 +44,19 @@ namespace InjectionPC
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
//处理UI线程异常
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
//处理非UI线程异常
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
//Application.Run(new FrmMain());
Application.Run(new FrmLogin());
mutex.ReleaseMutex();
@ -93,5 +109,61 @@ namespace InjectionPC
}
}
}
#region 系统异常处理
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
string str = GetExceptionMsg(e.Exception, e.ToString());
MessageBox.Show(str);
//LogManager.WriteLog(str);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
MessageBox.Show(str);
//LogManager.WriteLog(str);
}
static string GetExceptionMsg(Exception ex, string backStr)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("****************************异常文本****************************");
sb.AppendLine("【出现时间】:" + DateTime.Now.ToString());
if (ex != null)
{
sb.AppendLine("【异常类型】:" + ex.GetType().Name);
sb.AppendLine("【异常信息】:" + ex.Message);
sb.AppendLine("【堆栈调用】:" + ex.StackTrace);
}
else
{
sb.AppendLine("【未处理异常】:" + backStr);
}
sb.AppendLine("***************************************************************");
return sb.ToString();
}
private static void ExceptionMonitor_ExceptionOver()
{
MessageBox.Show("系统遇到未知异常,即将重新启动。");
Process.Start(Application.ExecutablePath);
Process.GetCurrentProcess().Kill();
}
#endregion
}
}

BIN
InjectionPC/bin/Debug/装箱单.grf

Binary file not shown.

BIN
InjectionPC/装箱单.grf

Binary file not shown.

42
InjectionSearch/Form1.Designer.cs

@ -42,9 +42,10 @@
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(1, 0);
this.pictureBox1.Location = new System.Drawing.Point(2, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(704, 456);
this.pictureBox1.Size = new System.Drawing.Size(1291, 798);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
@ -54,27 +55,30 @@
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(224, 234);
this.label2.Location = new System.Drawing.Point(411, 410);
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(47, 19);
this.label2.Size = new System.Drawing.Size(83, 34);
this.label2.TabIndex = 7;
this.label2.Text = "密码";
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(304, 172);
this.textBox1.Location = new System.Drawing.Point(557, 301);
this.textBox1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(159, 29);
this.textBox1.Size = new System.Drawing.Size(288, 45);
this.textBox1.TabIndex = 8;
//
// textBox2
//
this.textBox2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox2.Location = new System.Drawing.Point(304, 234);
this.textBox2.Location = new System.Drawing.Point(557, 410);
this.textBox2.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new System.Drawing.Size(159, 29);
this.textBox2.Size = new System.Drawing.Size(288, 45);
this.textBox2.TabIndex = 9;
this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
@ -82,11 +86,12 @@
//
this.button1.BackColor = System.Drawing.Color.LightSkyBlue;
this.button1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(239, 293);
this.button1.Location = new System.Drawing.Point(438, 513);
this.button1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(84, 38);
this.button1.Size = new System.Drawing.Size(154, 66);
this.button1.TabIndex = 10;
this.button1.Text = "登";
this.button1.Text = "登";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
@ -94,9 +99,10 @@
//
this.button2.BackColor = System.Drawing.Color.LightSkyBlue;
this.button2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.Location = new System.Drawing.Point(395, 293);
this.button2.Location = new System.Drawing.Point(724, 513);
this.button2.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(83, 38);
this.button2.Size = new System.Drawing.Size(152, 66);
this.button2.TabIndex = 11;
this.button2.Text = "取消";
this.button2.UseVisualStyleBackColor = false;
@ -105,17 +111,18 @@
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(224, 181);
this.label1.Location = new System.Drawing.Point(411, 317);
this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 19);
this.label1.Size = new System.Drawing.Size(117, 34);
this.label1.TabIndex = 6;
this.label1.Text = "用户名";
//
// FrmLogin
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(703, 453);
this.ClientSize = new System.Drawing.Size(1289, 793);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.textBox2);
@ -123,6 +130,7 @@
this.Controls.Add(this.button2);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.Name = "FrmLogin";
this.Text = "登录";
this.Load += new System.EventHandler(this.FrmLogin_Load);

3
InjectionSearch/Form1.cs

@ -18,6 +18,7 @@ namespace InjectionSearch
public FrmLogin()
{
InitializeComponent();
StartPosition = FormStartPosition.CenterScreen;
}
private void button1_Click(object sender, EventArgs e)
@ -66,7 +67,7 @@ namespace InjectionSearch
DataTable dt = bll.SearchInfoByNameAndPsw(textBox1.Text.Trim(), stationID, textBox2.Text.Trim());
if (dt != null && dt.Rows.Count > 0)
{
Form fr = new FrmBarCodeSearch();
Form fr = new FrmBarCodeSearch2408();
fr.Show();
this.Hide();
}

153
InjectionSearch/FrmBarCodeReplace.Designer.cs

@ -0,0 +1,153 @@

namespace InjectionSearch
{
partial class FrmBarCodeReplace
{
/// <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.label1 = new System.Windows.Forms.Label();
this.lbBoxCode = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lbOldCode = new System.Windows.Forms.Label();
this.txtNewCode = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(215, 127);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(127, 43);
this.label1.TabIndex = 0;
this.label1.Text = "箱码:";
//
// lbBoxCode
//
this.lbBoxCode.AutoSize = true;
this.lbBoxCode.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbBoxCode.Location = new System.Drawing.Point(360, 127);
this.lbBoxCode.Name = "lbBoxCode";
this.lbBoxCode.Size = new System.Drawing.Size(63, 43);
this.lbBoxCode.TabIndex = 1;
this.lbBoxCode.Text = " ";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(129, 235);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(213, 43);
this.label2.TabIndex = 2;
this.label2.Text = "不良条码:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(172, 370);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(170, 43);
this.label3.TabIndex = 3;
this.label3.Text = "新条码:";
//
// lbOldCode
//
this.lbOldCode.AutoSize = true;
this.lbOldCode.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbOldCode.Location = new System.Drawing.Point(360, 235);
this.lbOldCode.Name = "lbOldCode";
this.lbOldCode.Size = new System.Drawing.Size(63, 43);
this.lbOldCode.TabIndex = 4;
this.lbOldCode.Text = " ";
//
// txtNewCode
//
this.txtNewCode.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtNewCode.Location = new System.Drawing.Point(368, 367);
this.txtNewCode.Name = "txtNewCode";
this.txtNewCode.Size = new System.Drawing.Size(682, 57);
this.txtNewCode.TabIndex = 5;
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOK.Location = new System.Drawing.Point(273, 618);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(211, 109);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "替换";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnClose
//
this.btnClose.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(809, 618);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(211, 109);
this.btnClose.TabIndex = 7;
this.btnClose.Text = "取消";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// FrmBarCodeReplace
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1418, 859);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.txtNewCode);
this.Controls.Add(this.lbOldCode);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.lbBoxCode);
this.Controls.Add(this.label1);
this.Name = "FrmBarCodeReplace";
this.Text = "不良零件替换";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lbBoxCode;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lbOldCode;
private System.Windows.Forms.TextBox txtNewCode;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnClose;
}
}

125
InjectionSearch/FrmBarCodeReplace.cs

@ -0,0 +1,125 @@
using MESClassLibrary.BLL.BasicInfo;
using MESClassLibrary.BLL.Injection;
using MESClassLibrary.BLL.Inspection;
using MESClassLibrary.Model;
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 InjectionSearch
{
public partial class FrmBarCodeReplace : Form
{
private BarCodeBLL _barCodeBLL = new BarCodeBLL();
private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL();
private BadInjectionBLL _badInjectionBLL = new BadInjectionBLL();
private WmsBLL wmsBLL = new WmsBLL();
public FrmBarCodeReplace(DataRow barCodeRow)
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterParent;
lbBoxCode.Text = barCodeRow["BoxNo"].ToString();
lbOldCode.Text = barCodeRow["OneBarCode"].ToString();
}
private void btnOK_Click(object sender, EventArgs e)
{
try
{
string newCode = txtNewCode.Text?.Trim();
string oldCode = lbOldCode.Text?.Trim();
string boxCode = lbBoxCode.Text?.Trim();
if (string.IsNullOrEmpty(newCode))
{
MessageBox.Show("新条码不能为空.");
return;
}
DataTable dt = _barCodeBLL.SearchBarCodeByOne(newCode);
if (dt.Rows.Count == 0)
{
MessageBox.Show($"输入条码{newCode}在系统中不存在.");
return;
}
if (dt.Rows[0]["IsBad"].ToString() == "1")
{
MessageBox.Show($"输入条码{newCode}已报废,无法使用.");
return;
}
if (!string.IsNullOrEmpty(dt.Rows[0]["BoxNo"].ToString()))
{
MessageBox.Show($"输入条码{newCode}已绑定箱码{dt.Rows[0]["BoxNo"].ToString()},无法使用.");
return;
}
DataTable oldTable = _barCodeBLL.SearchBarCodeByOne(oldCode);
if (oldTable.Rows.Count == 0)
{
MessageBox.Show($"原有条码{oldCode}在系统中不存在.");
return;
}
string boxNo = oldTable.Rows[0]["BoxNo"].ToString();
if (string.IsNullOrEmpty(boxNo))
{
MessageBox.Show($"不良条码{oldCode}未绑定箱码,无法替换.");
return;
}
if (oldTable.Rows[0]["PartNo"].ToString()?.ToLower() != dt.Rows[0]["PartNo"].ToString()?.ToLower())
{
MessageBox.Show($"新零件号{oldTable.Rows[0]["PartNo"].ToString()}与原零件号{dt.Rows[0]["PartNo"].ToString()}不一致,无法替换.");
return;
}
//打印箱码才能替换
if( wmsBLL.IsSendPackageCode(boxCode) == false)
{
MessageBox.Show($"箱码{boxCode}尚未报工,无法此处替换.");
return;
}
DialogResult result = MessageBox.Show($"确认用条码{newCode}替换原有条码{oldCode},确认将原有条码{oldCode}进行报废处理?", "提示", MessageBoxButtons.OKCancel,
MessageBoxIcon.Information);
if (result == DialogResult.Cancel) return;
//新条码更新箱码
//旧条码清空箱码,IsBad=1
//旧条码插入tb_Bad_Injection表报废记录
//_barCodeBLL.UpdateBoxNoByID(oldTable.Rows[0]["TableName"].ToString(), boxNo, dt.Rows[0]["ID"].ToString());
//_barCodeBLL.UpdateBoxNoNull(oldTable.Rows[0]["TableName"].ToString(), oldTable.Rows[0]["ID"].ToString());
BadInjectionModel model = new BadInjectionModel();
model.ID = Guid.NewGuid().ToString();
model.OneBarCode = oldTable.Rows[0]["OneBarCode"].ToString();
model.BarCode = oldTable.Rows[0]["BarCode"].ToString();
model.StationID = oldTable.Rows[0]["StationID"].ToString();
model.BadPosition = "";
model.BadReason = "不良替换自动报废";
model.PlanID = oldTable.Rows[0]["PlanID"].ToString();
//_badInjectionBLL.Add_Info(model);
_barCodeBLL.BarCodeReplace(oldTable.Rows[0]["TableName"].ToString(), dt.Rows[0]["TableName"].ToString(), boxNo, oldTable.Rows[0]["ID"].ToString(), dt.Rows[0]["ID"].ToString(), dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(), model);
MessageBox.Show($"替换成功.原条码[{oldCode}]已被报废.");
this.Close();
}
catch(Exception ex)
{
MessageBox.Show("操作失败,失败原因:" + ex.Message);
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

120
InjectionSearch/FrmBarCodeReplace.resx

@ -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>

662
InjectionSearch/FrmBarCodeSearch2408.Designer.cs

@ -0,0 +1,662 @@
namespace InjectionSearch
{
partial class FrmBarCodeSearch2408
{
/// <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()
{
GlacialComponents.Controls.GLColumn glColumn1 = new GlacialComponents.Controls.GLColumn();
GlacialComponents.Controls.GLColumn glColumn2 = new GlacialComponents.Controls.GLColumn();
GlacialComponents.Controls.GLColumn glColumn3 = new GlacialComponents.Controls.GLColumn();
GlacialComponents.Controls.GLColumn glColumn4 = new GlacialComponents.Controls.GLColumn();
this.label1 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.cboxHandBox = new System.Windows.Forms.CheckBox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.btnBoxRePrint = new System.Windows.Forms.Button();
this.btnPackage = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.glacialList1 = new GlacialComponents.Controls.GlacialList();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.comBoxSizeL = new System.Windows.Forms.ComboBox();
this.label38 = new System.Windows.Forms.Label();
this.lbPackageCodeL = new System.Windows.Forms.Label();
this.pnBoxReprint = new System.Windows.Forms.Panel();
this.btnPrintCancel = new System.Windows.Forms.Button();
this.btnRePrint = new System.Windows.Forms.Button();
this.txtRePrintBoxCode = new System.Windows.Forms.TextBox();
this.label24 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
this.pnBoxReprint.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label1.Location = new System.Drawing.Point(180, 118);
this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(202, 58);
this.label1.TabIndex = 0;
this.label1.Text = "产品:";
//
// comboBox1
//
this.comboBox1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(444, 114);
this.comboBox1.Margin = new System.Windows.Forms.Padding(6);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(1250, 66);
this.comboBox1.TabIndex = 1;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label2.Location = new System.Drawing.Point(170, 218);
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(261, 58);
this.label2.TabIndex = 2;
this.label2.Text = "零件号:";
//
// textBox1
//
this.textBox1.Enabled = false;
this.textBox1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.textBox1.Location = new System.Drawing.Point(444, 202);
this.textBox1.Margin = new System.Windows.Forms.Padding(6);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(474, 74);
this.textBox1.TabIndex = 3;
//
// textBox2
//
this.textBox2.Enabled = false;
this.textBox2.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.textBox2.Location = new System.Drawing.Point(444, 304);
this.textBox2.Margin = new System.Windows.Forms.Padding(6);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(1250, 74);
this.textBox2.TabIndex = 4;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label3.Location = new System.Drawing.Point(180, 326);
this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(202, 58);
this.label3.TabIndex = 5;
this.label3.Text = "原料:";
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Aquamarine;
this.panel1.Controls.Add(this.cboxHandBox);
this.panel1.Controls.Add(this.comboBox2);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.label16);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.textBox4);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.textBox3);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.comboBox1);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Location = new System.Drawing.Point(370, 1082);
this.panel1.Margin = new System.Windows.Forms.Padding(6);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(2008, 634);
this.panel1.TabIndex = 6;
//
// cboxHandBox
//
this.cboxHandBox.AutoSize = true;
this.cboxHandBox.Checked = true;
this.cboxHandBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.cboxHandBox.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.cboxHandBox.Location = new System.Drawing.Point(1394, 32);
this.cboxHandBox.Margin = new System.Windows.Forms.Padding(4);
this.cboxHandBox.Name = "cboxHandBox";
this.cboxHandBox.Size = new System.Drawing.Size(293, 62);
this.cboxHandBox.TabIndex = 15;
this.cboxHandBox.Tag = "true";
this.cboxHandBox.Text = "打印箱码";
this.cboxHandBox.UseVisualStyleBackColor = true;
//
// comboBox2
//
this.comboBox2.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Location = new System.Drawing.Point(444, 16);
this.comboBox2.Margin = new System.Windows.Forms.Padding(6);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(408, 66);
this.comboBox2.TabIndex = 12;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label7.Location = new System.Drawing.Point(180, 32);
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(202, 58);
this.label7.TabIndex = 11;
this.label7.Text = "机台:";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label16.Location = new System.Drawing.Point(980, 420);
this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(265, 58);
this.label16.TabIndex = 10;
this.label16.Text = "(yyMMdd)";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label5.Location = new System.Drawing.Point(172, 518);
this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(202, 58);
this.label5.TabIndex = 8;
this.label5.Text = "数量:";
//
// textBox4
//
this.textBox4.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.textBox4.Location = new System.Drawing.Point(444, 518);
this.textBox4.Margin = new System.Windows.Forms.Padding(6);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(474, 74);
this.textBox4.TabIndex = 9;
this.textBox4.Text = "10";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label4.Location = new System.Drawing.Point(160, 438);
this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(261, 58);
this.label4.TabIndex = 6;
this.label4.Text = "批次号:";
//
// textBox3
//
this.textBox3.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.textBox3.Location = new System.Drawing.Point(444, 414);
this.textBox3.Margin = new System.Windows.Forms.Padding(6);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(474, 74);
this.textBox3.TabIndex = 7;
//
// label19
//
this.label19.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label19.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label19.Location = new System.Drawing.Point(2372, 1082);
this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(144, 632);
this.label19.TabIndex = 17;
this.label19.Text = "打印条码";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label19.Click += new System.EventHandler(this.label19_Click);
//
// label11
//
this.label11.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label11.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(4, 1082);
this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(362, 632);
this.label11.TabIndex = 18;
this.label11.Text = "打印信息:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label10
//
this.label10.BackColor = System.Drawing.Color.DeepSkyBlue;
this.label10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
this.label10.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(6, 0);
this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(350, 596);
this.label10.TabIndex = 19;
this.label10.Text = "打印记录:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panel3
//
this.panel3.BackColor = System.Drawing.SystemColors.Control;
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.btnBoxRePrint);
this.panel3.Controls.Add(this.btnPackage);
this.panel3.Controls.Add(this.button1);
this.panel3.Controls.Add(this.label6);
this.panel3.Controls.Add(this.textBox5);
this.panel3.Location = new System.Drawing.Point(4, 4);
this.panel3.Margin = new System.Windows.Forms.Padding(6);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(2498, 120);
this.panel3.TabIndex = 22;
//
// btnBoxRePrint
//
this.btnBoxRePrint.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.btnBoxRePrint.Location = new System.Drawing.Point(332, 6);
this.btnBoxRePrint.Margin = new System.Windows.Forms.Padding(6);
this.btnBoxRePrint.Name = "btnBoxRePrint";
this.btnBoxRePrint.Size = new System.Drawing.Size(310, 100);
this.btnBoxRePrint.TabIndex = 8;
this.btnBoxRePrint.Text = "箱码补打";
this.btnBoxRePrint.UseVisualStyleBackColor = true;
this.btnBoxRePrint.Click += new System.EventHandler(this.btnBoxRePrint_Click);
//
// btnPackage
//
this.btnPackage.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.btnPackage.Location = new System.Drawing.Point(10, 6);
this.btnPackage.Margin = new System.Windows.Forms.Padding(6);
this.btnPackage.Name = "btnPackage";
this.btnPackage.Size = new System.Drawing.Size(310, 100);
this.btnPackage.TabIndex = 7;
this.btnPackage.Text = "不良替换";
this.btnPackage.UseVisualStyleBackColor = true;
this.btnPackage.Click += new System.EventHandler(this.btnPackage_Click);
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.button1.Location = new System.Drawing.Point(2148, 20);
this.button1.Margin = new System.Windows.Forms.Padding(6);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(190, 86);
this.button1.TabIndex = 6;
this.button1.Text = "查询";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.label6.Location = new System.Drawing.Point(954, 24);
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(261, 58);
this.label6.TabIndex = 4;
this.label6.Text = "条码号:";
//
// textBox5
//
this.textBox5.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold);
this.textBox5.Location = new System.Drawing.Point(1252, 18);
this.textBox5.Margin = new System.Windows.Forms.Padding(6);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(826, 74);
this.textBox5.TabIndex = 5;
//
// glacialList1
//
this.glacialList1.AllowColumnResize = true;
this.glacialList1.AllowMultiselect = false;
this.glacialList1.AlternateBackground = System.Drawing.Color.DarkGreen;
this.glacialList1.AlternatingColors = false;
this.glacialList1.AutoHeight = true;
this.glacialList1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.glacialList1.BackgroundStretchToFit = true;
glColumn1.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None;
glColumn1.CheckBoxes = false;
glColumn1.ImageIndex = -1;
glColumn1.Name = "Column1";
glColumn1.NumericSort = false;
glColumn1.Text = "条码";
glColumn1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
glColumn1.Width = 300;
glColumn2.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None;
glColumn2.CheckBoxes = false;
glColumn2.ImageIndex = -1;
glColumn2.Name = "Column2";
glColumn2.NumericSort = false;
glColumn2.Text = "产品名称";
glColumn2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
glColumn2.Width = 450;
glColumn3.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None;
glColumn3.CheckBoxes = false;
glColumn3.ImageIndex = -1;
glColumn3.Name = "Column3";
glColumn3.NumericSort = false;
glColumn3.Text = "打印方式";
glColumn3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
glColumn3.Width = 80;
glColumn4.ActivatedEmbeddedType = GlacialComponents.Controls.GLActivatedEmbeddedTypes.None;
glColumn4.CheckBoxes = false;
glColumn4.ImageIndex = -1;
glColumn4.Name = "Column4";
glColumn4.NumericSort = false;
glColumn4.Text = "打印时间";
glColumn4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
glColumn4.Width = 220;
this.glacialList1.Columns.AddRange(new GlacialComponents.Controls.GLColumn[] {
glColumn1,
glColumn2,
glColumn3,
glColumn4});
this.glacialList1.ControlStyle = GlacialComponents.Controls.GLControlStyles.Normal;
this.glacialList1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.glacialList1.FullRowSelect = true;
this.glacialList1.GridColor = System.Drawing.Color.DeepSkyBlue;
this.glacialList1.GridLines = GlacialComponents.Controls.GLGridLines.gridBoth;
this.glacialList1.GridLineStyle = GlacialComponents.Controls.GLGridLineStyles.gridSolid;
this.glacialList1.GridTypes = GlacialComponents.Controls.GLGridTypes.gridNormal;
this.glacialList1.HeaderHeight = 40;
this.glacialList1.HeaderVisible = true;
this.glacialList1.HeaderWordWrap = false;
this.glacialList1.HotColumnTracking = false;
this.glacialList1.HotItemTracking = false;
this.glacialList1.HotTrackingColor = System.Drawing.Color.LightGray;
this.glacialList1.HoverEvents = false;
this.glacialList1.HoverTime = 1;
this.glacialList1.ImageList = null;
this.glacialList1.ItemHeight = 39;
this.glacialList1.ItemWordWrap = false;
this.glacialList1.Location = new System.Drawing.Point(370, 130);
this.glacialList1.Margin = new System.Windows.Forms.Padding(6);
this.glacialList1.Name = "glacialList1";
this.glacialList1.Selectable = true;
this.glacialList1.SelectedTextColor = System.Drawing.Color.White;
this.glacialList1.SelectionColor = System.Drawing.Color.Lime;
this.glacialList1.ShowBorder = true;
this.glacialList1.ShowFocusRect = false;
this.glacialList1.Size = new System.Drawing.Size(2148, 946);
this.glacialList1.SortType = GlacialComponents.Controls.SortTypes.InsertionSort;
this.glacialList1.SuperFlatHeaderColor = System.Drawing.Color.White;
this.glacialList1.TabIndex = 23;
this.glacialList1.Text = "glacialList1";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label10, 0, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 134);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 63.3705F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 36.6295F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(362, 942);
this.tableLayoutPanel1.TabIndex = 24;
//
// groupBox2
//
this.groupBox2.BackColor = System.Drawing.Color.Aquamarine;
this.groupBox2.Controls.Add(this.tableLayoutPanel4);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold);
this.groupBox2.Location = new System.Drawing.Point(4, 600);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(4);
this.groupBox2.Size = new System.Drawing.Size(354, 338);
this.groupBox2.TabIndex = 20;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "装箱信息";
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 2;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
this.tableLayoutPanel4.Controls.Add(this.comBoxSizeL, 1, 1);
this.tableLayoutPanel4.Controls.Add(this.label38, 0, 1);
this.tableLayoutPanel4.Controls.Add(this.lbPackageCodeL, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 36);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 49.99751F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0025F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(346, 298);
this.tableLayoutPanel4.TabIndex = 3;
//
// comBoxSizeL
//
this.comBoxSizeL.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.comBoxSizeL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comBoxSizeL.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comBoxSizeL.FormattingEnabled = true;
this.comBoxSizeL.Items.AddRange(new object[] {
"A班",
"B班"});
this.comBoxSizeL.Location = new System.Drawing.Point(144, 187);
this.comBoxSizeL.Margin = new System.Windows.Forms.Padding(6);
this.comBoxSizeL.Name = "comBoxSizeL";
this.comBoxSizeL.Size = new System.Drawing.Size(182, 72);
this.comBoxSizeL.TabIndex = 3;
//
// label38
//
this.label38.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label38.BackColor = System.Drawing.Color.Transparent;
this.label38.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label38.Location = new System.Drawing.Point(6, 196);
this.label38.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(116, 54);
this.label38.TabIndex = 1;
this.label38.Text = "规格:";
this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lbPackageCodeL
//
this.lbPackageCodeL.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lbPackageCodeL.AutoSize = true;
this.tableLayoutPanel4.SetColumnSpan(this.lbPackageCodeL, 2);
this.lbPackageCodeL.Font = new System.Drawing.Font("宋体", 13.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbPackageCodeL.Location = new System.Drawing.Point(4, 55);
this.lbPackageCodeL.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbPackageCodeL.Name = "lbPackageCodeL";
this.lbPackageCodeL.Size = new System.Drawing.Size(0, 37);
this.lbPackageCodeL.TabIndex = 5;
//
// pnBoxReprint
//
this.pnBoxReprint.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnBoxReprint.Controls.Add(this.btnPrintCancel);
this.pnBoxReprint.Controls.Add(this.btnRePrint);
this.pnBoxReprint.Controls.Add(this.txtRePrintBoxCode);
this.pnBoxReprint.Controls.Add(this.label24);
this.pnBoxReprint.Location = new System.Drawing.Point(560, 426);
this.pnBoxReprint.Margin = new System.Windows.Forms.Padding(5);
this.pnBoxReprint.Name = "pnBoxReprint";
this.pnBoxReprint.Size = new System.Drawing.Size(1397, 150);
this.pnBoxReprint.TabIndex = 25;
this.pnBoxReprint.Visible = false;
//
// btnPrintCancel
//
this.btnPrintCancel.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPrintCancel.Location = new System.Drawing.Point(1197, 44);
this.btnPrintCancel.Margin = new System.Windows.Forms.Padding(5);
this.btnPrintCancel.Name = "btnPrintCancel";
this.btnPrintCancel.Size = new System.Drawing.Size(160, 60);
this.btnPrintCancel.TabIndex = 3;
this.btnPrintCancel.Text = "取消";
this.btnPrintCancel.UseVisualStyleBackColor = true;
this.btnPrintCancel.Click += new System.EventHandler(this.btnPrintCancel_Click);
//
// btnRePrint
//
this.btnRePrint.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRePrint.Location = new System.Drawing.Point(1027, 40);
this.btnRePrint.Margin = new System.Windows.Forms.Padding(5);
this.btnRePrint.Name = "btnRePrint";
this.btnRePrint.Size = new System.Drawing.Size(160, 60);
this.btnRePrint.TabIndex = 2;
this.btnRePrint.Text = "确定";
this.btnRePrint.UseVisualStyleBackColor = true;
this.btnRePrint.Click += new System.EventHandler(this.btnRePrint_Click);
//
// txtRePrintBoxCode
//
this.txtRePrintBoxCode.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtRePrintBoxCode.Location = new System.Drawing.Point(208, 44);
this.txtRePrintBoxCode.Margin = new System.Windows.Forms.Padding(5);
this.txtRePrintBoxCode.Name = "txtRePrintBoxCode";
this.txtRePrintBoxCode.Size = new System.Drawing.Size(737, 55);
this.txtRePrintBoxCode.TabIndex = 1;
//
// label24
//
this.label24.AutoSize = true;
this.label24.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label24.Location = new System.Drawing.Point(27, 52);
this.label24.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(190, 42);
this.label24.TabIndex = 0;
this.label24.Text = "箱单号:";
this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// FrmBarCodeSearch2408
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2528, 1638);
this.Controls.Add(this.pnBoxReprint);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.glacialList1);
this.Controls.Add(this.panel3);
this.Controls.Add(this.label11);
this.Controls.Add(this.label19);
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(6);
this.Name = "FrmBarCodeSearch2408";
this.Text = "条码信息";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmBarCodeSearch_FormClosing);
this.Load += new System.EventHandler(this.FrmBarCodeSearch_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel4.PerformLayout();
this.pnBoxReprint.ResumeLayout(false);
this.pnBoxReprint.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox5;
private GlacialComponents.Controls.GlacialList glacialList1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button btnPackage;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
public System.Windows.Forms.ComboBox comBoxSizeL;
private System.Windows.Forms.Label label38;
private System.Windows.Forms.Label lbPackageCodeL;
private System.Windows.Forms.CheckBox cboxHandBox;
private System.Windows.Forms.Button btnBoxRePrint;
private System.Windows.Forms.Panel pnBoxReprint;
private System.Windows.Forms.Button btnPrintCancel;
private System.Windows.Forms.Button btnRePrint;
private System.Windows.Forms.TextBox txtRePrintBoxCode;
private System.Windows.Forms.Label label24;
}
}

1272
InjectionSearch/FrmBarCodeSearch2408.cs

File diff suppressed because it is too large

120
InjectionSearch/FrmBarCodeSearch2408.resx

@ -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>

299
InjectionSearch/FrmPackageDetail.Designer.cs

@ -0,0 +1,299 @@

namespace InjectionSearch
{
partial class FrmPackageDetail
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.txtPackageCode = new System.Windows.Forms.TextBox();
this.btnSearch = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewButtonColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2331, 1192);
this.tableLayoutPanel1.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.dateTimePicker2);
this.panel1.Controls.Add(this.dateTimePicker1);
this.panel1.Controls.Add(this.tableLayoutPanel2);
this.panel1.Controls.Add(this.txtPackageCode);
this.panel1.Controls.Add(this.btnSearch);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(2325, 54);
this.panel1.TabIndex = 0;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.toolStrip1, 0, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, -3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(751, 56);
this.tableLayoutPanel2.TabIndex = 2;
//
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(32, 32);
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(751, 56);
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
// txtPackageCode
//
this.txtPackageCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPackageCode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPackageCode.Location = new System.Drawing.Point(1771, 5);
this.txtPackageCode.Name = "txtPackageCode";
this.txtPackageCode.Size = new System.Drawing.Size(373, 44);
this.txtPackageCode.TabIndex = 1;
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(2173, 0);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(153, 51);
this.btnSearch.TabIndex = 0;
this.btnSearch.Text = "查 询";
this.btnSearch.UseVisualStyleBackColor = true;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.,
this.,
this.,
this.,
this.,
this.});
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(3, 63);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 82;
this.dataGridView1.RowTemplate.Height = 37;
this.dataGridView1.Size = new System.Drawing.Size(2325, 1066);
this.dataGridView1.TabIndex = 1;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
//
// dateTimePicker1
//
this.dateTimePicker1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm";
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker1.Location = new System.Drawing.Point(1082, 10);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(264, 35);
this.dateTimePicker1.TabIndex = 3;
//
// dateTimePicker2
//
this.dateTimePicker2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.dateTimePicker2.CustomFormat = "yyyy-MM-dd HH:mm";
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker2.Location = new System.Drawing.Point(1385, 10);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(264, 35);
this.dateTimePicker2.TabIndex = 4;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(1353, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(22, 24);
this.label1.TabIndex = 5;
this.label1.Text = "-";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(1013, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(58, 24);
this.label2.TabIndex = 6;
this.label2.Text = "时间";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(1702, 14);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(58, 24);
this.label3.TabIndex = 7;
this.label3.Text = "箱码";
//
// 箱单号
//
this..DataPropertyName = "BoxNo";
this..HeaderText = "箱单号";
this..MinimumWidth = 10;
this..Name = "箱单号";
this..Width = 300;
//
// 条码
//
this..DataPropertyName = "BarCode";
this..HeaderText = "条码";
this..MinimumWidth = 10;
this..Name = "条码";
this..Width = 200;
//
// 注塑码
//
this..DataPropertyName = "OneBarCode";
this..HeaderText = "注塑码";
this..MinimumWidth = 10;
this..Name = "注塑码";
this..Width = 200;
//
// 零件号
//
this..DataPropertyName = "PartNo";
this..HeaderText = "零件号";
this..MinimumWidth = 10;
this..Name = "零件号";
this..Width = 150;
//
// 不良替换
//
this..DataPropertyName = "Replace";
this..HeaderText = "不良替换";
this..MinimumWidth = 10;
this..Name = "不良替换";
this..Text = "不良替换";
this..Width = 200;
//
// 时间
//
this..DataPropertyName = "CreateTime";
this..HeaderText = "时间";
this..MinimumWidth = 10;
this..Name = "时间";
this..Width = 200;
//
// FrmPackageDetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2331, 1192);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "FrmPackageDetail";
this.Text = "箱单详细信息";
this.tableLayoutPanel1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtPackageCode;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewButtonColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
}
}

77
InjectionSearch/FrmPackageDetail.cs

@ -0,0 +1,77 @@
using MESClassLibrary.BLL.BasicInfo;
using MESClassLibrary.BLL.Inspection;
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 InjectionSearch
{
public partial class FrmPackageDetail : Form
{
private BarCodeBLL _barCodeBLL = new BarCodeBLL();
private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL();
private string _packageCode = string.Empty;
public FrmPackageDetail(string pPackageCode)
{
InitializeComponent();
this._packageCode = pPackageCode;
txtPackageCode.Text = pPackageCode;
dataGridView1.AutoGenerateColumns = false;
if(!string.IsNullOrEmpty(pPackageCode))
btnSearch_Click(null, null);
}
private void btnSearch_Click(object sender, EventArgs e)
{
string boxCode = txtPackageCode.Text?.Trim();
string date1 = this.dateTimePicker1.Value.ToString("yyyy-MM-dd 00:00:00");
if (string.IsNullOrWhiteSpace(this.dateTimePicker1.Text))
{
date1 = "1900-01-01 00:00:00";
}
string date2 = this.dateTimePicker2.Value.ToString("yyyy-MM-dd 23:59:59");
if (string.IsNullOrWhiteSpace(this.dateTimePicker2.Text))
{
date2 = "9999-01-01 00:00:00";
}
string whereStr = $" CreateTime > '{date1}' and CreateTime<'{date2}' ";
if (!string.IsNullOrEmpty(txtPackageCode.Text.Trim()))
{
whereStr = whereStr + $" and BoxNo='{txtPackageCode.Text.Trim()}'";
}
DataTable dt = _barCodeBLL.SearchBarCodeByWhere(whereStr, "v_Code", "200");
if (!dt.Columns.Contains("Replace"))
{
dt.Columns.Add("Replace");
}
foreach(DataRow dr in dt.Rows)
{
dr["Replace"] = "不良替换";
}
dataGridView1.DataSource = dt;
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0 && e.RowIndex != -1 && !dataGridView1.Rows[e.RowIndex].IsNewRow)
{
if (e.ColumnIndex == 4)
{
DataRow dataRow = (this.dataGridView1[e.ColumnIndex, e.RowIndex].OwningRow.DataBoundItem as DataRowView).Row;
FrmBarCodeReplace frm = new FrmBarCodeReplace(dataRow);
frm.ShowDialog();
}
}
}
}
}

141
InjectionSearch/FrmPackageDetail.resx

@ -0,0 +1,141 @@
<?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="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="箱单号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="注塑码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="零件号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="不良替换.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

27
InjectionSearch/InjectionSearch.csproj

@ -71,21 +71,48 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FrmBarCodeReplace.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmBarCodeReplace.Designer.cs">
<DependentUpon>FrmBarCodeReplace.cs</DependentUpon>
</Compile>
<Compile Include="FrmBarCodeSearch2408.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmBarCodeSearch2408.Designer.cs">
<DependentUpon>FrmBarCodeSearch2408.cs</DependentUpon>
</Compile>
<Compile Include="FrmBarCodeSearch.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmBarCodeSearch.Designer.cs">
<DependentUpon>FrmBarCodeSearch.cs</DependentUpon>
</Compile>
<Compile Include="FrmPackageDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmPackageDetail.Designer.cs">
<DependentUpon>FrmPackageDetail.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReportHelper.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBarCodeReplace.resx">
<DependentUpon>FrmBarCodeReplace.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBarCodeSearch2408.resx">
<DependentUpon>FrmBarCodeSearch2408.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBarCodeSearch.resx">
<DependentUpon>FrmBarCodeSearch.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmPackageDetail.resx">
<DependentUpon>FrmPackageDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

70
InjectionSearch/Program.cs

@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -31,6 +33,18 @@ namespace InjectionSearch
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
//处理UI线程异常
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
//处理非UI线程异常
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Run(new FrmLogin());
mutex.ReleaseMutex();
}
@ -39,5 +53,61 @@ namespace InjectionSearch
MessageBox.Show("程序已启动!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
#region 系统异常处理
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
string str = GetExceptionMsg(e.Exception, e.ToString());
MessageBox.Show(str);
//LogManager.WriteLog(str);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
MessageBox.Show(str);
//LogManager.WriteLog(str);
}
static string GetExceptionMsg(Exception ex, string backStr)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("****************************异常文本****************************");
sb.AppendLine("【出现时间】:" + DateTime.Now.ToString());
if (ex != null)
{
sb.AppendLine("【异常类型】:" + ex.GetType().Name);
sb.AppendLine("【异常信息】:" + ex.Message);
sb.AppendLine("【堆栈调用】:" + ex.StackTrace);
}
else
{
sb.AppendLine("【未处理异常】:" + backStr);
}
sb.AppendLine("***************************************************************");
return sb.ToString();
}
private static void ExceptionMonitor_ExceptionOver()
{
MessageBox.Show("系统遇到未知异常,即将重新启动。");
Process.Start(Application.ExecutablePath);
Process.GetCurrentProcess().Kill();
}
#endregion
}
}

BIN
InjectionSearch/bin/Debug/装箱单.grf

Binary file not shown.

BIN
InjectionSearch/装箱单.grf

Binary file not shown.

60
MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs

@ -6,15 +6,18 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using MESClassLibrary.BLL.Log;
using MESClassLibrary.DAL;
using MESClassLibrary.DAL.BasicInfo;
using MESClassLibrary.DAL.Injection;
using MESClassLibrary.Model;
namespace MESClassLibrary.BLL.BasicInfo
{
public class BarCodeBLL
{
BarCodeDAl db = new BarCodeDAl();
private BarCodeDAl db = new BarCodeDAl();
private WmsDAL wmsDal = new WmsDAL();
private BadInjectionDAL badDb = new BadInjectionDAL();
public DataTable SearchInfoByStock(string StockNo)
{
try
@ -293,6 +296,47 @@ namespace MESClassLibrary.BLL.BasicInfo
return null;
}
}
/// <summary>
/// 箱码中单个条码替换
/// </summary>
/// <param name="tableName"></param>
/// <param name="boxCode"></param>
/// <param name="oldID"></param>
/// <param name="newID"></param>
/// <param name="model"></param>
/// <returns></returns>
public bool BarCodeReplace(string oldtableName, string newtableName, string boxCode,string oldID,string newID,string newOneBarCode,string newBarCode, BadInjectionModel model)
{
LocalDBService localDB = new LocalDBService(SqlHelper.GetConnSting());
try
{
localDB.BeginTrans();
db.UpdateBoxNoByID(localDB, newtableName, boxCode, newID);
db.UpdateBoxNoNull(localDB, oldtableName, oldID);
badDb.AddInfo(localDB, model);
wmsDal.DeleteRecord(localDB, boxCode, model.OneBarCode, model.BarCode);
wmsDal.AddRecord(localDB, boxCode, newOneBarCode, newBarCode);
localDB.Commit();
return true;
}
catch (Exception ex)
{
if(localDB != null)
{
localDB.Rollback();
}
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
finally
{
if (localDB != null)
{
localDB.EndTrans();
}
}
}
public bool UpdateBoxNo(string tableName, string boxNo, string partNo)
{
@ -345,6 +389,18 @@ namespace MESClassLibrary.BLL.BasicInfo
return null;
}
}
public DataTable SearchBarCodeByWhere(string whereStr, string tableName, string row)
{
try
{
return db.SearchBarCodeByWhere(whereStr, tableName, row);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool updateProductNature(string tableName, string barcode)
{

18
MESClassLibrary/BLL/BasicInfo/BasicBLL1.cs

@ -0,0 +1,18 @@
using MESClassLibrary.DAL.BasicInfo;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace MESClassLibrary.BLL.BasicInfo
{
public class BasicBLL1
{
private BasicDAL1 _basicDAL1 = new BasicDAL1();
public DataTable GetPackageSize()
{
return _basicDAL1.GetPackageSize();
}
}
}

4
MESClassLibrary/BLL/Injection/UniqueBll.cs

@ -14,6 +14,10 @@ namespace MESClassLibrary.BLL.Injection
{
return da.GetSjBarCodeSerialNo(stockNo,batch);
}
public string GetPackageCodeSerialNo(string partNo, string batch, string packageSize)
{
return da.GetPackageSerialNo(partNo, batch, packageSize);
}
/// <summary>
/// 直供件 条码
/// </summary>

37
MESClassLibrary/BLL/Inspection/InjectionBoxBLL.cs

@ -26,7 +26,30 @@ namespace MESClassLibrary.BLL.Inspection
return false;
}
}
public bool UpdateBoxCount(string packageCode, int addCount)
{
try
{
return db.UpdateInfo(packageCode, addCount);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool UpdatePrinted(string packageCode)
{
try
{
return db.UpdatePrinted(packageCode);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SeachInfoByBox(string partNo,string batchNo)
{
try
@ -52,5 +75,17 @@ namespace MESClassLibrary.BLL.Inspection
return null;
}
}
public DataTable SearchUnBox(string stationID, string mould)
{
try
{
return db.SearchUnBox(stationID, mould);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
}
}

14
MESClassLibrary/BLL/PlasticBLL.cs

@ -248,7 +248,19 @@ namespace MESClassLibrary.BLL
return null;
}
}
public DataTable SearchAllInfo(string stationID)
{
PlasticDAL da = new PlasticDAL();
try
{
return da.SearchAllInfo(stationID);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchPartByStation(string stationNo)
{
PlasticDAL da = new PlasticDAL();

67
MESClassLibrary/BLL/Wms/WmsBLL.cs

@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using MESClassLibrary.BLL.Log;
using MESClassLibrary.DAL;
using MESClassLibrary.DAL.BasicInfo;
using MESClassLibrary.DAL.Injection;
using MESClassLibrary.Enum;
using MESClassLibrary.Model;
namespace MESClassLibrary.BLL.Injection
{
public class WmsBLL
{
private WmsDAL da=new WmsDAL();
private BarCodeDAl barCodeDal = new BarCodeDAl();
public string SaveInterface(string boxNo,string lastBoxNo1,string lastBoxNo2, WmsInterfaceEnum interfaceType)
{
//上一个是否传递成功,没成功重新传 左侧
if (!string.IsNullOrEmpty(lastBoxNo1))
{
bool exsit = da.IsSendPackageCode(lastBoxNo1);
if(exsit == false)
{
SendToInterface(lastBoxNo1);
}
}
//上一个是否传递成功,没成功重新传 右侧侧
if (!string.IsNullOrEmpty(lastBoxNo2))
{
bool exsit = da.IsSendPackageCode(lastBoxNo2);
if (exsit == false)
{
SendToInterface(lastBoxNo2);
}
}
string rst = SendToInterface(boxNo);
if (!string.IsNullOrEmpty(rst))
{
LogErrBLL.AddInfo(rst, MethodBase.GetCurrentMethod());
}
return rst;
}
private string SendToInterface(string boxNo)
{
DataTable barCodeTable = barCodeDal.SearchInfoByBox(boxNo);
string rst = da.SaveInterface(barCodeTable);
return rst;
}
public bool IsSendPackageCode(string pacakgCode)
{
return da.IsSendPackageCode(pacakgCode);
}
}
}

19
MESClassLibrary/DAL/BasicInfo/BadInjectionDAL.cs

@ -64,7 +64,26 @@ namespace MESClassLibrary.DAL.BasicInfo
return false;
}
}
public bool AddInfo(LocalDBService localDB, BadInjectionModel md)
{
try
{
#region 添加数据
string sql = "";
sql = $"INSERT INTO tb_Bad_Injection (ID,OneBarCode,[BarCode],[BadPosition],[BadReason],StationID)" +
$" VALUES ('{ md.ID}','{md.OneBarCode}','{md.BarCode}','{md.BadPosition}','{ md.BadReason}','{ md.StationID}')";
localDB.Exec_NonQuery(sql);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SearchByCode(string code)
{
try

168
MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs

@ -273,7 +273,7 @@ namespace MESClassLibrary.DAL.BasicInfo
#region 添加数据
string sql = "";
SqlParameter[] param = null;
sql = "INSERT INTO " + tableName + " (ID,StationID,OneBarCode,[BarCode],[StockNo],[PartNo],[PrintType],[CreateTime],[IsImport],StationID2,PlanID,ProductNature,Des1,Des2,Des3,Des4,Des5,Weight";
sql = "INSERT INTO " + tableName + " (ID,StationID,OneBarCode,[BarCode],[StockNo],[PartNo],[PrintType],[CreateTime],[IsImport],StationID2,PlanID,ProductNature,Des1,Des2,Des3,Des4,Des5,BoxNo,Weight";
sql += ") VALUES (";
sql += "@ID,";
sql += "@StationID,";
@ -293,10 +293,11 @@ namespace MESClassLibrary.DAL.BasicInfo
sql += "@Des3,";
sql += "@Des4,";
sql += "@Des5,";
sql += "@BoxNo,";
sql += "@Weight)";
#region 添加参数
param = new SqlParameter[17];
param = new SqlParameter[18];
param[0] = new SqlParameter("@ID", SqlDbType.VarChar);
param[0].Value = md.ID;
@ -345,8 +346,11 @@ namespace MESClassLibrary.DAL.BasicInfo
param[15] = new SqlParameter("@Des5", SqlDbType.VarChar);
param[15].Value = md.Des5;
param[16] = new SqlParameter("@Weight", SqlDbType.Decimal);
param[16].Value = md.Weight;
param[16] = new SqlParameter("@BoxNo", SqlDbType.VarChar);
param[16].Value = md.BoxNo;
param[17] = new SqlParameter("@Weight", SqlDbType.Decimal);
param[17].Value = md.Weight;
#endregion
@ -370,61 +374,61 @@ namespace MESClassLibrary.DAL.BasicInfo
if (stationNo.Substring(2, 2) == "01" || stationNo.Substring(2, 2) == "02" ||
stationNo.Substring(2, 2) == "03" || stationNo.Substring(2, 2) == "04")
{
sql = @"SELECT top 100 dbo.tb_BarCode1.BarCode, dbo.tb_Product.ProductName,
sql = @"SELECT top 100 dbo.tb_BarCode1.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode1.BoxNo,
CASE dbo.tb_BarCode1.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode1.CreateTime
FROM dbo.tb_BarCode1 with (nolock) LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode1.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode1.StationID = dbo.tb_Station.StationID
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + " order by [CreateTime] desc";
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc";
}
if (stationNo.Substring(2, 2) == "05" || stationNo.Substring(2, 2) == "06" ||
stationNo.Substring(2, 2) == "07" || stationNo.Substring(2, 2) == "08")
{
sql = @"SELECT top 100 dbo.tb_BarCode2.BarCode, dbo.tb_Product.ProductName,
sql = @"SELECT top 100 dbo.tb_BarCode2.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode2.BoxNo,
CASE dbo.tb_BarCode2.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode2.CreateTime
FROM dbo.tb_BarCode2 with (nolock) LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode2.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode2.StationID = dbo.tb_Station.StationID
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + " order by [CreateTime] desc";
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc";
}
if (stationNo.Substring(2, 2) == "09" || stationNo.Substring(2, 2) == "10" ||
stationNo.Substring(2, 2) == "11" || stationNo.Substring(2, 2) == "12")
{
sql = @"SELECT top 100 dbo.tb_BarCode3.BarCode, dbo.tb_Product.ProductName,
sql = @"SELECT top 100 dbo.tb_BarCode3.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode3.BoxNo,
CASE dbo.tb_BarCode3.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode3.CreateTime
FROM dbo.tb_BarCode3 with (nolock) LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode3.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode3.StationID = dbo.tb_Station.StationID
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + " order by [CreateTime] desc";
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc";
}
if (stationNo.Substring(2, 2) == "13" || stationNo.Substring(2, 2) == "14" ||
stationNo.Substring(2, 2) == "15" || stationNo.Substring(2, 2) == "16")
{
sql = @"SELECT top 100 dbo.tb_BarCode4.BarCode, dbo.tb_Product.ProductName,
sql = @"SELECT top 100 dbo.tb_BarCode4.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode4.BoxNo,
CASE dbo.tb_BarCode4.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode4.CreateTime
FROM dbo.tb_BarCode4 with (nolock) LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode4.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode4.StationID = dbo.tb_Station.StationID
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + " order by [CreateTime] desc";
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc";
}
if (stationNo.Substring(2, 2) == "17" || stationNo.Substring(2, 2) == "18" ||
stationNo.Substring(2, 2) == "19" || stationNo.Substring(2, 2) == "20")
{
sql = @"SELECT top 100 dbo.tb_BarCode5.BarCode, dbo.tb_Product.ProductName,
sql = @"SELECT top 100 dbo.tb_BarCode5.BarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode5.BoxNo,
CASE dbo.tb_BarCode5.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode5.CreateTime
FROM dbo.tb_BarCode5 with (nolock) LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode5.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode5.StationID = dbo.tb_Station.StationID
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + " order by [CreateTime] desc";
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc";
}
SqlParameter[] param = new SqlParameter[1];
@ -445,12 +449,12 @@ namespace MESClassLibrary.DAL.BasicInfo
{
try
{
string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName,
CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.tb_BarCode.PrintTime
FROM dbo.tb_BarCode LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID
string sql = @"SELECT dbo.v_Code.BarCode, dbo.tb_Product.ProductName,
CASE dbo.v_Code.PrintType WHEN 0 THEN '' when 1 then '' when 2 then '' END AS PrintType,
dbo.v_Code.PrintTime
FROM dbo.v_Code LEFT OUTER JOIN
dbo.tb_Product ON dbo.v_Code.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.v_Code.StationID = dbo.tb_Station.StationID
where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " +
//" and substring([BarCode],len( [BarCode])-10,6)= right(DATENAME(yy, GETDATE()),2)+ RIGHT('00'+CAST(MONTH(GETDATE()) AS VARCHAR(2)),2)+RIGHT('00'+CAST(Day(GETDATE()) AS VARCHAR(2)),2)" +
" order by [CreateTime] desc";
@ -469,7 +473,7 @@ namespace MESClassLibrary.DAL.BasicInfo
{
try
{
string sql = @"SELECT top 200 dbo.v_Code.BarCode, dbo.tb_Product.ProductName,
string sql = @"SELECT top 200 dbo.v_Code.BarCode,dbo.v_Code.TableName,dbo.v_Code.BoxNo, dbo.tb_Product.ProductName,
CASE dbo.v_Code.PrintType WHEN 0 THEN '' WHEN 1 THEN '' WHEN 2 THEN '' END AS PrintType,
dbo.v_Code.CreateTime, dbo.v_Code.OneBarCode, dbo.v_Code.PlanID,
dbo.tb_InjectPlanReport.MaterialName, dbo.tb_InjectPlanReport.BatchNo
@ -494,16 +498,16 @@ namespace MESClassLibrary.DAL.BasicInfo
{
try
{
string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName,
CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '' WHEN 1 THEN '' WHEN 2 THEN '' END AS PrintType,
dbo.tb_BarCode.PrintTime, dbo.tb_BarCode.OneBarCode,dbo.tb_BarCode.PlanID,
string sql = @"SELECT dbo.v_Code.BarCode, dbo.tb_Product.ProductName,dbo.v_Code.IsBad, dbo.v_Code.BoxNo,dbo.v_Code.PartNo, dbo.v_Code.StationID, dbo.v_Code.ID,
CASE dbo.v_Code.PrintType WHEN 0 THEN '' WHEN 1 THEN '' WHEN 2 THEN '' END AS PrintType,
dbo.v_Code.PrintTime, dbo.v_Code.OneBarCode,dbo.v_Code.PlanID, dbo.v_Code.TableName,
dbo.tb_InjectPlanReport.MaterialName, dbo.tb_InjectPlanReport.BatchNo
FROM dbo.tb_BarCode LEFT OUTER JOIN
dbo.tb_InjectPlanReport ON dbo.tb_BarCode.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID
WHERE dbo.tb_BarCode.IsDel = 0 and dbo.tb_BarCode.OneBarCode=@OneBarCode
ORDER BY dbo.tb_BarCode.CreateTime DESC";
FROM dbo.v_Code LEFT OUTER JOIN
dbo.tb_InjectPlanReport ON dbo.v_Code.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN
dbo.tb_Product ON dbo.v_Code.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.v_Code.StationID = dbo.tb_Station.StationID
WHERE dbo.v_Code.IsDel = 0 and dbo.v_Code.OneBarCode=@OneBarCode
ORDER BY dbo.v_Code.CreateTime DESC";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@OneBarCode", SqlDbType.VarChar);
@ -531,16 +535,16 @@ namespace MESClassLibrary.DAL.BasicInfo
// dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID
// WHERE dbo.tb_BarCode.IsDel = 0 and dbo.tb_BarCode.BarCode=@BarCode
// ORDER BY dbo.tb_BarCode.CreateTime DESC";
string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName,
CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '' WHEN 1 THEN '' WHEN 2 THEN '' END AS PrintType,
dbo.tb_BarCode.PrintTime, dbo.tb_BarCode.OneBarCode,dbo.tb_BarCode.PlanID,
string sql = @"SELECT dbo.v_Code.BarCode, dbo.tb_Product.ProductName,
CASE dbo.v_Code.PrintType WHEN 0 THEN '' WHEN 1 THEN '' WHEN 2 THEN '' END AS PrintType,
dbo.v_Code.PrintTime, dbo.v_Code.OneBarCode,dbo.v_Code.PlanID,
dbo.tb_InjectPlanReport.MaterialName, dbo.tb_InjectPlanReport.BatchNo
FROM dbo.tb_BarCode LEFT OUTER JOIN
dbo.tb_InjectPlanReport ON dbo.tb_BarCode.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN
dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID
WHERE dbo.tb_BarCode.IsDel = 0 and dbo.tb_BarCode.BarCode=@BarCode
ORDER BY dbo.tb_BarCode.CreateTime DESC";
FROM dbo.v_Code LEFT OUTER JOIN
dbo.tb_InjectPlanReport ON dbo.v_Code.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN
dbo.tb_Product ON dbo.v_Code.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN
dbo.tb_Station ON dbo.v_Code.StationID = dbo.tb_Station.StationID
WHERE dbo.v_Code.IsDel = 0 and dbo.v_Code.BarCode=@BarCode
ORDER BY dbo.v_Code.CreateTime DESC";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@BarCode", SqlDbType.VarChar);
@ -891,7 +895,48 @@ namespace MESClassLibrary.DAL.BasicInfo
return false;
}
}
public bool UpdateBoxNoByID(LocalDBService localDB, string tableName, string boxNo, string id)
{
try
{
#region 添加数据
string sql = "";
sql = $@"update {tableName} set BoxNo='{boxNo}' where id='{id}'";
localDB.Exec_NonQuery(sql);
//SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool UpdateBoxNoNull(LocalDBService localDB, string tableName, string id)
{
try
{
#region 添加数据
string sql = "";
sql = $@"update {tableName} set IsBad=1,BoxNo='' where id='{id}'";
#region 添加参数
#endregion
localDB.Exec_NonQuery(sql);
//SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool UpdateIsBad(string tableName, string onebarcode, string barcode)
{
try
@ -905,7 +950,8 @@ namespace MESClassLibrary.DAL.BasicInfo
if (onebarcode != "")
{
sql = @"update " + tableName + " set IsBad=1 where OneBarCode=@OneBarCode and BoxNo is null";
//sql = @"update " + tableName + " set IsBad=1 where OneBarCode=@OneBarCode and BoxNo is null";
sql = @"update " + tableName + " set IsBad=1 where OneBarCode=@OneBarCode";
#region 添加参数
@ -917,7 +963,8 @@ namespace MESClassLibrary.DAL.BasicInfo
if (barcode != "")
{
sql = @"update " + tableName + " set IsBad=1 where BarCode=@BarCode and BoxNo is null";
//sql = @"update " + tableName + " set IsBad=1 where BarCode=@BarCode and BoxNo is null";
sql = @"update " + tableName + " set IsBad=1 where BarCode=@BarCode ";
#region 添加参数
@ -961,7 +1008,25 @@ namespace MESClassLibrary.DAL.BasicInfo
{
try
{
string sql = @"select * from " + tableName + " where BoxNo=@BoxNo and PrintType in (0,1) and IsDel=0 ";
string sql = @"select * from " + tableName + " where BoxNo=@BoxNo and PrintType in (0,1) and IsDel=0 and IsBad=0";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar);
param[0].Value = boxNo;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchInfoByBox(string boxNo)
{
try
{
string sql = @"select * from v_Code where BoxNo=@BoxNo and IsDel=0 and IsBad=0";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar);
@ -987,7 +1052,7 @@ namespace MESClassLibrary.DAL.BasicInfo
{
try
{
string sql = @"select top " + row + " * from " + tableName + " where BoxNo=@BoxNo IsDel=0 order by CreateTime desc";
string sql = @"select top " + row + " * from " + tableName + " where BoxNo=@BoxNo and IsDel=0 and IsBad=0 order by CreateTime desc";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar);
@ -1001,7 +1066,24 @@ namespace MESClassLibrary.DAL.BasicInfo
return null;
}
}
public DataTable SearchBarCodeByWhere(string whereStr, string tableName, string row)
{
try
{
string sql = @"select top " + row + " * from " + tableName + $" where {whereStr} and IsDel=0 and IsBad=0 order by CreateTime desc";
SqlParameter[] param = new SqlParameter[0];
// param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar);
// param[0].Value = whereStr;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
/// <summary>
/// 将产品转为市场件
/// </summary>

28
MESClassLibrary/DAL/BasicInfo/BasicDAL1.cs

@ -0,0 +1,28 @@
using MESClassLibrary.BLL.Log;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
namespace MESClassLibrary.DAL.BasicInfo
{
public class BasicDAL1
{
public DataTable GetPackageSize()
{
try
{
string sql = @"SELECT * from tb_A_PackageSize ";
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
}
}

20
MESClassLibrary/DAL/BasicInfo/PlasticDAL.cs

@ -35,7 +35,27 @@ namespace MESClassLibrary.DAL.BasicInfo
}
}
public DataTable SearchAllInfo(string stationID)
{
try
{
string sql = @"select * from [tb_Plastic] where StationID=@StationID";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@StationID", SqlDbType.VarChar);
param[0].Value = stationID;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchPartByStation(string stationNo)
{
try

108
MESClassLibrary/DAL/Injection/InjectionBoxDAL.cs

@ -21,16 +21,20 @@ namespace MESClassLibrary.DAL.Injection
#region 添加数据
string sql = "";
SqlParameter[] param = null;
sql = "INSERT INTO " + TableName + " (ID,BoxNo,BoxCount,IsFlag,BoxType";
sql = "INSERT INTO " + TableName + " (ID,BoxNo,BoxCount,IsFlag,StationNo, PartName,Mould,StandardQty,BoxType";
sql += ") VALUES (";
sql += "@ID,";
sql += "@BoxNo,";
sql += "@BoxCount,";
sql += "@IsFlag,";
sql += "@StationNo,";
sql += "@PartName,";
sql += "@Mould,";
sql += "@StandardQty,";
sql += "@BoxType)";
#region 添加参数
param = new SqlParameter[5];
param = new SqlParameter[9];
param[0] = new SqlParameter("@ID", SqlDbType.VarChar);
param[0].Value = md.ID;
@ -43,8 +47,20 @@ namespace MESClassLibrary.DAL.Injection
param[3] = new SqlParameter("@IsFlag", SqlDbType.Int);
param[3].Value = md.IsFlag;
param[4] = new SqlParameter("@BoxType", SqlDbType.Int);
param[4].Value = md.BoxType;
param[4] = new SqlParameter("@StationNo", SqlDbType.VarChar);
param[4].Value = md.StationNo;
param[5] = new SqlParameter("@PartName", SqlDbType.NVarChar);
param[5].Value = md.PartName;
param[6] = new SqlParameter("@Mould", SqlDbType.NVarChar);
param[6].Value = md.Mould;
param[7] = new SqlParameter("@StandardQty", SqlDbType.NVarChar);
param[7].Value = md.StandardQty;
param[8] = new SqlParameter("@BoxType", SqlDbType.VarChar);
param[8].Value = md.BoxType;
#endregion
@ -58,7 +74,71 @@ namespace MESClassLibrary.DAL.Injection
return false;
}
}
public bool UpdateInfo(string packageCode, int addCount)
{
try
{
int i = 0;
if(addCount > 0)
{
i = 0;
}
else
{
i = 1;
}
#region 添加数据
string sql = "";
SqlParameter[] param = null;
sql = "update " + TableName + $" set BoxCount = BoxCount+ {addCount} ";
sql += $" where BoxCount >={i} and ";
sql += "BoxNo=@BoxNo";
#region 添加参数
param = new SqlParameter[1];
param[0] = new SqlParameter("BoxNo", SqlDbType.VarChar);
param[0].Value = packageCode;
#endregion
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool UpdatePrinted(string packageCode)
{
try
{
#region 添加数据
string sql = "";
SqlParameter[] param = null;
sql = "update " + TableName + " set IsPrint = 1, PrintTime=getdate() ";
sql += " where ";
sql += "BoxNo=@BoxNo";
#region 添加参数
param = new SqlParameter[1];
param[0] = new SqlParameter("BoxNo", SqlDbType.VarChar);
param[0].Value = packageCode;
#endregion
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SeachInfoByBox(string partNo,string batchNo)
{
try
@ -100,5 +180,25 @@ namespace MESClassLibrary.DAL.Injection
return null;
}
}
public DataTable SearchUnBox(string stationID,string mould)
{
try
{
string sql = @"select * from " + TableName + " where StationNo=@StationNo and Mould=@Mould and IsPrint=0 order by CreateTime desc ";
SqlParameter[] param = new SqlParameter[2];
param[0] = new SqlParameter("@StationNo", SqlDbType.VarChar);
param[0].Value = stationID;
param[1] = new SqlParameter("@Mould", SqlDbType.VarChar);
param[1].Value = mould;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
}
}

23
MESClassLibrary/DAL/Injection/UniqueDal.cs

@ -46,5 +46,28 @@ namespace MESClassLibrary.DAL.Injection
return GetSjBarCodeSerialNo(stockNo, batch);
}
}
public string GetPackageSerialNo(string partNo, string batch,string packageSize)
{
//if (stockNo.Length != 10)
//{
// throw new Exception($"生成塑件条码错误,因为存货代码[{stockNo}]格式不正确,必须10位长度.");
//}
if (packageSize.Length < 3)
{
packageSize = packageSize.PadLeft(3, '0');
}
string s = GetBillNo(partNo + batch, 4);
string sjBarCode = partNo + "." + batch + "." + packageSize + "." + s;
try
{
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, $" insert into tb_BarCodeUnique(OneBarCode) values('{sjBarCode}')");
return sjBarCode;
}
catch (Exception ex)
{
return GetPackageSerialNo(partNo, batch, packageSize);
}
}
}
}

110
MESClassLibrary/DAL/LocalDBService.cs

@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace MESClassLibrary.DAL
{
public class LocalDBService
{
// Token: 0x06000058 RID: 88 RVA: 0x00004839 File Offset: 0x00003839
public LocalDBService(string conn)
{
SqlHelper.sqlCommandTimeOut = 3000;
m_conn = conn;
}
// Token: 0x06000059 RID: 89 RVA: 0x00004863 File Offset: 0x00003863
public void BeginTrans()
{
this.m_connection = new SqlConnection(LocalDBService.m_conn);
this.m_connection.Open();
this.m_trans = this.m_connection.BeginTransaction();
this.IsInTrans = true;
}
// Token: 0x0600005A RID: 90 RVA: 0x0000489C File Offset: 0x0000389C
public void Commit()
{
if (this.IsInTrans)
{
this.m_trans.Commit();
}
}
// Token: 0x0600005B RID: 91 RVA: 0x000048C8 File Offset: 0x000038C8
public void Rollback()
{
if (this.IsInTrans)
{
this.m_trans.Rollback();
}
}
// Token: 0x0600005C RID: 92 RVA: 0x000048F1 File Offset: 0x000038F1
public void EndTrans()
{
this.m_connection.Close();
this.IsInTrans = false;
}
// Token: 0x0600005D RID: 93 RVA: 0x00004908 File Offset: 0x00003908
public DataSet Exec_DataSet(string sql)
{
DataSet result;
if (this.IsInTrans)
{
result = SqlHelper.ExecuteDataset(this.m_trans, CommandType.Text, sql);
}
else
{
result = SqlHelper.ExecuteDataset(LocalDBService.m_conn, CommandType.Text, sql);
}
return result;
}
// Token: 0x0600005E RID: 94 RVA: 0x00004948 File Offset: 0x00003948
public object Exec_Object(string sql)
{
object result;
if (this.IsInTrans)
{
result = SqlHelper.ExecuteScalar(this.m_trans, CommandType.Text, sql);
}
else
{
result = SqlHelper.ExecuteScalar(LocalDBService.m_conn, CommandType.Text, sql);
}
return result;
}
// Token: 0x0600005F RID: 95 RVA: 0x00004988 File Offset: 0x00003988
public bool Exec_NonQuery(string sql)
{
int num;
if (this.IsInTrans)
{
num = SqlHelper.ExecuteNonQuery(this.m_trans, CommandType.Text, sql);
}
else
{
num = SqlHelper.ExecuteNonQuery(LocalDBService.m_conn, CommandType.Text, sql);
}
return num > 0;
}
// Token: 0x04000006 RID: 6
public static string m_conn = string.Empty;
// Token: 0x04000007 RID: 7
private SqlTransaction m_trans = null;
// Token: 0x04000008 RID: 8
private SqlConnection m_connection = null;
// Token: 0x04000009 RID: 9
private bool IsInTrans = false;
}
}

20
MESClassLibrary/DAL/SqlHelper.cs

@ -16,6 +16,20 @@ namespace MESClassLibrary.DAL
/// </summary>
public sealed class SqlHelper
{
public static int sqlCommandTimeOut = 30;
#region 私有构造函数和方法
private SqlHelper() { }
@ -183,6 +197,10 @@ namespace MESClassLibrary.DAL
{
return ConfigurationManager.ConnectionStrings["SqlConnString"].ConnectionString;
}
public static string GetWmsConnSting()
{
return ConfigurationManager.ConnectionStrings["WmsConnString"].ConnectionString;
}
/// <summary>
/// 一个有效的数据库连接对象
/// </summary>
@ -2576,4 +2594,6 @@ namespace MESClassLibrary.DAL
#endregion 参数集检索结束
}
}

102
MESClassLibrary/DAL/Wms/WmsDAL.cs

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using MESClassLibrary.BLL;
using MESClassLibrary.BLL.Log;
using MESClassLibrary.EFModel;
using MESClassLibrary.Enum;
using MESClassLibrary.Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace MESClassLibrary.DAL.Injection
{
public class WmsDAL
{
public string SaveInterface(DataTable barCodeTable)
{
LocalDBService local = new LocalDBService(SqlHelper.GetConnSting());
try
{
local.BeginTrans();
foreach (DataRow dr in barCodeTable.Rows)
{
string sql = $" insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark)" +
$" values ('{dr["BoxNo"]}','{dr["OneBarCode"]}','{dr["BarCode"]}','')";
local.Exec_NonQuery(sql);
}
local.Commit();
}
catch (Exception ex)
{
if (local != null)
{
local.Rollback();
}
return ex.Message;
}
finally
{
if (local != null)
{
local.EndTrans();
}
}
return null;
}
public bool DeleteRecord(LocalDBService localDB,string boxNo,string oneBarCode,string barCode )
{
try
{
string sql = $"delete from tb_Injectionn_Interface where PackageCode='{boxNo}' and OneBarCode='{oneBarCode}' and BarCode='{barCode}'";
localDB.Exec_NonQuery(sql);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool AddRecord(LocalDBService localDB, string boxNo, string oneBarCode, string barCode)
{
try
{
string sql = $"insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark) values ('{boxNo}','{oneBarCode}','{barCode}','')";
localDB.Exec_NonQuery(sql);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>
/// 箱码是否已传递到wms
/// </summary>
/// <param name="pacakgCode"></param>
/// <returns></returns>
public bool IsSendPackageCode(string pacakgCode)
{
try
{
string sql = $" select * from tb_Injectionn_Interface where PackageCode='{pacakgCode}'";
DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0];
return dt.Rows.Count>0;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return true;
}
}
}
}

12
MESClassLibrary/Enum/WmsInterfaceEnum.cs

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MESClassLibrary.Enum
{
public enum WmsInterfaceEnum
{
}
}

7
MESClassLibrary/MESClassLibrary.csproj

@ -63,6 +63,7 @@
<Compile Include="BLL\BasicInfo\BadInjectionBLL.cs" />
<Compile Include="BLL\BasicInfo\BarCodeBLL.cs" />
<Compile Include="BLL\BasicInfo\BarcodeBMWBLL.cs" />
<Compile Include="BLL\BasicInfo\BasicBLL1.cs" />
<Compile Include="BLL\BasicInfo\BomBLL.cs" />
<Compile Include="BLL\BasicInfo\BucketInfoBLL.cs" />
<Compile Include="BLL\BasicInfo\CarTypeBLL.cs" />
@ -150,6 +151,7 @@
<Compile Include="BLL\User\UserBLL.cs" />
<Compile Include="BLL\Weight\WeightBLL.cs" />
<Compile Include="BLL\Weight\WeightRecordBLL.cs" />
<Compile Include="BLL\Wms\WmsBLL.cs" />
<Compile Include="BLL\WorkBll.cs" />
<Compile Include="BLL\ZPPlan\BadZPBLL.cs" />
<Compile Include="BLL\ZPPlan\ScanRecordBLL.cs" />
@ -166,6 +168,7 @@
<Compile Include="DAL\BasicInfo\BadInjectionDAL.cs" />
<Compile Include="DAL\BasicInfo\BarcodeBMWDAL.cs" />
<Compile Include="DAL\BasicInfo\BarCodeDAl.cs" />
<Compile Include="DAL\BasicInfo\BasicDAL1.cs" />
<Compile Include="DAL\BasicInfo\BomDAL.cs" />
<Compile Include="DAL\BasicInfo\CarTypeDAL.cs" />
<Compile Include="DAL\BasicInfo\ColorDAL.cs" />
@ -196,6 +199,7 @@
<Compile Include="DAL\Injection\PLCBreakDAL.cs" />
<Compile Include="DAL\Injection\UniqueDal.cs" />
<Compile Include="DAL\Keep\KeepRecordDAL.cs" />
<Compile Include="DAL\LocalDBService.cs" />
<Compile Include="DAL\Log\LogDelDAL.cs" />
<Compile Include="DAL\Log\LogErrDAL.cs" />
<Compile Include="DAL\Log\LogSysDAL.cs" />
@ -220,6 +224,7 @@
<Compile Include="DAL\User\UserDAL.cs" />
<Compile Include="DAL\Weight\WeighDAL.cs" />
<Compile Include="DAL\Weight\WeightRecordDAL.cs" />
<Compile Include="DAL\Wms\WmsDAL.cs" />
<Compile Include="DAL\ZPPlan\BadZPDAL.cs" />
<Compile Include="DAL\ZPPlan\ScanRecordDAL.cs" />
<Compile Include="DAL\ZPPlan\ZPBomDAL.cs" />
@ -721,6 +726,7 @@
<Compile Include="EFModel\View_1.cs">
<DependentUpon>BBMPT.tt</DependentUpon>
</Compile>
<Compile Include="Enum\WmsInterfaceEnum.cs" />
<Compile Include="JSONTools.cs" />
<Compile Include="LambdaHelper.cs" />
<Compile Include="Model\AnalysisBarModel.cs" />
@ -797,6 +803,7 @@
<Compile Include="Model\TreeModel.cs" />
<Compile Include="Model\UserModel.cs" />
<Compile Include="Model\WeightRecordModel.cs" />
<Compile Include="Model\WmsModel.cs" />
<Compile Include="Model\WMS_InjectionModel.cs" />
<Compile Include="Model\ZPBomModel.cs" />
<Compile Include="Model\ZPBoxModel.cs" />

8
MESClassLibrary/Model/InjectionBoxModel.cs

@ -16,5 +16,13 @@ namespace MESClassLibrary.Model
public int IsFlag { get; set; }
public int BoxType { get; set; }
public string StationNo { get; set; }
public string PartName { get; set; }
public string Mould { get; set; }
public string StandardQty { get; set; }
public string IsPrint { get; set; }
public DateTime PrintTime { get; set; }
}
}

12
MESClassLibrary/Model/WmsModel.cs

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MESClassLibrary.Model
{
public class WmsModel
{
}
}

66
PaintingPC/Program.cs

@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -19,8 +21,72 @@ namespace PaintingPC
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
//处理UI线程异常
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
//处理非UI线程异常
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Run(new FrmChainDown());
}
#region 系统异常处理
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
string str = GetExceptionMsg(e.Exception, e.ToString());
MessageBox.Show(str);
//LogManager.WriteLog(str);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
MessageBox.Show(str);
//LogManager.WriteLog(str);
}
static string GetExceptionMsg(Exception ex, string backStr)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("****************************异常文本****************************");
sb.AppendLine("【出现时间】:" + DateTime.Now.ToString());
if (ex != null)
{
sb.AppendLine("【异常类型】:" + ex.GetType().Name);
sb.AppendLine("【异常信息】:" + ex.Message);
sb.AppendLine("【堆栈调用】:" + ex.StackTrace);
}
else
{
sb.AppendLine("【未处理异常】:" + backStr);
}
sb.AppendLine("***************************************************************");
return sb.ToString();
}
private static void ExceptionMonitor_ExceptionOver()
{
MessageBox.Show("系统遇到未知异常,即将重新启动。");
Process.Start(Application.ExecutablePath);
Process.GetCurrentProcess().Kill();
}
#endregion
}
}

56
喷涂上线/Code/PaintingPC/FrmChainUp1.Designer.cs

@ -81,7 +81,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35.64453F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2560, 1840);
this.tableLayoutPanel1.Size = new System.Drawing.Size(2560, 1830);
this.tableLayoutPanel1.TabIndex = 0;
//
// tableLayoutPanel2
@ -100,8 +100,8 @@
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 144F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(2560, 147);
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 146F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(2560, 146);
this.tableLayoutPanel2.TabIndex = 0;
//
// panel1
@ -111,7 +111,7 @@
this.panel1.Location = new System.Drawing.Point(1, 1);
this.panel1.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(255, 145);
this.panel1.Size = new System.Drawing.Size(255, 144);
this.panel1.TabIndex = 0;
//
// pictureBox1
@ -119,9 +119,9 @@
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(6);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(255, 145);
this.pictureBox1.Size = new System.Drawing.Size(255, 144);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
@ -134,7 +134,7 @@
this.panel2.Location = new System.Drawing.Point(257, 1);
this.panel2.Margin = new System.Windows.Forms.Padding(0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(2044, 145);
this.panel2.Size = new System.Drawing.Size(2044, 144);
this.panel2.TabIndex = 1;
//
// label1
@ -146,7 +146,7 @@
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(2044, 145);
this.label1.Size = new System.Drawing.Size(2044, 144);
this.label1.TabIndex = 0;
this.label1.Text = "悬挂链上件看板";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -158,7 +158,7 @@
this.panel3.Location = new System.Drawing.Point(2302, 1);
this.panel3.Margin = new System.Windows.Forms.Padding(0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(257, 145);
this.panel3.Size = new System.Drawing.Size(257, 144);
this.panel3.TabIndex = 2;
//
// button1
@ -171,7 +171,7 @@
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Margin = new System.Windows.Forms.Padding(0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(257, 145);
this.button1.Size = new System.Drawing.Size(257, 144);
this.button1.TabIndex = 0;
this.button1.Text = "退出";
this.button1.UseVisualStyleBackColor = false;
@ -182,10 +182,10 @@
this.panel4.BackColor = System.Drawing.SystemColors.Control;
this.panel4.Controls.Add(this.comboBox1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(0, 147);
this.panel4.Location = new System.Drawing.Point(0, 146);
this.panel4.Margin = new System.Windows.Forms.Padding(0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(2560, 115);
this.panel4.Size = new System.Drawing.Size(2560, 114);
this.panel4.TabIndex = 1;
//
// comboBox1
@ -218,7 +218,7 @@
"A09",
"A10"});
this.comboBox1.Location = new System.Drawing.Point(0, 0);
this.comboBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.comboBox1.Margin = new System.Windows.Forms.Padding(6);
this.comboBox1.MaxDropDownItems = 20;
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(2560, 112);
@ -229,10 +229,10 @@
this.panel5.BackColor = System.Drawing.Color.Black;
this.panel5.Controls.Add(this.tableLayoutPanel3);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(0, 262);
this.panel5.Location = new System.Drawing.Point(0, 260);
this.panel5.Margin = new System.Windows.Forms.Padding(0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(2560, 656);
this.panel5.Size = new System.Drawing.Size(2560, 652);
this.panel5.TabIndex = 2;
//
// tableLayoutPanel3
@ -252,7 +252,7 @@
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(2560, 656);
this.tableLayoutPanel3.Size = new System.Drawing.Size(2560, 652);
this.tableLayoutPanel3.TabIndex = 0;
//
// panel6
@ -263,14 +263,14 @@
this.panel6.Location = new System.Drawing.Point(1, 1);
this.panel6.Margin = new System.Windows.Forms.Padding(0);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(1278, 130);
this.panel6.Size = new System.Drawing.Size(1278, 129);
this.panel6.TabIndex = 0;
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("微软雅黑", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(278, 22);
this.textBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.textBox1.Margin = new System.Windows.Forms.Padding(6);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(964, 92);
this.textBox1.TabIndex = 1;
@ -292,10 +292,10 @@
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Font = new System.Drawing.Font("微软雅黑", 150F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.Yellow;
this.label4.Location = new System.Drawing.Point(1, 132);
this.label4.Location = new System.Drawing.Point(1, 131);
this.label4.Margin = new System.Windows.Forms.Padding(0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(1278, 523);
this.label4.Size = new System.Drawing.Size(1278, 520);
this.label4.TabIndex = 1;
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -304,10 +304,10 @@
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
this.label5.Font = new System.Drawing.Font("微软雅黑", 150F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Location = new System.Drawing.Point(1280, 132);
this.label5.Location = new System.Drawing.Point(1280, 131);
this.label5.Margin = new System.Windows.Forms.Padding(0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(1279, 523);
this.label5.Size = new System.Drawing.Size(1279, 520);
this.label5.TabIndex = 2;
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -319,7 +319,7 @@
this.label6.Location = new System.Drawing.Point(1286, 1);
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(1267, 130);
this.label6.Size = new System.Drawing.Size(1267, 129);
this.label6.TabIndex = 3;
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -331,10 +331,10 @@
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panel7.ForeColor = System.Drawing.Color.White;
this.panel7.Location = new System.Drawing.Point(0, 918);
this.panel7.Location = new System.Drawing.Point(0, 912);
this.panel7.Margin = new System.Windows.Forms.Padding(0);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(2560, 922);
this.panel7.Size = new System.Drawing.Size(2560, 918);
this.panel7.TabIndex = 3;
//
// btOK
@ -342,7 +342,7 @@
this.btOK.BackColor = System.Drawing.Color.LimeGreen;
this.btOK.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btOK.Location = new System.Drawing.Point(2388, 532);
this.btOK.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.btOK.Margin = new System.Windows.Forms.Padding(6);
this.btOK.Name = "btOK";
this.btOK.Size = new System.Drawing.Size(164, 368);
this.btOK.TabIndex = 0;
@ -359,10 +359,10 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2560, 1840);
this.ClientSize = new System.Drawing.Size(2560, 1830);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.Margin = new System.Windows.Forms.Padding(6);
this.Name = "FrmChainUp1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmChainUp";

Loading…
Cancel
Save