Example #1
0
 private void LoadMeasureCode()
 {
     try
     {
         dtMeasureCode                 = XMLBo.GetMeasureCode(path, "GD");
         ddlMeasureCode.DataSource     = dtMeasureCode;
         ddlMeasureCode.DataTextField  = "Measure";
         ddlMeasureCode.DataValueField = "MeasureCode";
         ddlMeasureCode.DataBind();
         ddlMeasureCode.Items.Insert(0, new ListItem("Select a Measure Code", "Select a Measure Code"));
     }
     catch (BaseApplicationException Ex)
     {
         throw Ex;
     }
     catch (Exception Ex)
     {
         BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
         NameValueCollection      FunctionInfo = new NameValueCollection();
         FunctionInfo.Add("Method", "PortfolioGoldEntry.ascx:LoadMeasureCode()");
         object[] objects = new object[1];
         objects[0]   = path;
         FunctionInfo = exBase.AddObject(FunctionInfo, objects);
         exBase.AdditionalInformation = FunctionInfo;
         ExceptionManager.Publish(exBase);
         throw exBase;
     }
 }
Example #2
0
        private void BindDropDowns(PropertyVo propertyVo, CustomerAccountsVo customerAccountsVo, string path)
        {
            try
            {
                userVo                        = (UserVo)Session["userVo"];
                customerVo                    = (CustomerVo)Session["CustomerVo"];
                dtMeasureCode                 = XMLBo.GetMeasureCode(path, AssetGroupCode);
                ddlMeasureCode.DataSource     = dtMeasureCode;
                ddlMeasureCode.DataTextField  = "Measure";
                ddlMeasureCode.DataValueField = "MeasureCode";
                ddlMeasureCode.DataBind();
                ddlMeasureCode.Items.Insert(0, new ListItem("Select a Measure Code", "Select a Measure Code"));

                // Bind the Instrument Category for an Asset
                dsInstrumentCategory            = assetBo.GetAssetInstrumentCategory(AssetGroupCode);
                ddlInstrumentCat.DataSource     = dsInstrumentCategory.Tables[0];
                ddlInstrumentCat.DataTextField  = "PAIC_AssetInstrumentCategoryName";
                ddlInstrumentCat.DataValueField = "PAIC_AssetInstrumentCategoryCode";
                ddlInstrumentCat.DataBind();
                ddlInstrumentCat.Items.Insert(0, new ListItem("Select an Instrument Category", "Select an Instrument Category"));

                ddlInstrumentSubCat.Items.Clear();


                // Bind State Drop Downs
                dtStates                = XMLBo.GetStates(path);
                ddlState.DataSource     = dtStates;
                ddlState.DataTextField  = "StateName";
                ddlState.DataValueField = "StateCode";
                ddlState.DataBind();
                ddlState.Items.Insert(0, new ListItem("Select a State", "Select a State"));
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "PortfolioPropertyEntry.ascx:BindDropDowns()");
                object[] objects = new object[5];
                objects[0]   = userVo;
                objects[1]   = propertyVo;
                objects[2]   = customerAccountsVo;
                objects[3]   = path;
                objects[4]   = customerVo;
                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }