| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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.Special
- {
- public partial class Special_BoxSplit : Form
- {
- DataHelper dh;
- LogStringBuilder sql = new LogStringBuilder();
- public Special_BoxSplit()
- {
- InitializeComponent();
- }
- private void Special_BoxSplit_Load(object sender, EventArgs e)
- {
- dh = SystemInf.dh;
- }
- private void Split_Click(object sender, EventArgs e)
- {
- DataTable dt = (DataTable)dh.ExecuteSql("select mal_mac,mal_bt from makeaddresslist where mal_sncode='" + Pallate.Text + "'", "select");
- if (dt.Rows.Count > 0)
- {
- string mac = dt.Rows[0]["mal_mac"].ToString();
- dt = (DataTable)dh.ExecuteSql("select ms_firstsn from makeserial where ms_mac='" + mac + "'", "select");
- if (dt.Rows.Count > 0)
- {
- string firstsn = dt.Rows[0]["ms_firstsn"].ToString();
- if (firstsn != Pallate.Text)
- {
- dh.ExecuteSql("update makeaddresslist set mal_sncode='" + firstsn + "' where mal_sncode='" + Pallate.Text + "'", "update");
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "重新分配MAC", "分配成功", Pallate.Text, "");
- }
- }
- }
- else
- {
- OperatResult.AppendText(Pallate.Text + "未分配MAC\n", Color.Red, Pallate);
- }
- }
- }
- }
|