一厂MES,含注塑,喷涂,冲孔
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.
 
 
 
 
 

938 lines
33 KiB

using PaintingPC.Model;
using PaintingPC.WebReference;
using System;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.IO;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
namespace PaintingPC
{
public partial class FrmSecondCheck : Form
{
int count = 0; //缺陷图选择个数
public static string ColorName = ""; //修改颜色
public static string paintId = "";
private static string position = "", reason = "";
public FrmSecondCheck()
{
InitializeComponent();
}
private void FrmSecondCheck_Load(object sender, EventArgs e)
{
try
{
Control.CheckForIllegalCrossThreadCalls = false;
UpdateSoftware();
InitPage();
}
catch (Exception ex)
{
MessageBox.Show("网络故障,请联系网络管理员");
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
}
public void InitPage()
{
try
{
string title = ConfigurationManager.AppSettings["Position"].ToString();
string workClass = Function.GetWorkClass();
string station = ConfigurationManager.AppSettings["Station"].ToString();
labTitle.Text = title;
labWorkClass.Text = workClass;
labStation.Text = station;
labelVersion.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
Program.IP = ConfigurationManager.AppSettings["IP"].ToString();
//System.Threading.Timer timer = new System.Threading.Timer(delegate
//{
// labTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
//},
//null,
//2000,
//1000
//);
Thread t = new Thread(new ThreadStart(TimeGo));
t.Start();
}
catch (Exception ex)
{ }
}
public void InitColor(string stockNo)
{
try
{
DataTable dt = Function.GetColorByStockNo(stockNo);
if (dt != null && dt.Rows.Count > 0)
{
RadioButton[] rb = new RadioButton[dt.Rows.Count];
for(int i=0; i<dt.Rows.Count; i++)
{
rb[i] = new RadioButton();
rb[i].Font = new System.Drawing.Font("微软雅黑", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
rb[i].TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
rb[i].AutoSize = true;
rb[i].Text = dt.Rows[i]["Color"].ToString();
//rb[i].Text = dt.Rows[i]["ColorName"].ToString();
rb[i].CheckedChanged += rb_CheckedChanged;
rb[i].BackColor = Color.Silver;
rb[i].AutoSize = false;
rb[i].Size = new Size(150,40);
if(i == 0)
{
rb[i].Location = new Point(15,20);
}
else
{
if (i == 5)
{
rb[i].Location = new Point(rb[0].Location.X, rb[0].Location.Y + 50);
}
else if (i > 6)
{
rb[i].Location = new Point(rb[i - 1].Location.X + rb[i - 1].Width + 50, rb[i - 1].Location.Y);
}
else
{
rb[i].Location = new Point(rb[i - 1].Location.X + rb[i - 1].Width + 50, rb[i - 1].Location.Y);
}
}
rb[i].Click += new System.EventHandler(this.rb_Click);
}
groupBox1.Controls.AddRange(rb);
//panel3.Controls.AddRange(rb);
}
}
catch (Exception ex)
{
LogHelper.WriteLogManager(ex);
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
throw ex;
}
}
private void rb_CheckedChanged(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
if (rb.Checked)
{
rb.BackColor = Color.LightSalmon;
}
else
{
rb.BackColor = Color.Silver;
}
}
private void TimeGo()
{
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 10;
timer.Enabled = true;
timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Tick);
}
private void timer_Tick(object sender, EventArgs e)
{
labTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Thread.Sleep(500);
}
/// <summary>
/// 缺陷图点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void lblRoom_Click(object sender, EventArgs e)
{
Label a = (Label)sender;
string aa = a.Text;
if (a.BackColor == Color.Transparent)
{
a.BackColor = Color.FromArgb(150, System.Drawing.Color.Chartreuse);
position += aa;
count++;
}
else
{
a.BackColor = Color.Transparent;
count--;
}
}
/// <summary>
/// 缺陷原因点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void dLbRoom_Click(object sender, EventArgs e)
{
if (count == 0)
{
MessageBox.Show("请选择缺陷区域!");
return;
}
Label a = (Label)sender;
string aa = a.Text;
if (a.BackColor == Color.Transparent)
{
a.BackColor = Color.Chartreuse;
reason += a.Text + ";";
}
else
{
a.BackColor = Color.Transparent;
reason = reason.Replace(a.Text + ";", "");
}
}
private Control[] SetControlGroup()
{
Control[] controls = { btnPass, btnAbt, btnRepair };
return controls;
}
/// <summary>
/// 清除控件选中
/// </summary>
/// <param name="controls"></param>
public void ClearControlColor(Control[] controls)
{
foreach (Control c in controls)
{
c.BackColor = Color.LightGray;
}
}
/// <summary>
/// 抛光按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnPass_Click(object sender, EventArgs e)
{
#region 必须选择缺陷位置与缺陷原因,否则无法保存
string damnPositionTemp = "";
string reasonTemp = "";
//缺陷位置
foreach (Control c in pictureBox2.Controls)
{
Label lab = c as Label;
if (lab.BackColor != Color.Transparent)
{
damnPositionTemp += lab.Text + ";";
}
}
//缺陷原因
foreach (Control c in panel2.Controls)
{
Label lab = c as Label;
if (lab.BackColor != Color.Transparent)
{
reasonTemp += lab.Text + ";";
}
}
if (string.IsNullOrWhiteSpace(damnPositionTemp) || string.IsNullOrWhiteSpace(reasonTemp))
{
MessageBox.Show("必须选择缺陷位置与缺陷原因,否则无法保存!");
return;
}
#endregion
ClearControlColor(SetControlGroup());
btnRepair.BackColor = Color.Yellow;
//保存
SaveInspect("抛光");
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
//LoadPage();
//ClearInspect();
//ClearControlColor(SetControlGroup());
}
/// <summary>
/// 打磨按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnRepair_Click(object sender, EventArgs e)
{
#region 可回喷次数 =1,不能打磨, =2 可以, 不能有两次质检结果为打磨
string barcode = Function.UniteBarCodeToOne(txtBarCode.Text.Trim());
int cs = Function.YiDaMoCiShu(barcode);
//if (cs >= 1)
//{
// MessageBox.Show("该条码已有判定为打磨的质检结果!");
// return;
//}
int keHuiPen = Function.keHuiPen(barcode);
if (keHuiPen > 0 && cs < keHuiPen)
{
#region 必须选择缺陷位置与缺陷原因,否则无法保存
string damnPositionTemp = "";
string reasonTemp = "";
//缺陷位置
foreach (Control c in pictureBox2.Controls)
{
Label lab = c as Label;
if (lab.BackColor != Color.Transparent)
{
damnPositionTemp += lab.Text + ";";
}
}
//缺陷原因
foreach (Control c in panel2.Controls)
{
Label lab = c as Label;
if (lab.BackColor != Color.Transparent)
{
reasonTemp += lab.Text + ";";
}
}
if (string.IsNullOrWhiteSpace(damnPositionTemp) || string.IsNullOrWhiteSpace(reasonTemp))
{
MessageBox.Show("必须选择缺陷位置与缺陷原因,否则无法保存!");
return;
}
#endregion
ClearControlColor(SetControlGroup());
btnRepair.BackColor = Color.Yellow;
//保存
SaveInspect("打磨");
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
}
else
{
MessageBox.Show("根据该零件可回喷次数设置,不能判定为打磨或已超过打磨次数!");
return;
}
#endregion
}
/// <summary>
/// 报废按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnAbt_Click(object sender, EventArgs e)
{
#region 必须选择缺陷位置与缺陷原因,否则无法保存
string damnPositionTemp = "";
string reasonTemp = "";
//缺陷位置
foreach (Control c in pictureBox2.Controls)
{
Label lab = c as Label;
if (lab.BackColor != Color.Transparent)
{
damnPositionTemp += lab.Text + ";";
position = damnPositionTemp;
}
}
//缺陷原因
foreach (Control c in panel2.Controls)
{
Label lab = c as Label;
if (lab.BackColor != Color.Transparent)
{
reasonTemp += lab.Text + ";";
reason = reasonTemp;
}
}
if (string.IsNullOrWhiteSpace(damnPositionTemp) || string.IsNullOrWhiteSpace(reasonTemp))
{
MessageBox.Show("必须选择缺陷位置与缺陷原因,否则无法保存!");
return;
}
#endregion
#region 判断产品是否有颜色
string[] ss = labProductInfo.Text.Split(',');
if (ss.Length >= 1)
{
if (string.IsNullOrWhiteSpace(ss[0]))
{
MessageBox.Show("无颜色信息,请重新扫描");
return;
}
}
else
{
MessageBox.Show("条码有误,请重新扫描");
return;
}
#endregion
ClearControlColor(SetControlGroup());
btnAbt.BackColor = Color.Red;
//保存
SaveInspect("报废");
#region 报废则调WMS WebService,入库
//try
//{
// WMSWebService webService = new WMSWebService();
// webService.Url = ConfigurationManager.AppSettings["WMSWebServiceURL"].ToString();
// //webService.Timeout = 1200000;
// string errorReason = "";
// webService.WMSSprayingForCS(Function.UniteBarCodeToOne(txtBarCode.Text.Trim()), 0, out errorReason);
//}
//catch (Exception ex)
//{
// LogHelper.WriteErrLogBase("工位:" + labStation.Text.Trim() + ",二次质检调用WMS接口:" + ex.ToString(), MethodBase.GetCurrentMethod().Name);
//}
#endregion
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
//ClearInspect();
//ClearControlColor(SetControlGroup());
}
public void SaveInspect(string inspectResult)
{
try
{
if (!string.IsNullOrWhiteSpace(txtBarCode.Text.Trim()))
{
InspectModel model1 = new InspectModel();
model1.barcode = Function.UniteBarCodeToOne(txtBarCode.Text.Trim());
model1.position = labProPosition.Text;
model1.stationNo = labStation.Text;
model1.workClass = labWorkClass.Text;
model1.inspectResult = "[" + inspectResult + "]";
model1.damnPosition = position;
model1.reason = reason;
model1.remark3 = paintId;
if (string.IsNullOrWhiteSpace(model1.damnPosition) || string.IsNullOrWhiteSpace(model1.reason))
{
MessageBox.Show("必须选择缺陷位置与缺陷原因,否则无法保存!");
return;
}
if (rdo1.Checked)
{
model1.productOption = "1";
}
else if (rdo2.Checked)
{
model1.productOption = "2";
}
else if (rdo3.Checked)
{
model1.productOption = "3";
}
model1.productInfo = labProductInfo.Text.Trim();
model1.side = labProPosition.Text.Contains("A侧") ? "A侧" : "B侧";
model1.InspectTimes = (Function.GetInspectTimes(txtBarCode.Text.Trim())+1).ToString();
Function.InsertInspect(model1);
}
}
catch (Exception ex)
{
LogHelper.WriteErrLogBase("二次质检提交:" + ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
}
public void ClearInspect()
{
//缺陷位置
foreach (Control c in pictureBox2.Controls)
{
Label lab = c as Label;
lab.BackColor = Color.Transparent;
}
//缺陷原因
foreach (Control c in panel2.Controls)
{
Label lab = c as Label;
lab.BackColor = Color.Transparent;
}
}
/// <summary>
/// 扫码-根据条码查询信息(产品信息、加载图片及缺陷原因、三次检验信息)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtBarCode_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
try
{
ClearPage();
LoadPage();
}
catch (Exception ex)
{
MessageBox.Show("请查看网络是否与服务器连通,无法连通请联系网络管理员。"+ ex);
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
}
}
private void LoadPage()
{
try
{
ButtonEnable(SetControlGroup());
//ClearPage();
//测试条码:11111111112222222222
string barcode = txtBarCode.Text.Trim();
if (barcode.Contains("."))
{
barcode = Function.TransToBarCodeOne(barcode);
}
#region 判断条码有效性
if (! Function.BarCodeValid(barcode))
{
MessageBox.Show("扫描的条码号:"+barcode+"无效,请重新扫描!");
txtBarCode.Text = "";
return;
}
#endregion
#region 查询该系列产品都有什么颜色
string canChanageColor = ConfigurationManager.AppSettings["CanChangeColor"].Trim();
if (canChanageColor.ToLower() == "true")
{
string stockNo = barcode.Substring(0, 10);
InitColor(stockNo);
}
#endregion
#region 如果是补打的条码,查询产品信息
if (!barcode.Contains(".") && barcode.Length > 4)
{
string strCode = barcode.Substring(barcode.Length - 4, 4);
int num = 0;
Int32.TryParse(strCode, out num);
if (num > 7000)
{
labProductInfo.Text = Function.GetReprintInfo(barcode);
if (string.IsNullOrWhiteSpace(labProductInfo.Text.Trim()))
{
ButtonDisable(SetControlGroup());
labProductInfo.Text = "没有查询到补打条码信息";
return;
}
}
}
#endregion
//根据条码查询,加载图片及原因
int row = 0, col = 0;
string picture = "";
#region 缺陷原因
try
{
int drow = 0, dcol = 5; //行,列
DataTable dt3 = Function.SearchDefectInfo(ConfigurationManager.AppSettings["Station"].Trim());
if (dt3 != null && dt3.Rows.Count > 0)
{
drow = Convert.ToInt32(Math.Ceiling((double)dt3.Rows.Count / dcol));
Label[] dLb = new Label[7];
string[] dstr = new string[dt3.Rows.Count];
for (int i = 0; i < dt3.Rows.Count; i++)
{
dstr[i] = dt3.Rows[i]["DefectName"].ToString();
}
for (int i = 0; i < dcol; i++) //列
{
for (int j = 0; j < drow; j++) //行
{
dLb[i] = new Label();
if ((i + dcol * j) < dstr.Length)
{
dLb[i].Text = dstr[i + dcol * j].ToString();
dLb[i].Font = new Font(dLb[i].Font.FontFamily, 24, FontStyle.Bold);
dLb[i].Size = new Size(150, 50);
dLb[i].Location = new Point(20 + i * (dLb[i].Size.Width + 25), 5 + j * (dLb[i].Size.Height + 20));
dLb[i].BorderStyle = BorderStyle.FixedSingle;
dLb[i].BackColor = Color.Transparent;
dLb[i].TextAlign = ContentAlignment.MiddleCenter;
panel2.Controls.Add(dLb[i]);
dLb[i].Click += new EventHandler(dLbRoom_Click);
}
}
}
}
}
catch (Exception ex)
{
LogHelper.WriteLogManager(ex);
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
throw ex;
}
#endregion
#region 加载图片
try
{
DataTable dt = Function.SearchInfoByBarCode(barcode);
if (dt != null && dt.Rows.Count > 0)
{
row = Convert.ToInt32(dt.Rows[0]["Rows"].ToString());
col = Convert.ToInt32(dt.Rows[0]["Cols"].ToString());
picture = dt.Rows[0]["PicturePath"].ToString();
}
dt.Dispose();
if (!File.Exists(System.IO.Directory.GetCurrentDirectory() + @"\" + picture))
{
string strImageURL = Function.GetImgPath() + picture;
System.Net.WebClient webClient = new System.Net.WebClient();
webClient.DownloadFile(strImageURL, Directory.GetCurrentDirectory() + @"\" + picture);
}
FileStream fs = new FileStream(Directory.GetCurrentDirectory() + "\\" + picture, FileMode.Open,
FileAccess.Read);//获取图片文件流
Image img = Image.FromStream(fs); // 文件流转换成Image格式
pictureBox2.Image = img; //给 图片框设置要显示的图片
fs.Close(); // 关闭流,释放图片资源
}
catch (Exception ex)
{
LogHelper.WriteLogManager(ex);
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
#endregion
#region 缺陷图划分区域
Label[] lb = new Label[5];
string[] str = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
for (int i = 0; i < col; i++)
{
for (int j = 0; j < row; j++)
{
lb[i] = new Label();
lb[i].Text = str[i + col * j].ToString();
lb[i].Font = new Font(lb[i].Font.FontFamily, 32, FontStyle.Bold);
lb[i].Size = new Size(pictureBox2.Width / col, pictureBox2.Height / row);
lb[i].Location = new Point(0 + i * lb[i].Size.Width, 0 + j * lb[i].Size.Height);
lb[i].BorderStyle = BorderStyle.FixedSingle;
lb[i].BackColor = Color.Transparent;
lb[i].TextAlign = ContentAlignment.MiddleCenter;
pictureBox2.Controls.Add(lb[i]);
lb[i].Click += new EventHandler(lblRoom_Click);
}
}
#endregion
//不是补打的条码,根据条码查询产品信息、检验信息,选中缺陷位置及原因
DataTable dtInspect = Function.GetInspectInfoByBarCode(barcode);
if (dtInspect != null && dtInspect.Rows.Count > 0)
{
labProductInfo.Text = dtInspect.Rows[0]["productInfo"].ToString().Trim(); //产品信息
//string position1 = dtInspect.Rows[0]["damnPosition"].ToString(); //缺陷位置
//string reason1 = dtInspect.Rows[0]["reason"].ToString(); //原因
position= dtInspect.Rows[0]["damnPosition"].ToString(); //缺陷位置
reason= dtInspect.Rows[0]["reason"].ToString(); //原因
paintId = dtInspect.Rows[0]["remark3"].ToString(); //原因
#region 三检结果
for (int i = 0; i < dtInspect.Rows.Count; i++)
{
string time = dtInspect.Rows[i]["InspectTimes"].ToString();
string result = dtInspect.Rows[i]["inspectResult"].ToString() + dtInspect.Rows[i]["damnPosition"].ToString() + ":" + dtInspect.Rows[i]["reason"].ToString();
switch (time)
{
case "1":
labFirstCheck.Text = result;
break;
case "2":
labSecondCheck.Text = result;
break;
case "3":
labThirdCheck.Text = result;
break;
}
}
#endregion
#region 选中缺陷位置及原因
foreach (Control c in pictureBox2.Controls)
{
Label lab = c as Label;
if (position.Contains(lab.Text))
{
lab.BackColor = Color.FromArgb(150, System.Drawing.Color.Chartreuse);
count++;
}
}
foreach (Control c in panel2.Controls)
{
Label lab = c as Label;
if (reason.Contains(lab.Text))
{
lab.BackColor = Color.Chartreuse;
reason += lab.Text + ";";
}
}
#endregion
#region 根据一检结果显示一检时的位置--暂时不要
labProPosition.Text = Function.GetFirstInsPosition(dtInspect);
#endregion
}
else
{
#region 没有一检结果,查询老外数据库,取产品信息
string[] info = Function.GetProductInfo(barcode).Split(',');
labProductInfo.Text = info[0] + "," + info[1];
paintId = info[2];
labProductInfo.Tag = Function.GetSide(barcode, paintId);
labProPosition.Text = labTitle.Text.Trim() + " " + labProductInfo.Tag.ToString().Replace(';', ' ');
#endregion
}
txtBarCode.SelectAll();
}
catch (Exception ex)
{
MessageBox.Show("请查看网络是否与服务器连通,无法连通请联系网络管理员。" + ex.ToString());
LogHelper.WriteLogManager(ex);
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
}
}
/// <summary>
/// 设置按钮不可用
/// </summary>
/// <param name="controls"></param>
private void ButtonDisable(Control[] controls)
{
foreach (Control c in controls)
{
Button btn = c as Button;
btn.Enabled = false;
}
}
/// <summary>
/// 设置按钮可用
/// </summary>
/// <param name="controls"></param>
private void ButtonEnable(Control[] controls)
{
foreach (Control c in controls)
{
Button btn = c as Button;
btn.Enabled = true;
}
}
private void labWorkClass_Click(object sender, EventArgs e)
{
Function.ChangeWorkClass(labWorkClass);
}
/// <summary>
/// 点击退出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void labTime_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
/// <summary>
/// 清空页面
/// </summary>
private void ClearPage()
{
labProductInfo.Tag = null;
labProductInfo.Text = "";
labFirstCheck.Text = "";
labSecondCheck.Text = "";
labThirdCheck.Text = "";
btnPass.BackColor = Color.LightGray;
btnAbt.BackColor = Color.LightGray;
btnRepair.BackColor = Color.LightGray;
ClearRadioButton();
ClearInspect();
ClearControlColor(SetControlGroup());
pictureBox2.Controls.Clear();
panel2.Controls.Clear();
pictureBox2.Image = null;
txtBarCode.TabIndex = 0;
txtBarCode.Select();
position = "";
reason = "";
}
public void ClearRadioButton()
{
groupBox1.Controls.Clear();
}
public void ClearTxtBarcode()
{
txtBarCode.Text = "";
labProPosition.Text = "";
}
#region 更改颜色按钮
/// <summary>
/// 更改颜色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void labChangeColor_Click(object sender, EventArgs e)
{
ColorName = "";
FrmChangeColor frm = new FrmChangeColor();
frm.ShowDialog();
if (!string.IsNullOrWhiteSpace(labProductInfo.Text.Trim()))
{
string[] str = labProductInfo.Text.Trim().Split(',');
if (str.Length > 1)
{
labProductInfo.Text = ColorName + "," + str[str.Length - 1] ;
}
}
else
{
labProductInfo.Text = ColorName;
}
}
private void labChangeColor_MouseLeave(object sender, EventArgs e)
{
Label lab = sender as Label;
lab.BackColor = Color.FromArgb(192, 255, 255);
}
private void labChangeColor_MouseMove(object sender, MouseEventArgs e)
{
Label lab = sender as Label;
lab.BackColor = Color.Turquoise;
}
#endregion
/// <summary>
/// 其他按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
ClearControlColor(SetControlGroup());
btnPass.BackColor = Color.GreenYellow;
//保存
SaveInspect("其他");
ClearPage();
ClearTxtBarcode();
txtBarCode.TabIndex = 0;
}
private void UpdateSoftware()
{
var serverUrl = "http://10.60.101.59:8013/";
var updateXmlFileName = "PaintingUpdatePC.xml";
var updater = new AutoUpdater();
if (updater.CheckUpdateLoad(serverUrl, updateXmlFileName))
{
Environment.Exit(0);
}
}
private void rb_Click(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
if (!string.IsNullOrWhiteSpace(labProductInfo.Text))
{
string[] ss = labProductInfo.Text.Split(',');
labProductInfo.Text = rb.Text.Trim() + "," + ss[1];
}
}
private void txtBarCode_DoubleClick(object sender, EventArgs e)
{
txtBarCode.SelectAll();
}
}
}