Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string uid   = textBox1.Text;
            string pid   = textBox5.Text;
            string email = textBox2.Text;

            BLL.Admin   admin = new BLL.Admin();
            Model.Admin data  = new Model.Admin(uid, pid, email);
            string      msg   = "";

            if (admin.getPassword(data, out msg))
            {
                //MessageBox.Show(msg);
            }
            MessageBox.Show(msg);
        }
Esempio n. 2
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            BLL.Admin objAdmin = new BLL.Admin();

            objAdmin.Where.UserName.Value = txtUserName.Text;
            objAdmin.Where.UserName.Operator = MyGeneration.dOOdads.WhereParameter.Operand.Equal;
            objAdmin.Where.UserName.Conjuction = MyGeneration.dOOdads.WhereParameter.Conj.And;

            objAdmin.Where.UserPassword.Value = txtPassword.Text;
            objAdmin.Where.UserPassword.Operator = MyGeneration.dOOdads.WhereParameter.Operand.Equal;

            if (objAdmin.Query.Load())
            {
                // if this user exist
                Session["LoggedInUser"] = "******";
                Response.Redirect("AdminHome.aspx");

            }
            else
            {
                Session["LoggedInUser"] = null;
                lblLoginResult.Text = "UserName or Password error please check them and try again";
            }
        }
Esempio n. 3
0
        public bool endreAdmin(int id, Admin admin)
        {
            var AdminDAL = new AdminDAL();

            return(AdminDAL.endreAdmin(id, admin));
        }
Esempio n. 4
0
        public bool leggTilAdmin(Admin innAdmin)
        {
            var AdminDAL = new AdminDAL();

            return(AdminDAL.leggTilAdmin(innAdmin));
        }
 public bool LeggInn(Admin admin)
 {
     return(dbAdmin.LeggInn(admin));
 }
Esempio n. 6
0
 public static bool regAdmin(Admin ca)
 {
     return(LoginDBManger.regAdmin(ca));
 }
Esempio n. 7
0
 public static bool AdminLogin(Admin c)
 {
     return(LoginDBManger.adminlogin(c));
 }
Esempio n. 8
0
 /// <summary>
 /// 添加管理员
 /// </summary>
 /// <param name="admin"></param>
 /// <returns></returns>
 public static int AddAdmin(Admin admin)
 {
     return(AdminDal.AddAdmin(admin));
 }
Esempio n. 9
0
 public bool ModifyAdmin(Admin admin)
 {
     return(_adminDAL.UpdateOneRecord(admin));
 }
Esempio n. 10
0
 public bool RegisterAdmin(Admin admin)
 {
     //将注册密码加密
     admin.AdminPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(admin.AdminPwd, "MD5");
     return(_adminDAL.InsertOneRecord(admin));
 }