private void BindCompanyList(int EmpID) { BindCombo ObjBindCombo = new BindCombo(); lstCompanyName.Items.Clear(); lstCompanyName.ClearSelection(); lstCompanyName.DataTextField = "COMPANY_NAME"; lstCompanyName.DataValueField = "COMPANY_ID"; DataSet ds = new DataSet(); DataTable dt = new DataTable(); ds = objUserMasterDAL.GetCompanyByEmployeeId(EmpID); dt = ds.Tables[0]; if (lstAssignCompanyName.Items.Count > 0 && dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { for (int j = 0; j < lstAssignCompanyName.Items.Count; j++) { if (dt.Rows[i]["COMPANY_ID"].ToString() == lstAssignCompanyName.Items[j].Value) { dt.Rows[i].Delete(); break; } } } } lstCompanyName.DataSource = dt; lstCompanyName.DataBind(); }
private void bindCountryCombo(RadComboBox sender, DataSet source) { objBindCombo = new BindCombo(); sender.Items.Clear(); sender.ClearSelection(); sender.DataTextField = "COUNTRY_NAME"; sender.DataValueField = "COUNTRY_ID"; if (source != null) sender.DataSource = source; else sender.DataSource = objBindCombo.GetAirLine(); sender.DataBind(); sender.Items.Insert(0, new RadComboBoxItem("", "0")); sender.SelectedValue = "0"; }
protected void Page_PreRender(object sender, EventArgs e) { objAuthorizationBDto = (AuthorizationBDto)Session[PageConstants.ssnUserAuthorization]; if (objAuthorizationBDto != null) { if (!objAuthorizationBDto.ProgramWriteAccess) { } } if (!IsPostBack) { objBindCombo = new BindCombo(); DataSet dsCountry = objBindCombo.GetCountryKeyValue(); DataSet dsregion = objBindCombo.GetRegionKeyValue(); BindRegionCombo(radAirline, dsregion); bindCountryCombo(radCmbDestination, dsCountry); } }
protected void radgrdContact_ItemDataBound(object sender, GridItemEventArgs e) { try { if (e.Item.ItemType == GridItemType.Header) { CheckBox chkBox = (CheckBox)e.Item.FindControl("chkHeadWrtCt"); if (chkBox != null) chkBox.Attributes.Add("onclick", string.Format("HeaderCheckBox_Click('{0}',{1},'{2}')", radgrdContact.ClientID, 0, chkBox.ClientID)); } if (e.Item is GridDataItem) { CheckBox chkBox = (CheckBox)e.Item.FindControl("chkItemWrtCt"); if (chkBox != null) chkBox.Attributes.Add("onclick", string.Format("RowCheckBox_Click('{0}',{1},'{2}')", radgrdContact.ClientID, chkBox.ClientID, e.Item.ItemIndex)); } if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem editForm = (GridEditableItem)e.Item; RadComboBox radcombo = (RadComboBox)editForm.FindControl("lblGrdContTitleEdit"); string ItemValue = string.Empty; BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetTitle(); radcombo.DataSource = DsCmb; radcombo.DataTextField = "TITLE_DESC"; radcombo.DataValueField = "TITLE_ID"; radcombo.DataBind(); objCmbBind = null; DsCmb = null; // Note : Assigning selected value to dropdown list Label lblTitleId = (Label)editForm.FindControl("lblGrdContTitleIdEdit"); radcombo.SelectedValue = lblTitleId.Text; } } catch (Exception ex) { throw ex; } }
//#region btnDeleteAirport_Click //protected void btnDeleteAirport_Click(object sender, EventArgs e) //{ // try // { // int serialNo = 0; // ImageButton imgbtnDetailDelete = (ImageButton)sender; // if (imgbtnDetailDelete != null) // Int32.TryParse(imgbtnDetailDelete.CommandArgument, out serialNo); // objAirlineMapDal = new AirlineMapDal(); // int result = objAirlineMapDal.DeleteAirportBySrNo(serialNo); // if (result == 1) // { // Master.DisplayMessage(ConfigurationSettings.AppSettings[SuccessMessage.Delete].ToString()); // Master.MessageCssClass = "successMessage"; // BindAirportGrid(); // } // else if (result == 547) // { // Master.DisplayMessage(ConfigurationSettings.AppSettings[FailureMessage.Delete].ToString()); // Master.MessageCssClass = "errorMessage"; // } // else // { // Master.DisplayMessage(ConfigurationSettings.AppSettings[FailureMessage.Delete].ToString()); // Master.MessageCssClass = "errorMessage"; // } // } // catch (Exception ex) // { // bool rethrow = ExceptionPolicy.HandleException(ex, DALHelper.DAL_EXP_POLICYNAME); // if (rethrow) // { throw ex; } // } //} //#endregion #endregion #region Method private void BindRegionCombo(RadComboBox sender, DataSet source) { objBindCombo = new BindCombo(); sender.Items.Clear(); sender.ClearSelection(); sender.DataTextField = "REGION_LONG_NAME"; sender.DataValueField = "REGION_ID"; if (source != null) sender.DataSource = source; else sender.DataSource = objBindCombo.GetCityKeyValue(0, 0); sender.DataBind(); sender.Items.Insert(0, new RadComboBoxItem("", "0")); sender.SelectedValue = "0"; }
private void BindCountryCombo(RadComboBox sender) { objBindCombo = new BindCombo(); sender.Items.Clear(); sender.ClearSelection(); sender.DataTextField = "COUNTRY_NAME"; sender.DataValueField = "COUNTRY_ID"; sender.DataSource = objBindCombo.GetCountryKeyValue(); sender.DataBind(); sender.Items.Insert(0, new RadComboBoxItem("", "0")); sender.SelectedValue = "0"; }
private void BindQualification() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetQualificationKeyValue(); ; radCmbQualificationAdd.DataSource = DsCmb; radCmbQualificationAdd.DataTextField = "QUALIFICATION_NAME"; radCmbQualificationAdd.DataValueField = "QUALIFICATION_ID"; radCmbQualificationAdd.DataBind(); objCmbBind = null; DsCmb = null; radCmbQualificationAdd.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindUnderWhome(String Type) { radCmbUnderWhome.ClearSelection(); radCmbUnderWhome.Text = ""; BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetCompanyNameType(Type); radCmbUnderWhome.DataSource = DsCmb; radCmbUnderWhome.DataTextField = "COMPANY_NAME"; radCmbUnderWhome.DataValueField = "COMPANY_ID"; radCmbUnderWhome.DataBind(); objCmbBind = null; DsCmb = null; radCmbUnderWhome.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindTitle() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetTitle(); radCmbTitle.DataSource = DsCmb; radCmbTitle.DataTextField = "TITLE_DESC"; radCmbTitle.DataValueField = "TITLE_ID"; radCmbTitle.DataBind(); objCmbBind = null; DsCmb = null; radCmbTitle.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindCity(int CountryId, int StateId) { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetCityKeyValue(CountryId, StateId); radCmbCity.Items.Clear(); radCmbCity.DataSource = DsCmb; radCmbCity.DataTextField = "CITY_NAME"; radCmbCity.DataValueField = "CITY_ID"; radCmbCity.DataBind(); objCmbBind = null; DsCmb = null; radCmbCity.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindRegion() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetRegionKeyValue(); radCmbRegion.DataSource = DsCmb; radCmbRegion.DataTextField = "REGION_LONG_NAME"; radCmbRegion.DataValueField = "REGION_ID"; radCmbRegion.DataBind(); objCmbBind = null; DsCmb = null; radCmbRegion.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindState(int CountryId) { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetStateKeyValue(CountryId); radCmbState.Items.Clear(); radCmbState.DataSource = DsCmb; radCmbState.DataTextField = "STATE_NAME"; radCmbState.DataValueField = "STATE_ID"; radCmbState.DataBind(); objCmbBind = null; DsCmb = null; radCmbState.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindCountry() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetCountryKeyValue(); radCmbCountry.Items.Clear(); radCmbCountry.DataSource = DsCmb; radCmbCountry.DataTextField = "COUNTRY_NAME"; radCmbCountry.DataValueField = "COUNTRY_ID"; radCmbCountry.DataBind(); objCmbBind = null; DsCmb = null; radCmbCountry.Items.Insert(0, new RadComboBoxItem("", "0")); }
private void BindSecurityQuestion() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetSecurityQuestion(""); radCmbEditSecurityQuestion.DataSource = DsCmb; radCmbEditSecurityQuestion.DataTextField = "SECURITY_QUESTION_DESC"; radCmbEditSecurityQuestion.DataValueField = "SECURITY_QUESTION_ID"; radCmbEditSecurityQuestion.DataBind(); objCmbBind = null; DsCmb = null; radCmbEditSecurityQuestion.Items.Insert(0, new RadComboBoxItem("", "0")); }
/// <summary> /// Bind customer grid /// </summary> private void BindGrid() { objBindCombo = new BindCombo(); DataSet dsRoleMapping = objBindCombo.GetRoleKeyValue(); radgrdRoleAccess.DataSource = dsRoleMapping; radgrdRoleAccess.DataBind(); ViewState[vsRoleName] = dsRoleMapping; }
private void BindAssignDepartment_ByCompanyId(int CmpId) { BindCombo objCmbBind = new BindCombo(); DataSet ds = null; ds = objCmbBind.GetCompanyDepartmentMap(CmpId); lstAssignDeptName.Items.Clear(); lstAssignDeptName.ClearSelection(); lstAssignDeptName.DataTextField = "DEPARTMENT_NAME"; lstAssignDeptName.DataValueField = "DEPARTMENT_ID"; lstAssignDeptName.DataSource = ds; lstAssignDeptName.DataBind(); ViewState["vsAssignedDepartment"] = ds.Tables[0]; }
private void BindModuleList() { objBindCombo = new BindCombo(); lstModuleName.Items.Clear(); lstModuleName.ClearSelection(); lstModuleName.DataTextField = "MODULE_NAME"; lstModuleName.DataValueField = "MODULE_ID"; DataSet ds = new DataSet(); DataTable dt = new DataTable(); ds = objBindCombo.GetModuleKeyValue(); dt = ds.Tables[0]; if (lstAssignModuleName.Items.Count > 0 && dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { for (int j = 0; j < lstAssignModuleName.Items.Count; j++) { if (dt.Rows[i]["MODULE_ID"].ToString() == lstAssignModuleName.Items[j].Value) { dt.Rows[i].Delete(); break; } } } } lstModuleName.DataSource = dt; lstModuleName.DataBind(); }
private void BindCompanyList() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DataTable dt = new DataTable(); DsCmb = objCmbBind.GetDepartmentKeyValue(""); dt = DsCmb.Tables[0]; lstDepartmentName.DataSource = dt; lstDepartmentName.DataTextField = "DEPARTMENT_NAME"; lstDepartmentName.DataValueField = "DEPARTMENT_ID"; lstDepartmentName.DataBind(); objCmbBind = null; DsCmb = null; if (lstAssignDeptName.Items.Count > 0 && dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { for (int j = 0; j < lstAssignDeptName.Items.Count; j++) { if (dt.Rows[i]["DEPARTMENT_ID"].ToString() == lstAssignDeptName.Items[j].Value) { dt.Rows[i].Delete(); break; } } } } lstDepartmentName.DataSource = dt; lstDepartmentName.DataBind(); }
private void BindStateCombo(RadComboBox sender, int contryId) { objBindCombo = new BindCombo(); sender.Items.Clear(); sender.ClearSelection(); sender.DataTextField = "STATE_NAME"; sender.DataValueField = "STATE_ID"; sender.DataSource = objBindCombo.GetStateKeyValue(contryId); sender.DataBind(); sender.Items.Insert(0, new RadComboBoxItem("", "0")); sender.SelectedValue = "0"; }
private void BindMaritalStatus() { BindCombo objCmbBind = new BindCombo(); DataSet DsCmb = null; DsCmb = objCmbBind.GetMaritalStatus(); radCmbMaritalStatusAdd.DataSource = DsCmb; radCmbMaritalStatusAdd.DataTextField = "MARITAL_STATUS_NAME"; radCmbMaritalStatusAdd.DataValueField = "MARITAL_STATUS_ID"; radCmbMaritalStatusAdd.DataBind(); objCmbBind = null; DsCmb = null; radCmbMaritalStatusAdd.Items.Insert(0, new RadComboBoxItem("", "0")); }