public bool LoginComfirm(Model.UserInfo userInfo) { string sql = "select * from tbUser where UserName = @userName and UserPwd = @userPwd"; SqlParameter[] pars = new SqlParameter[] { new SqlParameter("@userName", userInfo.UserName), new SqlParameter("@userPwd", userInfo.UserPwd) }; try { int count = DAL.SQLHelper.ExecuteSQLReturnInt(sql, pars); if (count != 0) { return(true); } else { return(false); } } catch (Exception e) { throw new Exception(e.Message); } }
public Model.UserInfo ToMD5(Model.UserInfo userInfo) { byte[] mingwen = Encoding.UTF8.GetBytes(userInfo.UserPassword); MD5 md5 = new MD5CryptoServiceProvider(); byte[] miwen = md5.ComputeHash(mingwen); userInfo.UserPassword = BitConverter.ToString(miwen).Replace("-", ""); return(userInfo); }
public Model.UserInfo userlogin(string uname, string upsd) { DAL.UserDAO ud = new DAL.UserDAO(); Model.UserInfo user = ud.selectuser(uname, upsd); if (user != null) { return(user); } else { throw new Exception("login failed"); } }
public Model.UserInfo userlogin(string name, string password) { DAL.UserDAO ud = new DAL.UserDAO(); Model.UserInfo ui = ud.selectuser(name, password); if (ui != null) { return(ui); } else { throw new Exception("login failed"); } }
public static bool DelUserInfo1(Model.UserInfo model) { bool i = DAL.UserInfo.DelUserInfo1(model); return(i); }
/// <summary> /// 新增用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool AddUserInfo(Model.UserInfo model) { return(DAL.UserInfo.AddUserInfo(model)); }
/// <summary> /// 修改部分用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool UpdateUserInfo1(Model.UserInfo model) { bool i = DAL.UserInfo.UpdateUserInfo1(model); return(i); }
public int Add(Model.UserInfo model) { return(dal.Add(model)); }
public bool Update(Model.UserInfo model) { return(dal.Update(model)); }
//=======================UserManageEdit===================== /// <summary> /// 实现对用户信息的添加 /// </summary> /// <param name="u"></param> /// <returns></returns> public static bool InsertUserInfo(Model.UserInfo u) { return(DAL.UserManageDal.InsertUserInfo(u)); }
/// <summary> /// 实现对用户管理的修改 /// </summary> /// <param name="u"></param> /// <returns></returns> public static bool UpdateUserInfo(Model.UserInfo u) { return(DAL.UserManageDal.UpdateUserInfo(u)); }
public List <Model.SystemMenu> GetNavTreeByUserID(Model.UserInfo userInfo) { return(dal.GetNavTreeByUserID(userInfo)); }
//根据用户ID删除用户信息 public static bool DelUserInfo(Model.UserInfo u) { return(DAL.UserManageDal.DelUserInfo(u)); }
/// <summary> /// 实现对用户密码的修改 /// </summary> /// <param name="u"></param> /// <returns></returns> public static bool UpdateUserPwd(Model.UserInfo u) { return(DAL.LoginDal.UpdateUserPwd(u)); }
/// <summary> /// 获得数据列表 /// </summary> /// <param name="strWhere"></param> /// <returns></returns> public DataSet GetList(Model.UserInfo userInfo) { return(dal.GetList(userInfo)); }
/// <summary> /// 删除一条数据 /// </summary> /// <param name="UserName"></param> /// <returns></returns> public bool Delete(Model.UserInfo userInfo) { return(dal.Delete(userInfo)); }
/// <summary> /// 更新一条数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool Update(Model.UserInfo userInfo) { return(dal.Update(userInfo)); }
/// <summary> /// 增加一条数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool Add(Model.UserInfo userInfo) { return(dal.Add(userInfo)); }