예제 #1
0
        protected void Login_Click(object sender, EventArgs e)
        {
            Log.Singleton s = new Log.Singleton();
            //Singleton.Instance.UserRegesteration.Concat(i=>i.f)
            if (Log.Singleton.Instance.Tbl_Prof.Count(u => u.Email == email.Text && u.Password == password.Text) == 1)
            {
                Tbl_Prof rr = Log.Singleton.Instance.Tbl_Prof.First(u => u.Email == email.Text && u.Password == password.Text);
                if (rr.Approval == "0")
                {
                    Response.Redirect("StayApprof.aspx?id=" + rr.Name);
                }
                else
                {
                    Response.Redirect("ProfAddChapters.aspx?id=" + rr.Prof_ID);
                }
            }

            //if (db.Tbl_Prof.Count(u => u.Email == email.Text && u.Password == password.Text) == 1)
            //{
            //    Tbl_Prof rr = db.Tbl_Prof.First(u => u.Email == email.Text && u.Password == password.Text);
            //    if (rr.Approval == "0")
            //    {
            //        Response.Redirect("StayApprof.aspx?id=" + rr.Name);
            //    }
            //    else
            //    {
            //        Response.Redirect("ProfAddChapters.aspx?id=" + rr.Prof_ID);
            //    }
            //}
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('False')", true);
            }
        }
 protected void Login_Click(object sender, EventArgs e)
 {
     Log.Singleton s = new Log.Singleton();
     //Singleton.Instance.UserRegesteration.Concat(i=>i.f)
     if (Log.Singleton.Instance.Tbl_Admin.Count(u => u.Name == email.Text && u.Password == password.Text) == 1)
     {
         Response.Redirect("confirmProf.aspx?name=");
     }
     //if (db.Tbl_Admin.Count(u => u.Name == email.Text && u.Password== password.Text) == 1)
     //{
     //    Response.Redirect("confirmProf.aspx?name=");
     //}
     else
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('False')", true);
     }
 }