private void BindCategoryDropdown(string prodType) { if (prodType == "MF") { DataSet dsLookupData = commisionReceivableBo.GetCategories(prodType); ////Populating the categories dropdown DataRow drProduct = dsLookupData.Tables[0].NewRow(); drProduct["PAIC_AssetInstrumentCategoryCode"] = "All"; drProduct["PAIC_AssetInstrumentCategoryName"] = "All"; dsLookupData.Tables[0].Rows.InsertAt(drProduct, 0); ddCategory.DataSource = dsLookupData.Tables[0]; ddCategory.DataValueField = dsLookupData.Tables[0].Columns["PAIC_AssetInstrumentCategoryCode"].ToString(); ddCategory.DataTextField = dsLookupData.Tables[0].Columns["PAIC_AssetInstrumentCategoryName"].ToString(); ddCategory.DataBind(); } else { OnlineNCDBackOfficeBo onlineNCDBackOfficeBo = new OnlineNCDBackOfficeBo(); DataTable dtCategory = new DataTable(); dtCategory = onlineNCDBackOfficeBo.BindNcdCategory("SubInstrumentCat", "").Tables[0]; if (dtCategory.Rows.Count > 0) { ddCategory.DataSource = dtCategory; ddCategory.DataValueField = dtCategory.Columns["PAISC_AssetInstrumentSubCategoryCode"].ToString(); ddCategory.DataTextField = dtCategory.Columns["PAISC_AssetInstrumentSubCategoryName"].ToString(); ddCategory.DataBind(); } ddCategory.Items.Insert(0, new ListItem("Select", "0")); } }
private void BindCategoryDropdown(string prodType) { DataSet dsLookupData = commisionReceivableBo.GetCategories(prodType); //Populating the categories dropdown DataRow drProduct = dsLookupData.Tables[0].NewRow(); drProduct["PAIC_AssetInstrumentCategoryCode"] = "All"; drProduct["PAIC_AssetInstrumentCategoryName"] = "All"; dsLookupData.Tables[0].Rows.InsertAt(drProduct, 0); ddCategory.DataSource = dsLookupData.Tables[0]; ddCategory.DataValueField = dsLookupData.Tables[0].Columns["PAIC_AssetInstrumentCategoryCode"].ToString(); ddCategory.DataTextField = dsLookupData.Tables[0].Columns["PAIC_AssetInstrumentCategoryName"].ToString(); ddCategory.DataBind(); }