protected void ddlAssetCategory_SelectedIndexChanged(object sender, EventArgs e) { try { //if (ddlAssetCategory.SelectedIndex != 0) //{ DataSet ds = assetBo.GetAssetInstrumentSubCategory("GI", ddlAssetCategory.SelectedValue); ddlAssetSubCategory.DataSource = ds; ddlAssetSubCategory.DataValueField = ds.Tables[0].Columns["PAISC_AssetInstrumentSubCategoryCode"].ToString(); ddlAssetSubCategory.DataTextField = ds.Tables[0].Columns["PAISC_AssetInstrumentSubCategoryName"].ToString(); ddlAssetSubCategory.DataBind(); ddlAssetSubCategory.Items.Insert(0, new ListItem("Select Asset Sub-Category", "Select Asset Sub-Category")); //} } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioGeneralInsuranceAccountAdd.ascx:ddlAssetCategory_SelectedIndexChanged()"); object[] objects = new object[4]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void BindInstrumentSubCategory(CustomerAccountsVo custAccountsVo) { try { // Bind the Instrument Sub-Category for an Asset Instrument Category dsInstrumentSubCategory = assetBo.GetAssetInstrumentSubCategory(AssetGroupCode, custAccountsVo.AssetCategory.ToString().Trim()); ddlInstrumentSubCat.DataSource = dsInstrumentSubCategory.Tables[0]; ddlInstrumentSubCat.DataTextField = "PAISC_AssetInstrumentSubCategoryName"; ddlInstrumentSubCat.DataValueField = "PAISC_AssetInstrumentSubCategoryCode"; ddlInstrumentSubCat.DataBind(); ddlInstrumentSubCat.Items.Insert(0, new ListItem("Select an Instrument Sub-Category", "Select an Instrument Sub-Category")); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioPropertyEntry.ascx:BindInstrumentSubCategory()"); object[] objects = new object[2]; objects[0] = custAccountsVo; objects[1] = AssetGroupCode; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void loadSubCategory(string productType, string InsturmentCategory) { try { //if (ddlAssetCategory.SelectedIndex != 0) //{ DataSet ds = assetBo.GetAssetInstrumentSubCategory(productType, InsturmentCategory); ddlAssetSubCategory.DataSource = ds; ddlAssetSubCategory.DataValueField = ds.Tables[0].Columns["PAISC_AssetInstrumentSubCategoryCode"].ToString(); ddlAssetSubCategory.DataTextField = ds.Tables[0].Columns["PAISC_AssetInstrumentSubCategoryName"].ToString(); ddlAssetSubCategory.DataBind(); ddlAssetSubCategory.Items.Insert(0, new ListItem("Select Asset Sub-Category", "Select Asset Sub-Category")); //} } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "LifeInsuranceOrderEntry.ascx.cs:ddlInstrumentCategory_OnSelectedIndexChanged()"); object[] objects = new object[4]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void BindDropDowns(PersonalVo personalVo) { try { // Bind the Asset Categories ddlCategory.Items.Clear(); dsAssetCategories = assetBo.GetAssetInstrumentCategory("PI"); ddlCategory.DataSource = dsAssetCategories.Tables[0]; ddlCategory.DataTextField = "PAIC_AssetInstrumentCategoryName".Trim(); ddlCategory.DataValueField = "PAIC_AssetInstrumentCategoryCode".Trim(); ddlCategory.DataBind(); ddlCategory.Items.Insert(0, new ListItem("Select a Category", "Select a Category")); ddlCategory.SelectedValue = personalVo.AssetCategoryCode.ToString().Trim(); // Bind the Asset Sub-Categories based on the selected Categories ddlSubCategory.Items.Clear(); dsAssetSubCategories = assetBo.GetAssetInstrumentSubCategory("PI", ddlCategory.SelectedValue.ToString()); //Change to the respective GroupCode ddlSubCategory.DataSource = dsAssetSubCategories.Tables[0]; ddlSubCategory.DataTextField = "PAISC_AssetInstrumentSubCategoryName"; ddlSubCategory.DataValueField = "PAISC_AssetInstrumentSubCategoryCode"; ddlSubCategory.DataBind(); ddlSubCategory.Items.Insert(0, new ListItem("Select a Sub-Category", "Select a Sub-Category")); ddlSubCategory.SelectedValue = personalVo.AssetSubCategoryCode.ToString().Trim(); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioPersonalEntry.ascx:BindDropDowns()"); object[] objects = new object[1]; objects[0] = personalVo; FunctionInfo = exBase.AddObject(FunctionInfo, null);/*, objects*/ exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }
private void loadSubCategory(string productType, string InsturmentCategory) { try { DataSet ds = assetBo.GetAssetInstrumentSubCategory(productType, InsturmentCategory); ddlSubCategory.DataSource = ds; ddlSubCategory.DataValueField = ds.Tables[0].Columns["PAISC_AssetInstrumentSubCategoryCode"].ToString(); ddlSubCategory.DataTextField = ds.Tables[0].Columns["PAISC_AssetInstrumentSubCategoryName"].ToString(); ddlSubCategory.DataBind(); ddlSubCategory.Items.Insert(0, new ListItem("Select", "0")); } catch (BaseApplicationException Ex) { throw Ex; } }