沈泽
2021-11-04 b940d23655d3e814fe0bc92ccc63f688d9cae7c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace PlanM
{
    public partial class Sc_MESHang : Form
    {
        public Sc_MESHang()
        {
            InitializeComponent();
        }
 
        public long HSourceInterID = 0;
        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            long HEmpID =DBUtility.ClsPub.isLong( txtHEmpID.Tag);
            string HEmpNumber = txtHEmpID.Text;
            string HPauseReason = cmbHPauseReason.Text;
            string HMaker = DBUtility.ClsPub.CurUserName;
            string HBillNo = DBUtility.ClsPub.CreateBillCode("3730", ref DBUtility.ClsPub.sExeReturnInfo, true);//µÃµ½Ðµ¥ºÅ 
            long HInterID = DBUtility.ClsPub.CreateBillID("3730", ref DBUtility.ClsPub.sExeReturnInfo);
            if (HEmpID == 0)
            {
                MessageBox.Show("¹ÒÆðÈ˲»ÄÜΪ¿Õ£¡");
                return;
            }
            if (HPauseReason == "")
            {
                MessageBox.Show("¹ÒÆðÔ­Òò²»ÄÜΪ¿Õ£¡");
                return;
            }
            if(HInterID==0)
            {
                MessageBox.Show("¹ÒÆðÈÎÎñÄÚÂë²»ÄÜΪ¿Õ£¡");
                return;
            }
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            oCn.RunProc("exec h_p_Sc_MESHang " + HEmpID + ",'" + HEmpNumber + "','" + HPauseReason + "'," + HInterID + ",'" + HBillNo + "'," + HSourceInterID + ",'" + HMaker + "'");
            this.Close();
        }
 
        private void cmdHEmpID_Click(object sender, EventArgs e)
        {
            DAL.ClsIF_Employee_View oEmp = new DAL.ClsIF_Employee_View();
            if (oEmp.RefreshView())
            {
                txtHEmpID.Text = oEmp.oModel.HNumber;
                txtHEmpID.Tag = oEmp.oModel.HItemID.ToString();
            }
            else
            {
                txtHEmpID.Text = "";
            }
        }
    }
}