Esempio n. 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Validate())
            {
                string  Username   = txtUsername.Text;
                string  Password   = txtPassword.Text;
                DataSet dsCustData = new DataSet();
                ManageUserSVC.ManageUserClient Client = new ManageUserSVC.ManageUserClient();
                dsCustData = Client.AdminLogin(Username, Password);

                if (dsCustData != null && dsCustData.Tables[0].Rows.Count > 0)
                {
                    Session["Userdata"] = dsCustData;
                    Response.Redirect("~/Admin/AdminCustomerList.aspx");
                }
                else
                {
                    lblError.Text = "Invalid Username or Password !";
                }
            }
        }
Esempio n. 2
0
        protected void btnAdminLogin_Click(object sender, EventArgs e)
        {
            if (Validate())
            {
                string  Username   = login1.UserName;
                string  Password   = login1.Password;
                DataSet dsCustData = new DataSet();
                ManageUserSVC.ManageUserClient Client = new ManageUserSVC.ManageUserClient();
                dsCustData = Client.AdminLogin(Username, Password);

                if (dsCustData != null && dsCustData.Tables[0].Rows.Count > 0)
                {
                    Session["Userdata"] = dsCustData;
                    if (this.AdminLoginClick != null)
                    {
                        AdminLoginClick(sender, e);
                    }
                }
                else
                {
                    lblError.Text = "Invalid Username or Password !";
                }
            }
        }