123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- 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;
- using UAS_MES_NEW.DataOperate;
- using UAS_MES_NEW.Entity;
- using UAS_MES_NEW.PublicMethod;
- namespace UAS_MES_NEW.Make
- {
- public partial class Make_CheckQrcode : Form
- {
- DataHelper dh;
- LogStringBuilder sql = new LogStringBuilder();
- public Make_CheckQrcode()
- {
- InitializeComponent();
- }
- private void Special_BoxSplit_Load(object sender, EventArgs e)
- {
- dh = SystemInf.dh;
- OperatResult.AppendText(">>请录入SN\n", Color.Black);
- }
- private void Split_Click(object sender, EventArgs e)
- {
- BaseUtil.CleanControls(this.Controls);
- OperatResult.AppendText(">>请录入SN\n", Color.Black);
- }
- private void checkno_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- {
- if (input.Text == "")
- {
- OperatResult.AppendText(">>录入不可为空\n", Color.Red);
- return;
- }
- if (qrcode.Text == "")
- {
- string qr_code = dh.getFieldDataByCondition("craftmaterial join product on cm_soncode = pr_code", "cm_barcode", "cm_sncode = '"+ input.Text + "' and cm_status =0 and pr_detail like '%二维码%'").ToString();
- if (qr_code == "")
- {
- OperatResult.AppendText(">>SN:"+input.Text+"未找到对应二维码标签\n", Color.Red);
- input.Text = "";
- return;
- }
- qrcode.Text = qr_code;
- OperatResult.AppendText(">>获取SN:"+ input.Text + "二维码标签成功,请录入二维码核对\n", Color.Green);
- SN.Text = input.Text;
- input.Text = "";
- }
- else {
- if (qrcode.Text != input.Text)
- {
- OperatResult.AppendText(">>录入二维码标签:" + input.Text + "与先标签内容不对应,核对失败\n", Color.Red);
- input.Text = "";
- return;
- }
- else {
- OperatResult.AppendText(">>二维码标签核对成功\n", Color.Green);
- BaseUtil.CleanControls(this.Controls);
- OperatResult.AppendText(">>请录入SN\n", Color.Black);
- return;
- }
- }
- }
- }
- }
- }
|