コード例 #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);
        }
コード例 #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";
            }
        }
コード例 #3
0
        public bool endreAdmin(int id, Admin admin)
        {
            var AdminDAL = new AdminDAL();

            return(AdminDAL.endreAdmin(id, admin));
        }
コード例 #4
0
        public bool leggTilAdmin(Admin innAdmin)
        {
            var AdminDAL = new AdminDAL();

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