using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
using Pub_Class;
|
|
namespace NETERPNoWin
|
{
|
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_SY.ini");
|
ClsIni.WriteIni("Dept", "DeptName", this.txtHDeptID.Text.Trim(), Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
ClsIni.WriteIni("Warehouse", "HWhID", this.txtHWhID.Tag.ToString(), Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
ClsIni.WriteIni("Warehouse", "HWhName", this.txtHWhID.Text.Trim(), Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
ClsIni.WriteIni("OPenWin", "gnmc", this.txtHOPWin.Text.Trim(), Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.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 oDept = new DAL.ClsGy_Department_View();
|
if (oDept.RefreshView())
|
{
|
this.txtHDeptID.Text = oDept.oModel.HName;
|
this.txtHDeptID.Tag = oDept.oModel.HItemID.ToString();
|
}
|
else
|
{
|
this.txtHDeptID.Text = "";
|
}
|
}
|
|
private void Frm_MESSetIni_Load(object sender, EventArgs e)
|
{
|
ClsIni oIni = new ClsIni();
|
string sID = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
string sName = ClsIni.ReadIni("Dept", "DeptName", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
string sHWhID = ClsIni.ReadIni("Warehouse", "HWhID", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
string sHWhName = ClsIni.ReadIni("Warehouse", "HWhName", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
string sWinName = ClsIni.ReadIni("OPenWin", "gnmc", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
|
txtHDeptID.Tag = sID;
|
txtHDeptID.Text = sName;
|
txtHWhID.Tag = sHWhID;
|
txtHWhID.Text = sHWhName;
|
txtHOPWin.Text = sWinName;
|
}
|
|
private void cmdHWhID_Click(object sender, EventArgs e)
|
{
|
DAL.ClsGy_Warehouse_View oWarehouse = new DAL.ClsGy_Warehouse_View();
|
if (oWarehouse.RefreshView())
|
{
|
this.txtHWhID.Text = oWarehouse.oModel.HName;
|
this.txtHWhID.Tag = oWarehouse.oModel.HItemID.ToString();
|
}
|
else
|
{
|
this.txtHWhID.Text = "";
|
}
|
}
|
|
private void txtHWhID_TextChanged(object sender, EventArgs e)
|
{
|
BLL.ClsPub_BLL.Sub_ClearText(txtHWhID);
|
}
|
}
|
}
|