public void LoadFrequencyCode(string path) { DataTable dt = assetBo.GetFrequencyCode(path); ddlSIFrequencyCode.DataSource = dt; ddlSIFrequencyCode.DataTextField = dt.Columns["WF_Frequency"].ToString(); ddlSIFrequencyCode.DataValueField = dt.Columns["WF_FrequencyCode"].ToString(); ddlSIFrequencyCode.DataBind(); ddlCIInterestFrequencyCode.DataSource = dt; ddlCIInterestFrequencyCode.DataTextField = dt.Columns["WF_Frequency"].ToString(); ddlCIInterestFrequencyCode.DataValueField = dt.Columns["WF_FrequencyCode"].ToString(); ddlCIInterestFrequencyCode.DataBind(); }
/// <summary> /// Binds all the Dropdowns with the necessary data /// </summary> private void BindDropDowns(string path) { userVo = (UserVo)Session["userVo"]; customerVo = (CustomerVo)Session["CustomerVo"]; portfolioId = int.Parse(Session[SessionContents.PortfolioId].ToString()); //Bind the Systematic Transaction Types to dropdown dtSystematicTransactionType = XMLBo.GetSystematicTransactionType(path); ddlSystematicType.DataSource = dtSystematicTransactionType; ddlSystematicType.DataTextField = "SystematicType"; ddlSystematicType.DataValueField = "SystemationTypeCode"; ddlSystematicType.DataBind(); ddlSystematicType.Items.Insert(0, "Select a Transaction Type"); // Bind the Frequency to dropdown dtFrequency = assetBo.GetFrequencyCode(path); ddlFrequency.DataSource = dtFrequency; ddlFrequency.DataTextField = "Frequency"; ddlFrequency.DataValueField = "FrequencyCode"; ddlFrequency.DataBind(); ddlFrequency.Items.Insert(0, "Select Frequency"); //Bind the Customer Account Details to dropdown if (schemePlanCode != 0) { dsCustomerMFAccounts = customerAccountBo.GetCustomerMFAccounts(portfolioId, AssetGroupCode, schemePlanCode); } else { dsCustomerMFAccounts = customerAccountBo.GetCustomerMFAccounts(portfolioId, AssetGroupCode, 0); } ddlMFAccount.DataSource = dsCustomerMFAccounts.Tables[0]; ddlMFAccount.DataTextField = "CMFA_FolioNum"; ddlMFAccount.DataValueField = "CMFA_AccountId"; ddlMFAccount.DataBind(); ddlMFAccount.Items.Insert(0, "Select a Folio"); }
private void BindDropDownLists() { AssetBo assetBo = new AssetBo(); DataTable dtInterestBasis = new DataTable(); DataSet dsInstrumentCategory = new DataSet(); DataTable dtDebtIssuer = new DataTable(); DataTable dtFrequency = new DataTable(); string xmlLookUpPath = ""; try { xmlLookUpPath = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString()); // Bind the drop down with values from the XML dtInterestBasis = assetBo.GetInterestBasis(xmlLookUpPath); ddlInterestBasis.DataSource = dtInterestBasis; ddlInterestBasis.DataTextField = "WIB_InterestBasis"; ddlInterestBasis.DataValueField = "WIB_InterestBasisCode"; ddlInterestBasis.DataBind(); ddlInterestBasis.Items.Insert(0, "Select an Interest Basis"); dsInstrumentCategory = assetBo.GetAssetInstrumentCategory(assetGroupCode); ddlAssetIC.DataSource = dsInstrumentCategory.Tables[0]; ddlAssetIC.DataTextField = "PAIC_AssetInstrumentCategoryName"; ddlAssetIC.DataValueField = "PAIC_AssetInstrumentCategoryCode"; ddlAssetIC.DataBind(); ddlAssetIC.Items.Insert(0, "Select an Asset Instrument Category"); dtDebtIssuer = assetBo.GetDebtIssuerCode(xmlLookUpPath); ddlDebtIssuer.DataSource = dtDebtIssuer; ddlDebtIssuer.DataTextField = "WDI_DebtIssuerName"; ddlDebtIssuer.DataValueField = "WDI_DebtIssuerCode"; ddlDebtIssuer.DataBind(); ddlDebtIssuer.Items.Insert(0, "Select a Debt Issuer"); dtFrequency = assetBo.GetFrequencyCode(xmlLookUpPath); ddlCIFrequency.DataSource = dtFrequency; ddlCIFrequency.DataTextField = "WF_Frequency"; ddlCIFrequency.DataValueField = "WF_FrequencyCode"; ddlCIFrequency.DataBind(); ddlCIFrequency.Items.Insert(0, "Select a Compounding Frequency"); ddlIPFrequency.DataSource = dtFrequency; ddlIPFrequency.DataTextField = "WF_Frequency"; ddlIPFrequency.DataValueField = "WF_FrequencyCode"; ddlIPFrequency.DataBind(); ddlIPFrequency.Items.Insert(0, "Select an Interest Payout Frequency"); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "PortfolioCashSavingsEdit.ascx.cs:BindDropDownLists()"); object[] objects = new object[2]; objects[0] = xmlLookUpPath; objects[1] = assetGroupCode; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } }