示例#1
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            try
            {
                Session["ZOYALUSER"] = null;
                // string productid = Request.QueryString["id"].ToString();
                // DataTable dt_product = BLL.GETPRODUCTBYID(productid);
                USERS obj = new USERS();
                obj.USER_EMAILID = txt_username.Text.ToString().Trim();
                obj.USER_PASSWORD = txt_password.Text.ToString().Trim();

                DataTable dt_user = new DataTable();

                dt_user = BLL.LOGIN(obj);
                if (dt_user.Rows.Count > 0)
                {
                    Session["ZOYALUSER"] = dt_user;
                    BLL.ShowMessage(this, "YOUR ACCOUNT SUCCESSFULLY LOGIN");
                    //Session["CART"] = dt_product;

                }
                else
                {
                    BLL.ShowMessage(this, "incorrect email or password");
                }

            }
            catch (Exception ex)
            {

            }
        }
示例#2
0
        //FUNCTION TO CHECK USER EXISIST ALREADY OR NOT
        internal static DataTable checkusers(USERS obj)
        {
            DataTable dt = new DataTable();
            try
            {
                dt = BLL.ExecuteQuery("EXEC USP_USERLOGIN @OPERATION='CHECKEMAIL',@USER_EMAILID='"+ obj.USER_EMAILID +"'");
            }
            catch(Exception ex)
            {

            }
            return dt;
        }
示例#3
0
        protected void btn_signup_Click(object sender, EventArgs e)
        {
            try
            {
                USERS obj = new USERS();
                obj.USER_FIRSTNAME = BLL.ReplaceQuote(txt_fullname.Text);
                obj.USER_EMAILID = BLL.ReplaceQuote(txt_email.Text);
                obj.USER_USERNAME = BLL.ReplaceQuote(txt_email.Text);
                obj.USER_PASSWORD = BLL.Encrypt(BLL.ReplaceQuote(txt_pwd.Text));
                obj.USER_PHONE = BLL.ReplaceQuote(txt_phonenumber.Text);
                obj.USER_CREATEDBY = 1;
                DataTable dt = BLL.checkusers(obj);
                DataTable dt_user = new DataTable();
                if (dt.Rows.Count == 0)
                {
                    dt_user = BLL.INSERTUSER(obj);
                    if (dt_user.Rows.Count > 0)
                    {
                        BLL.ShowMessage(this, "YOUR ACCOUNT SUCCESSFULLY CREATED");
                        clearcontrols();
                    }
                    else
                    {
                        BLL.ShowMessage(this, "contact admin");
                    }
                }
                else
                {
                    lbl_emailcheck.Visible = true;
                }

                MailMessage mailmessage = new MailMessage();
                mailmessage.IsBodyHtml = true;

                SmtpClient client = new SmtpClient("linkskart.com");
                client.Credentials = new System.Net.NetworkCredential("*****@*****.**", ".santhu143");
                mailmessage.From = new System.Net.Mail.MailAddress("*****@*****.**");
                // mailmessage.From = new MailAddress("*****@*****.**");
                mailmessage.To.Add(dt_user.Rows[0]["USER_EMAILID"].ToString());
                // mailmessage.CC.Add(emailid);
                mailmessage.Subject = "your account is created";
                mailmessage.Body = "<p> Dear " + dt_user.Rows[0]["USER_EMAILID"].ToString() + " " + ",<br /> <br />Your account is successfully created " + " please <a href=\"http://www.linkskart.com\">Click Here</a> to visit LINKSKART.</p></div>";
                client.EnableSsl = false;
                try
                {
                    client.Send(mailmessage);
                    //SmtpMail.Send(eMail);
                }
                catch (Exception ae)
                {
                    // Label1.Text = ae.Message;
                }
            }
            catch (Exception ex)
            {

            }
        }
示例#4
0
        protected void btn_login_Click(object sender, EventArgs e)
        {
            Session["ZOYALUSER"] = null;

            USERS obj = new USERS();
            obj.USER_EMAILID = txt_username.Text.ToString().Trim();
            obj.USER_PASSWORD = txt_password.Text.ToString().Trim();

            DataTable dt_user = new DataTable();

            dt_user = BLL.LOGIN(obj);
            if (dt_user.Rows.Count > 0)
            {
                Session["ZOYALUSER"] = dt_user;
                //BLL.ShowMessage(this, "YOUR ACCOUNT SUCCESSFULLY LOGIN");
                clearcontrols();
                lbllogin.Visible = false;
                myaccount.Visible = true;

            }
            else
            {
                BLL.ShowMessage(this, "incorrect email or password");
            }
        }
示例#5
0
 protected void btn_forget_Click(object sender, EventArgs e)
 {
     USERS obj = new USERS();
     obj.USER_EMAILID = txt_forgetemail.Text;
     MailMessage mailmessage = new MailMessage();
     DataTable dt_user = BLL.FORGETPWD(obj);
     mailmessage.IsBodyHtml = true;
     SmtpClient client = new SmtpClient("linkskart.com");
     client.Credentials = new System.Net.NetworkCredential("*****@*****.**", ".santhu143");
     mailmessage.From = new System.Net.Mail.MailAddress("*****@*****.**");
     // mailmessage.From = new MailAddress("*****@*****.**");
     mailmessage.To.Add(dt_user.Rows[0]["USER_EMAILID"].ToString());
     // mailmessage.CC.Add(emailid);
     mailmessage.Subject = "Password request";
     mailmessage.Body = "<p> Dear " + dt_user.Rows[0]["USER_FIRSTNAME"].ToString() + ",<br /> <br />You password is " + BLL.Decrypt(dt_user.Rows[0]["USER_PASSWORD"].ToString()) + " please <a href=\"http://www.linkskart.com\">Click Here</a> to visit LINKSKART.</p></div>";
     client.EnableSsl = false;
     try
     {
         client.Send(mailmessage);
         //SmtpMail.Send(eMail);
     }
     catch (Exception ae)
     {
         // Label1.Text = ae.Message;
     }
 }
示例#6
0
 internal static DataTable LOGIN(USERS obj)
 {
     DataTable   dt = BLL.ExecuteQuery("EXEC USP_USERLOGIN @OPERATION='LOGIN',@USER_EMAILID='"+ obj.USER_EMAILID + "',@USER_PASSWORD='******'");
     return dt;
 }
示例#7
0
 internal static DataTable INSERTUSER(USERS obj)
 {
     DataTable  dt = BLL.ExecuteQuery("EXEC USP_USERLOGIN @USER_FIRSTNAME='" + obj.USER_FIRSTNAME + "',@USER_PHONE='"+obj.USER_PHONE+ "',@USER_EMAILID='" + obj.USER_EMAILID + "',@USER_USERNAME='******',@USER_PASSWORD='******',@USER_MODIFIEDBY='" + obj.USER_MODIFIEDBY + "',@USER_STATUS ='" + obj.USER_STATUS + "',@USER_LOGINTYPE='" + obj.USER_LOGINTYPE + "',@USER_CREATEDBY=1,@OPERATION='INSERTUSER'");
     return dt;
 }
示例#8
0
 internal static DataTable FORGETPWD(USERS obj)
 {
     DataTable dt = BLL.ExecuteQuery("EXEC USP_USERLOGIN @OPERATION='FORGETPWD',@USER_EMAILID='" + obj.USER_EMAILID + "'");
         return dt;
 }