| 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 = ""; | 
|             } | 
|         } | 
|     } | 
| } |