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

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