Пример #1
0
        public bool CheckEmailExist(string email)
        {
            DataSet dsLogin = _regDal.GetStudentbyEmail(email);

            if (dsLogin.Tables[0].Rows.Count > 0)
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        protected void btnForgotPwd_Click(object sender, EventArgs e)
        {
            DataSet ds = objreg.GetStudentbyEmail(txtFPEmailMobile.Text);

            if (ds.Tables[0].Rows.Count < 1)
            {
                Response.Redirect("~/Home.aspx");
            }

            string FullName = ds.Tables[0].Rows[0]["FullName"].ToString();
            string Pwd      = ds.Tables[0].Rows[0]["Password"].ToString();

            SendMails.SendAnEmail(txtFPEmailMobile.Text, SendMails.FORGOTPASSWORD_SUB,
                                  string.Format(SendMails.FORGOTPASSWORD_BODY, FullName, txtFPEmailMobile.Text, Pwd));

            Response.Redirect("~/Home.aspx");
        }