示例#1
0
 public static bool CheckIfValidEmailAndPass(String email, String pass)
 {
     if (Module.CheckIfUserEmailExist(email) == true)
     {
         if (SignInM.CheckIfValidUserPass(email, pass) == true)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(Session["user"] as string))
            {
                SignInM.InsertThisDance(Session["user"].ToString(), Request["I"].ToString());
                Redirect("MyPrograms.aspx");
            }

            if (Request["I"].ToString() == "")
            {
                Redirect("Home.aspx");
            }
        }
        catch (Exception ex) {
            Redirect("Home.aspx");
        }
    }
示例#3
0
 protected void Login_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckIfValidEmailAndPass(email.Value, pass.Text) == true)
         {
             if (Request["I"].ToString() != "0")
             {
                 SignInM.InsertThisDance(email.Value, Request["I"].ToString());
             }
             Session["user"]      = email.Value;
             Session["user_name"] = GetUserName(email.Value);
             Redirect("MyPrograms.aspx");
         }
         else
         {
             Response.Write("<script>alert('This Email Exist or Invalid Email or pass');</script>");
         }
     }
     catch (Exception ex) {}
 }
示例#4
0
 public static String GetUserName(String email)
 {
     return(SignInM.SelectUserName(email));
 }