public Model.User UserLogin(string username, string password, string type) { user = user_IDAL.SelectUser(username, password, user_IDAL.SelectType(type)); if (user == null) { throw new Exception("Wrong Username or Password"); } else { return(user); } }
public bool login(string account, string pwd) { //声明并初始化DAL层UserDao类 DAL.UserDao userDao = new DAL.UserDao(); //通过账号获取user对象 Model.User user = userDao.findUser(account); //判断得到的user对象密码是否和用户输入密码相等 if (pwd.Equals(user.pwd)) { return(true); } else { return(false); } }
public int Add(Model.User model, out string msg) { int isSuccess = -1; if (ValidateUserName(model.LoginId)) { msg = "Username has been registered"; return(isSuccess); } else { isSuccess = dal.Add(model); msg = "Success"; return(isSuccess); } }
public bool CheckUserInfo(string userName, string userPwd, out string msg, out Model.User user) { user = dal.GetModel(userName); if (user != null) { if (user.LoginPwd == userPwd) { msg = "Success"; return(true); } else { msg = "wrong"; return(false); } } else { msg = "wrong"; return(false); } }
public bool Updateinfo(Model.User user) { return(db.Updateinfo(user)); }
/* * public bool updateUser2(Model.User mu) * { * return sdal.updateUser2(mu); * } */ public bool updatePwd(Model.User mu) { return(sdal.updatePwd(mu)); }
public DataTable point_searchUser(Model.User u) { return(User.point_searchUser(u)); }
public DataTable LoginRecord(Model.User u) { return(User.LoginRecord(u)); }
public TeacherManager(Model.User user) { this.user = user; }
public Model.User[] getUsers(Model.User mu) { return(mu == null?ddal.getUsers() : ddal.getUsers(mu)); }
public static string UpdateUserInfo(Model.User user) { return(DAL.DBHelper.DataUpdateMethod <Model.User>(user) > 0 ? "资料已更新!" : "更新失败,数据库操作出错,请联系管理员!"); }
public string GetUserInfo(Model.User user, string fieid) { return(Daluser.GetUserInfo(user, fieid)); }
public bool Update(Model.User model) { return(user.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Model.User model) { return(dal.Add(model)); }
public StudentManager(Model.User user) { this.user = user; this.user_IDAL = new Mysql_DAL.User_DAL(); }
public bool Update(Model.User model) { model.Password = Common.MD5Provider.Hash(model.Password); return(user.Update(model)); }
public bool Register(Model.User user) { return(db.Register(user)); }
public bool Login(Model.User u) { return(User.Login(u)); }
public bool Login(Model.User user) { return(db.Login(user)); }
public bool AddUser(Model.User u) { return(User.AddUser(u)); }
public bool DelUser(Model.User user) { return(db.DelUser(user)); }
public void DeleteUser(Model.User u) { User.DeleteUser(u); }
public bool Query(Model.User user) { return(db.Query(user)); }
public bool Updatepwd(Model.User user) { return(db.Updatepwd(user)); }
// ---------------------------------------------------------------------------------- // Added by Edward Chan. public bool addUser(Model.User mu) { return(sdal.addUser(mu)); }