示例#1
0
        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);
            }
        }
示例#2
0
        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);
        }
示例#3
0
        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");
            }
        }
示例#4
0
        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");
            }
        }
示例#5
0
        public static bool DelUserInfo1(Model.UserInfo model)
        {
            bool i = DAL.UserInfo.DelUserInfo1(model);

            return(i);
        }
示例#6
0
 /// <summary>
 /// 新增用户信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool AddUserInfo(Model.UserInfo model)
 {
     return(DAL.UserInfo.AddUserInfo(model));
 }
示例#7
0
        /// <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));
 }
示例#10
0
 //=======================UserManageEdit=====================
 /// <summary>
 /// 实现对用户信息的添加
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public static bool InsertUserInfo(Model.UserInfo u)
 {
     return(DAL.UserManageDal.InsertUserInfo(u));
 }
示例#11
0
 /// <summary>
 /// 实现对用户管理的修改
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public static bool UpdateUserInfo(Model.UserInfo u)
 {
     return(DAL.UserManageDal.UpdateUserInfo(u));
 }
示例#12
0
 public List <Model.SystemMenu> GetNavTreeByUserID(Model.UserInfo userInfo)
 {
     return(dal.GetNavTreeByUserID(userInfo));
 }
示例#13
0
 //根据用户ID删除用户信息
 public static bool DelUserInfo(Model.UserInfo u)
 {
     return(DAL.UserManageDal.DelUserInfo(u));
 }
示例#14
0
文件: LoginBll.cs 项目: Joiz-hzy/-2
 /// <summary>
 /// 实现对用户密码的修改
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public static bool UpdateUserPwd(Model.UserInfo u)
 {
     return(DAL.LoginDal.UpdateUserPwd(u));
 }
示例#15
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 /// <param name="strWhere"></param>
 /// <returns></returns>
 public DataSet GetList(Model.UserInfo userInfo)
 {
     return(dal.GetList(userInfo));
 }
示例#16
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 /// <param name="UserName"></param>
 /// <returns></returns>
 public bool Delete(Model.UserInfo userInfo)
 {
     return(dal.Delete(userInfo));
 }
示例#17
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Update(Model.UserInfo userInfo)
 {
     return(dal.Update(userInfo));
 }
示例#18
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Add(Model.UserInfo userInfo)
 {
     return(dal.Add(userInfo));
 }