Beispiel #1
0
        public SResult Insert(SysUser sysUser)
        {
            SResult rst = new SResult();

            //验证用户名是否重复
            if (this.CheckIsExist(sysUser.Username, null))
            {
                rst.success = false;
                rst.message = "[" + sysUser.Username + "]已存在!";
            }
            else
            {
                SysUserDao.Insert(sysUser);
                rst.success = true;
                rst.data    = sysUser;
                rst.message = "新增成功!";
            }
            return(rst);
        }