You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.9 KiB
102 lines
2.9 KiB
3 months ago
|
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 PaintingPC
|
||
|
{
|
||
|
public delegate void buttonClick(object sender, EventArgs e);
|
||
|
public partial class FrmChainUp1 : Form
|
||
|
{
|
||
|
Interface1 ii = new Function();
|
||
|
buttonClick bck;
|
||
|
|
||
|
string CartypeID = "";
|
||
|
string CartypeName = "";
|
||
|
string ColorID = "";
|
||
|
string ColorName = "";
|
||
|
|
||
|
public FrmChainUp1()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
}
|
||
|
|
||
|
public FrmChainUp1(string cartypeID, string cartypeName, string colorID, string colorName, buttonClick click)
|
||
|
{
|
||
|
CartypeID = cartypeID;
|
||
|
CartypeName = cartypeName;
|
||
|
ColorID = colorID;
|
||
|
ColorName = colorName;
|
||
|
bck = click;
|
||
|
|
||
|
InitializeComponent();
|
||
|
}
|
||
|
|
||
|
private void button1_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
this.Close();
|
||
|
bck(sender, e);
|
||
|
}
|
||
|
|
||
|
private void FrmChainUp1_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
Control.CheckForIllegalCrossThreadCalls = false;
|
||
|
|
||
|
label2.Text = CartypeName + " - " + ColorName;
|
||
|
label3.Text = Function.GetWorkClass();
|
||
|
|
||
|
Task task1 = Task.Run(() =>
|
||
|
{
|
||
|
SetPageNum();
|
||
|
});
|
||
|
|
||
|
DataTable dt = Function.GetChainCountLabel();
|
||
|
if (dt != null && dt.Rows.Count > 0)
|
||
|
{
|
||
|
ii.IInitPanel(panel7, 200, 170, dt, "colDes", "num", dLbLable_Click);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void textBox1_KeyDown(object sender, KeyEventArgs e)
|
||
|
{
|
||
|
if (e.KeyCode == Keys.Enter)
|
||
|
{
|
||
|
TextBox txt = (TextBox)textBox1;
|
||
|
string barcode = txt.Text.Trim();
|
||
|
|
||
|
label6.Text = Function.GetProductInfo(barcode);
|
||
|
|
||
|
bool InspectPass = Function.InspectPass(barcode);
|
||
|
if (InspectPass)
|
||
|
{
|
||
|
Function.SaveChainUp(barcode, CartypeID, CartypeName, ColorID, ColorName, "0");
|
||
|
SetPageNum();
|
||
|
DataTable dt = Function.GetChainCountLabel();
|
||
|
if (dt != null && dt.Rows.Count > 0)
|
||
|
{
|
||
|
ii.IInitPanel(panel7, 200, 170, dt, "colDes", "num", dLbLable_Click);
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
MessageBox.Show("质检未通过,不能进行操作");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void SetPageNum()
|
||
|
{
|
||
|
label4.Text = Function.GetChainCountAll();
|
||
|
label5.Text = Function.GetChainCountDown();
|
||
|
}
|
||
|
|
||
|
void dLbLable_Click(object sender, EventArgs e)
|
||
|
{ }
|
||
|
}
|
||
|
}
|