protected void StaffLogin(object sender, EventArgs e)
        {
            MMServiceReference1.Service1Client prox = new MMServiceReference1.Service1Client();
            string result = prox.searchXML("staff.xml", Email.Text);

            if (result == "Not found")
            {
                Shiz.Text = "Account Not Found";
            }
            else
            {
                string[] resultComponents = result.Split(' ');
                string   encrPass         = ClassLibrary2.Class1.Encryption(Password.Text);
                if (encrPass == resultComponents[3])
                {
                    //Login Success
                    Shiz.Text = "Login Successful";
                    Response.Redirect("~/Admin/AdminPage/AdminPage.aspx");
                }
                else
                {
                    Shiz.Text = "Incorrect Password";
                }
            }
        }
Exemple #2
0
        protected string AdminLogin()
        {
            MMServiceReference1.Service1Client prox = new MMServiceReference1.Service1Client();
            string result = prox.searchXML("staff.xml", UserEmail.Value);

            if (result == "")
            {
                return("Not found");
            }
            else
            {
                string[] resultComponents = result.Split(' ');
                return(resultComponents[3]);
            }
        }