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); }
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"; } }
public bool endreAdmin(int id, Admin admin) { var AdminDAL = new AdminDAL(); return(AdminDAL.endreAdmin(id, admin)); }
public bool leggTilAdmin(Admin innAdmin) { var AdminDAL = new AdminDAL(); return(AdminDAL.leggTilAdmin(innAdmin)); }
public bool LeggInn(Admin admin) { return(dbAdmin.LeggInn(admin)); }
public static bool regAdmin(Admin ca) { return(LoginDBManger.regAdmin(ca)); }
public static bool AdminLogin(Admin c) { return(LoginDBManger.adminlogin(c)); }
/// <summary> /// 添加管理员 /// </summary> /// <param name="admin"></param> /// <returns></returns> public static int AddAdmin(Admin admin) { return(AdminDal.AddAdmin(admin)); }
public bool ModifyAdmin(Admin admin) { return(_adminDAL.UpdateOneRecord(admin)); }
public bool RegisterAdmin(Admin admin) { //将注册密码加密 admin.AdminPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(admin.AdminPwd, "MD5"); return(_adminDAL.InsertOneRecord(admin)); }