private void Fill_Combo() { database1 clsdatabase1 = new database1(); INGRN clsINGRN = new INGRN(); DataSet ds = clsINGRN.Fill_Combo(mSys_System.pComp_ID, mSys_System.pUser_ID); if (clsINGRN.sErrorCode != "") { clsHomeScreen.Display_Message("MsgDBError : " + " '" + clsdatabase1.sErrorCode + "'", false); return; } Set_Combo(lookBranch_ID, ds.Tables[0], "Branch_D", "Branch_ID", true); Set_Combo(lookCredit_ID, ds.Tables[1], "CreditD", "CreditID", true); Set_Combo(lookDType, ds.Tables[2], "DType_DD", "DType_ID", true); }
private void lookBranch_ID_EditValueChanged(object sender, EventArgs e) { database1 clsdatabase1 = new database1(); INGRN clsINGRN = new INGRN(); DataSet ds = new DataSet(); int vBranch = -1; if (lookBranch_ID.EditValue != null) { vBranch = Convert.ToInt32(lookBranch_ID.EditValue); } ds = clsINGRN.Fill_Combo(mSys_System.pComp_ID, mSys_System.pUser_ID, vBranch); if (clsINGRN.sErrorCode != "") { clsHomeScreen.Display_Message("MsgDBError : " + " '" + clsdatabase1.sErrorCode + "'", false); return; } Set_Combo(cmbDept_ID, ds.Tables[0], "Dept_DD", "Dept_ID", true); Set_Combo(cmbDept_ID_Store, ds.Tables[1], "Dept_DD", "Dept_ID", true); Set_Combo(lookSub_ID, ds.Tables[2], "Sub_CodeD", "Sub_ID", true); }