Beispiel #1
0
        protected void BindData()
        {
            try
            {
                ListItem blankListItem = new ListItem();

                SPWeb web = SPContext.Current.Web;

                BLL.EPSBLL ePSBLL = new CAFAM.WebPortal.BLL.EPSBLL(web);

                ddlEPS.DataSource = ePSBLL.GetEPSList();
                ddlEPS.DataTextField = "Title";
                ddlEPS.DataValueField = "Title";
                ddlEPS.DataBind();
                ddlEPS.Items.Insert(0, blankListItem);

                BLL.SecurityQuestionBLL securityQuestionBLL = new CAFAM.WebPortal.BLL.SecurityQuestionBLL(web);

                ddlSecurityQuestion.DataSource = securityQuestionBLL.GetSecurityQuestionList();
                ddlSecurityQuestion.DataTextField = "Title";
                ddlSecurityQuestion.DataValueField = "Title";
                ddlSecurityQuestion.DataBind();
                ddlSecurityQuestion.Items.Insert(ddlSecurityQuestion.Items.Count, new ListItem("Otra pregunta", ""));

                BLL.TopicOfInterestBLL topicOfInterestBLL = new BLL.TopicOfInterestBLL(web);

                chkListTopicOfInterest.DataSource = topicOfInterestBLL.GetTopicOfInterestList();
                chkListTopicOfInterest.DataTextField = "Title";
                chkListTopicOfInterest.DataValueField = "Title";
                chkListTopicOfInterest.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void BindData()
        {
            try
            {
                ListItem blankListItem = new ListItem();

                SPWeb web = SPContext.Current.Web;

                BLL.MaritalStateBLL maritalStateBLL = new CAFAM.WebPortal.BLL.MaritalStateBLL(web);

                rdlMaritalState.DataSource = maritalStateBLL.GetMaritalStateList();
                rdlMaritalState.DataTextField = "Title";
                rdlMaritalState.DataValueField = "Title";
                rdlMaritalState.DataBind();
                rdlMaritalState.Items[0].Selected = true;

                BLL.OccupationBLL occupationBLL = new CAFAM.WebPortal.BLL.OccupationBLL(web);
                ddlOccupation.DataSource = occupationBLL.GetOccupationList();
                ddlOccupation.DataTextField = "Title";
                ddlOccupation.DataValueField = "Title";
                ddlOccupation.DataBind();

                BLL.CompensationFundBLL compensationFundBLL = new CAFAM.WebPortal.BLL.CompensationFundBLL(web);

                ddlCompensationFund.DataSource = compensationFundBLL.GetCompensationFundList();
                ddlCompensationFund.DataTextField = "Title";
                ddlCompensationFund.DataValueField = "Title";
                ddlCompensationFund.DataBind();
                ddlCompensationFund.Items.Insert(0, new ListItem("Ninguno", ""));

                BLL.EPSBLL ePSBLL = new CAFAM.WebPortal.BLL.EPSBLL(web);

                ddlEPS.DataSource = ePSBLL.GetEPSList();
                ddlEPS.DataTextField = "Title";
                ddlEPS.DataValueField = "Title";
                ddlEPS.DataBind();
                ddlEPS.Items.Insert(0, new ListItem("Ninguno", ""));

                BLL.IncomeLevelBLL incomeLevelBLL = new CAFAM.WebPortal.BLL.IncomeLevelBLL(web);

                ddlIncomeLevel.DataSource = incomeLevelBLL.GetIncomeLevelList();
                ddlIncomeLevel.DataTextField = "Title";
                ddlIncomeLevel.DataValueField = "Value";
                ddlIncomeLevel.DataBind();
                ddlIncomeLevel.Items.Insert(0, blankListItem);

                BLL.SecurityQuestionBLL securityQuestionBLL = new CAFAM.WebPortal.BLL.SecurityQuestionBLL(web);

                ddlSecurityQuestion.DataSource = securityQuestionBLL.GetSecurityQuestionList();
                ddlSecurityQuestion.DataTextField = "Title";
                ddlSecurityQuestion.DataValueField = "Title";
                ddlSecurityQuestion.DataBind();
                ddlSecurityQuestion.Items.Insert(ddlSecurityQuestion.Items.Count, new ListItem("Otra pregunta", ""));

                BLL.TopicOfInterestBLL topicOfInterestBLL = new BLL.TopicOfInterestBLL(web);

                chkListTopicOfInterest.DataSource = topicOfInterestBLL.GetTopicOfInterestList();
                chkListTopicOfInterest.DataTextField = "Title";
                chkListTopicOfInterest.DataValueField = "Title";
                chkListTopicOfInterest.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    BLL.SecurityQuestionBLL securityQuestionBLL = new CAFAM.WebPortal.BLL.SecurityQuestionBLL(SPContext.Current.Web);

                    ddlSecurityQuestion.DataSource = securityQuestionBLL.GetSecurityQuestionList();
                    ddlSecurityQuestion.DataTextField = "Title";
                    ddlSecurityQuestion.DataValueField = "Title";
                    ddlSecurityQuestion.DataBind();
                    ddlSecurityQuestion.Items.Insert(ddlSecurityQuestion.Items.Count, new ListItem("Otra pregunta", ""));
                }
            }
            catch (Exception Ex)
            {
                CAFAM.WebPortal.ErrorLogger.ErrorLogger.Log(Ex, ref lblMessage, ConfigurationSettings.AppSettings["LogInEventViewer"]);
            }
        }