12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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.DataOperate;
- using UAS_MES.Entity;
- using UAS_MES.PublicMethod;
- namespace UAS_MES.Make
- {
- public partial class Make_GetRepair : Form
- {
- DataHelper dh = SystemInf.dh;
- LogStringBuilder sql = new LogStringBuilder();
- public Make_GetRepair()
- {
- InitializeComponent();
- }
- private void Confirm_Click(object sender, EventArgs e)
- {
- //获取序列号的途程
- DataTable dt = (DataTable)dh.ExecuteSql("select ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id desc", "select");
- if (dt.Rows.Count > 0)
- {
- string pr_code = dt.Rows[0]["ms_prodcode"].ToString();
- string cr_code = dt.Rows[0]["ms_craftcode"].ToString();
- string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
- string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
- string ms_stepcode = dt.Rows[0]["ms_stepcode"].ToString();
- string ms_checkno = dt.Rows[0]["ms_checkno"].ToString();
- string ms_status = dt.Rows[0]["ms_status"].ToString();
- string ms_currentstepcode = dt.Rows[0]["ms_currentstepcode"].ToString();
- string ms_id = dt.Rows[0]["ms_id"].ToString();
- if (ms_status=="3")
- {
- dh.ExecuteSql("update makebad set mb_receivetime=sysdate where mb_sncode='"+sn_code.Text+"' and mb_status=0", "update");
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "维修接收", "维修接收成功", sn_code.Text, "");
- OperateResult.AppendText(">>序列号" + sn_code.Text + "维修接收成功\n", Color.Green, sn_code);
- }
- else OperateResult.AppendText(">>序列号" + sn_code.Text + "不处于维修状态\n", Color.Red, sn_code);
- }
- else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在\n", Color.Red, sn_code);
- }
- private void Clean_Click(object sender, EventArgs e)
- {
- OperateResult.Clear();
- }
- }
- }
|