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 Pub_Class; 
 | 
  
 | 
namespace Kanban 
 | 
{ 
 | 
    public partial class Frm_MESSetIni : Form 
 | 
    { 
 | 
        public Frm_MESSetIni() 
 | 
        { 
 | 
            InitializeComponent(); 
 | 
        } 
 | 
  
 | 
        private void cmdOK_Click(object sender, EventArgs e) 
 | 
        { 
 | 
            ClsIni oIni = new ClsIni(); 
 | 
            ClsIni.WriteIni("Dept", "DeptID", this.txtHDeptID.Tag.ToString(), Pub_Class.ClsPub.AppPath + @"\" + "HXERP_KB.ini"); 
 | 
            ClsIni.WriteIni("Dept", "DeptName", this.txtHDeptID.Text.Trim(), Pub_Class.ClsPub.AppPath + @"\" + "HXERP_KB.ini"); 
 | 
            this.Close(); 
 | 
        } 
 | 
  
 | 
        private void cmdCancel_Click(object sender, EventArgs e) 
 | 
        { 
 | 
            this.Close(); 
 | 
        } 
 | 
  
 | 
        private void cmdHDeptID_Click(object sender, EventArgs e) 
 | 
        { 
 | 
            DAL.ClsGy_Department_View oDep = new DAL.ClsGy_Department_View(); 
 | 
            if (oDep.RefreshView()) 
 | 
            { 
 | 
                this.txtHDeptID.Text = oDep.oModel.HName; 
 | 
                this.txtHDeptID.Tag = oDep.oModel.HItemID.ToString(); 
 | 
            } 
 | 
            else 
 | 
            { 
 | 
                this.txtHDeptID.Tag = "0"; 
 | 
                this.txtHDeptID.Text = ""; 
 | 
            } 
 | 
        } 
 | 
  
 | 
        private void txtHDeptID_TextChanged(object sender, EventArgs e) 
 | 
        { 
 | 
            BLL.ClsPub_BLL.Sub_ClearText(txtHDeptID); 
 | 
        } 
 | 
  
 | 
        private void Frm_MESSetIni_Load(object sender, EventArgs e) 
 | 
        { 
 | 
            ClsIni oIni = new ClsIni(); 
 | 
            string sDeptID = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + @"\" + "HXERP_KB.ini"); 
 | 
            string sDeptName = ClsIni.ReadIni("Dept", "DeptName", Pub_Class.ClsPub.AppPath + @"\" + "HXERP_KB.ini"); 
 | 
            txtHDeptID.Tag = sDeptID; 
 | 
            txtHDeptID.Text = sDeptName; 
 | 
        } 
 | 
  
 | 
    } 
 | 
} 
 |