Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <Data.SecurityQuestion> securityQuestions = new SecurityQuestionService().GetAll();

                SecurityQuestionList.DataSource = ListConverter.ToDataTable(securityQuestions);
                SecurityQuestionList.DataBind();

                if (CurrentUser != null)
                {
                    if (!String.IsNullOrEmpty(CurrentUser.PasswordQuestion))
                    {
                        if (securityQuestions.Exists(delegate(Data.SecurityQuestion a) { return(a.Question == CurrentUser.PasswordQuestion); }))
                        {
                            Data.SecurityQuestion selectedQuestion = new Data.SecurityQuestion();
                            selectedQuestion = securityQuestions.Find(delegate(Data.SecurityQuestion a) { return(a.Question == CurrentUser.PasswordQuestion); });
                            string[] secQuestion = { selectedQuestion.Question };
                            SecurityQuestionList.SetSelectedItems(secQuestion);
                        }
                    }
                }
            }
        }
 public void Update(Data.SecurityQuestion entity, int LoggedInUserId, int LoggedInOrganizationId)
 {
     base.Update(entity);
     _unitOfWork.Save();
 }
 public void Add(Data.SecurityQuestion entity, int LoggedInUserId, int LoggedInOrganizationId)
 {
     base.Insert(entity);
 }