private void BindStoreName() { StoreID = GblIQCare.intStoreId; //ddlSourceStore.Enabled = true; BindFunctions theBind = new BindFunctions(); DataSet XMLDS = new DataSet(); XMLDS.ReadXml(GblIQCare.GetXMLPath() + "\\AllMasters.con"); DataView theDV; DataTable theStoreDT; IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM"); IQCareUtils theUtils = new IQCareUtils(); DataSet theDS = objItemCommonlist.GetStoreDetail(); ddlSourceStore.Enabled = true; theDV = new DataView(theDS.Tables[2]); theDV.RowFilter = "Id <>" + StoreID; theStoreDT = theDV.ToTable(); theBind.Win_BindCombo(ddlSourceStore, theStoreDT, "Name", "Id"); theDV = new DataView(XMLDS.Tables["Mst_Store"]); theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null) and ( Id =" + StoreID + ")"; theStoreDT = theDV.ToTable(); //theBind.Win_BindCombo(ddlDestinationStore, theStoreDT, "Name", "Id"); ddlDestinationStore.DataSource = theStoreDT; ddlDestinationStore.DisplayMember = "Name"; ddlDestinationStore.ValueMember = "Id"; }
private void Init_Form() { IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM"); theDs = objItemCommonlist.GetStoreDetail(); if (theDs.Tables[0].Rows.Count > 0) { BindFunctions theBindManager = new BindFunctions(); theBindManager.Win_BindCombo(cmbStore, theDs.Tables[0], "Name", "Id"); } }
private void BindCombo() { try { DataSet XMLDS = new DataSet(); DataView theDV; DataTable theStoreDT = new DataTable(); XMLDS.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con")); if (XMLDS == null) { IMasterList thePharmacyManager1 = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM"); XMLDS = thePharmacyManager1.GetStoreDetail(); theDV = new DataView(XMLDS.Tables[0]); } else if ((XMLDS != null) && (XMLDS.Tables.Count < 0)) { IMasterList thePharmacyManager1 = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM"); XMLDS = thePharmacyManager1.GetStoreDetail(); theDV = new DataView(XMLDS.Tables[0]); } else { DataTable dt = XMLDS.Tables["Mst_Store"]; if (dt == null || dt.Rows.Count <= 0) { IMasterList thePharmacyManager1 = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM"); XMLDS = thePharmacyManager1.GetStoreDetail(); theDV = new DataView(XMLDS.Tables[0]); theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null)"; /// theDV.Sort = "Name ASC"; /// theStoreDT = theDV.Table; } } theBindManager.BindCombo(ddlStore, theStoreDT, "Name", "Id"); } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); } }
private void theButton_Click(object sender, EventArgs e) { try { IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM"); IQCareUtils theUtils = new IQCareUtils(); theDS = objItemCommonlist.GetStoreDetail(); BindDropdown(theDS.Tables[3]); showgrid(theDS.Tables[1]); objItemCommonlist = null; } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this); } }