private void cmbModuleName_SelectedIndexChanged(object sender, EventArgs e) { Int32 intModuleId = 0; if (cmbModuleName.SelectedIndex == 0) { return; } if (cmbModuleName.Text == "Select") { IQCareWindowMsgBox.ShowWindow("SelectTechnicalArea", this); return; } else { intModuleId = Convert.ToInt32(cmbModuleName.SelectedValue); } try { IFormModuleLink objFormModuleLink = (IFormModuleLink)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BFormModuleLink, BusinessProcess.FormBuilder"); objDsFormModuleLinkDetails = objFormModuleLink.FormModuleLinking(intModuleId, Convert.ToInt32(GblIQCare.AppCountryId)); if (objDsFormModuleLinkDetails.Tables[2].Rows[0][0].ToString() == "0") { FlagValidate = 0; } else { FlagValidate = 1; } if (objDsFormModuleLinkDetails.Tables[1].Rows.Count > 0) { BindFunctions theBind = new BindFunctions(); chklistFormName.DataSource = null; theBind.Win_BindCheckListBox(chklistFormName, objDsFormModuleLinkDetails.Tables[1], "FeatureName", "FeatureID"); for (int i = 0; i < objDsFormModuleLinkDetails.Tables[1].Rows.Count; i++) { if (objDsFormModuleLinkDetails.Tables[1].Rows[i]["Selected"].ToString() == "True") { this.chklistFormName.SetItemChecked(i, true); } } } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this); } }
public void BindData() { try { IFormModuleLink objFormModuleLink = (IFormModuleLink)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BFormModuleLink, BusinessProcess.FormBuilder"); objDsFormModuleLinkDetails = objFormModuleLink.FormModuleLinking(0, Convert.ToInt32(GblIQCare.AppCountryId)); if (objDsFormModuleLinkDetails.Tables[1].Rows.Count > 0) { BindFunctions theBind = new BindFunctions(); theBind.Win_BindCombo(cmbModuleName, objDsFormModuleLinkDetails.Tables[0], "ModuleName", "ModuleID"); theBind.Win_BindCheckListBox(chklistFormName, objDsFormModuleLinkDetails.Tables[1], "FeatureName", "FeatureID"); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this); } }