Exemple #1
0
        private void BindDropDowns(string path)
        {
            dtMaritalStatus                 = XMLBo.GetMaritalStatus(path);
            ddlMaritalStatus.DataSource     = dtMaritalStatus;
            ddlMaritalStatus.DataTextField  = "MaritalStatus";
            ddlMaritalStatus.DataValueField = "MaritalStatusCode";
            ddlMaritalStatus.DataBind();
            ddlMaritalStatus.Items.Insert(0, new ListItem("Select a Status", "Select a Status"));

            dtNationality                 = XMLBo.GetNationality(path);
            ddlNationality.DataSource     = dtNationality;
            ddlNationality.DataTextField  = "Nationality";
            ddlNationality.DataValueField = "NationalityCode";
            ddlNationality.DataBind();
            ddlNationality.Items.Insert(0, new ListItem("Select a Nationality", "Select a Nationality"));

            dtOccupation                 = XMLBo.GetOccupation(path);
            ddlOccupation.DataSource     = dtOccupation;
            ddlOccupation.DataTextField  = "Occupation";
            ddlOccupation.DataValueField = "OccupationCode";
            ddlOccupation.DataBind();
            ddlOccupation.Items.Insert(0, new ListItem("Select an Occupation", "Select a Occupation"));

            dtQualification                 = XMLBo.GetQualification(path);
            ddlQualification.DataSource     = dtQualification;
            ddlQualification.DataTextField  = "Qualification";
            ddlQualification.DataValueField = "QualificationCode";
            ddlQualification.DataBind();
            ddlQualification.Items.Insert(0, new ListItem("Select a Qualification", "Select a Qualification"));

            dtStates = XMLBo.GetStates(path);
            ddlCorrAdrState.DataSource     = dtStates;
            ddlCorrAdrState.DataTextField  = "StateName";
            ddlCorrAdrState.DataValueField = "StateCode";
            ddlCorrAdrState.DataBind();
            ddlCorrAdrState.Items.Insert(0, new ListItem("Select a State", "Select a State"));

            ddlPermAdrState.DataSource     = dtStates;
            ddlPermAdrState.DataTextField  = "StateName";
            ddlPermAdrState.DataValueField = "StateCode";
            ddlPermAdrState.DataBind();
            ddlPermAdrState.Items.Insert(0, new ListItem("Select a State", "Select a State"));

            ddlOfcAdrState.DataSource     = dtStates;
            ddlOfcAdrState.DataTextField  = "StateName";
            ddlOfcAdrState.DataValueField = "StateCode";
            ddlOfcAdrState.DataBind();
            ddlOfcAdrState.Items.Insert(0, new ListItem("Select a State", "Select a State"));
        }
        private void BindDropDowns(string path)
        {
            AdvisorVo advisorVo = new AdvisorVo();

            try
            {
                dtState = commonLookupBo.GetWERPLookupMasterValueList(14000, 0);

                ddlCorrAdrState.DataSource     = dtState;
                ddlCorrAdrState.DataTextField  = "WCMV_Name";
                ddlCorrAdrState.DataValueField = "WCMV_LookupId";
                ddlCorrAdrState.DataBind();
                ddlCorrAdrState.Items.Insert(0, new ListItem("--SELECT--", "0"));

                ddlPermAdrState.DataSource     = dtState;
                ddlPermAdrState.DataTextField  = "WCMV_Name";
                ddlPermAdrState.DataValueField = "WCMV_LookupId";
                ddlPermAdrState.DataBind();
                ddlPermAdrState.Items.Insert(0, new ListItem("--SELECT--", "0"));

                dtOccupation                 = commonLookupBo.GetWERPLookupMasterValueList(3000, 0);
                ddlOccupation.DataSource     = dtOccupation;
                ddlOccupation.DataTextField  = "WCMV_Name";
                ddlOccupation.DataValueField = "WCMV_LookupId";
                ddlOccupation.DataBind();
                ddlOccupation.Items.Insert(0, new ListItem("--SELECT--", "0"));

                dtNationality                 = XMLBo.GetNationality(path);
                ddlNationality.DataSource     = dtNationality;
                ddlNationality.DataTextField  = "Nationality";
                ddlNationality.DataValueField = "NationalityCode";
                ddlNationality.DataBind();
                ddlNationality.Items.Insert(0, new ListItem("Select a Nationality", "Select a Nationality"));

                dtCity = commonLookupBo.GetWERPLookupMasterValueList(8000, 0);

                ddlCorrAdrCity.DataSource     = dtCity;
                ddlCorrAdrCity.DataTextField  = "WCMV_Name";
                ddlCorrAdrCity.DataValueField = "WCMV_LookupId";
                ddlCorrAdrCity.DataBind();
                ddlCorrAdrCity.Items.Insert(0, new ListItem("--SELECT--", "0"));

                ddlPermAdrCity.DataSource     = dtCity;
                ddlPermAdrCity.DataTextField  = "WCMV_Name";
                ddlPermAdrCity.DataValueField = "WCMV_LookupId";
                ddlPermAdrCity.DataBind();
                ddlPermAdrCity.Items.Insert(0, new ListItem("--SELECT--", "0"));


                if (customerVo.Type == null || customerVo.Type.ToUpper().ToString() == "IND")
                {
                    dtCustomerSubType = XMLBo.GetCustomerSubType(path, "IND");
                }
                else
                {
                    dtCustomerSubType = XMLBo.GetCustomerSubType(path, "NIND");
                }
                //ddlCustomerSubType.DataSource = dtCustomerSubType;
                //ddlCustomerSubType.DataTextField = "CustomerTypeName";
                //ddlCustomerSubType.DataValueField = "CustomerSubTypeCode";
                //ddlCustomerSubType.DataBind();
                //ddlCustomerSubType.SelectedValue = customerVo.SubType;
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }

            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "EditCustomerIndividualProfile.ascx:BindDropDowns()");

                object[] objects = new object[0];

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
        private void BindDropDowns()
        {
            AdvisorVo advisorVo = new AdvisorVo();

            try
            {
                dtMaritalStatus                 = XMLBo.GetMaritalStatus(path);
                ddlMaritalStatus.DataSource     = dtMaritalStatus;
                ddlMaritalStatus.DataTextField  = "MaritalStatus";
                ddlMaritalStatus.DataValueField = "MaritalStatusCode";
                ddlMaritalStatus.DataBind();
                ddlMaritalStatus.Items.Insert(0, new ListItem("Select a Status", "Select a Status"));

                dtNationality                 = XMLBo.GetNationality(path);
                ddlNationality.DataSource     = dtNationality;
                ddlNationality.DataTextField  = "Nationality";
                ddlNationality.DataValueField = "NationalityCode";
                ddlNationality.DataBind();
                ddlNationality.Items.Insert(0, new ListItem("Select a Nationality", "Select a Nationality"));

                dtOccupation                 = XMLBo.GetOccupation(path);
                ddlOccupation.DataSource     = dtOccupation;
                ddlOccupation.DataTextField  = "Occupation";
                ddlOccupation.DataValueField = "OccupationCode";
                ddlOccupation.DataBind();
                ddlOccupation.Items.Insert(0, new ListItem("Select a Occupation", "Select a Occupation"));

                dtQualification                 = XMLBo.GetQualification(path);
                ddlQualification.DataSource     = dtQualification;
                ddlQualification.DataTextField  = "Qualification";
                ddlQualification.DataValueField = "QualificationCode";
                ddlQualification.DataBind();
                ddlQualification.Items.Insert(0, new ListItem("Select a Qualification", "Select a Qualification"));

                dtState = XMLBo.GetStates(path);

                ddlCorrAdrState.DataSource     = dtState;
                ddlCorrAdrState.DataTextField  = "StateName";
                ddlCorrAdrState.DataValueField = "StateCode";
                ddlCorrAdrState.DataBind();
                ddlCorrAdrState.Items.Insert(0, new ListItem("Select a State", "Select a State"));

                ddlPermAdrState.DataSource     = dtState;
                ddlPermAdrState.DataTextField  = "StateName";
                ddlPermAdrState.DataValueField = "StateCode";
                ddlPermAdrState.DataBind();
                ddlPermAdrState.Items.Insert(0, new ListItem("Select a State", "Select a State"));

                ddlOfcAdrState.DataSource     = dtState;
                ddlOfcAdrState.DataTextField  = "StateName";
                ddlOfcAdrState.DataValueField = "StateCode";
                ddlOfcAdrState.DataBind();
                ddlOfcAdrState.Items.Insert(0, new ListItem("Select a State", "Select a State"));

                if (customerVo.Type.ToUpper().ToString() == "IND")
                {
                    dtCustomerSubType = XMLBo.GetCustomerSubType(path, "IND");
                }
                else
                {
                    dtCustomerSubType = XMLBo.GetCustomerSubType(path, "NIND");
                }
                ddlCustomerSubType.DataSource     = dtCustomerSubType;
                ddlCustomerSubType.DataTextField  = "CustomerTypeName";
                ddlCustomerSubType.DataValueField = "CustomerSubTypeCode";
                ddlCustomerSubType.DataBind();
                ddlCustomerSubType.SelectedValue = customerVo.SubType;
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }

            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "EditCustomerIndividualProfile.ascx:BindDropDowns()");

                object[] objects = new object[0];

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }