Example #1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(TFXK.Model.Users model)
        {
            int row = 0;

            if (!Exists(model.userName, ""))
            {
                model.password = Security.EncryptPassword(model.password, "MD5");
                row            = dal.Add(model);
            }
            else
            {
                row = -1;
            }

            return(row);
        }
Example #2
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool Add(Users t)
        {
            var result = iUsersDAL.Add(t);

            return(result);
        }
Example #3
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="model">实体</param>
 /// <returns>主键值</returns>
 public object Add(Users model)
 {
     return(dal.Add <Users>(model));
 }
Example #4
0
 public IResult Add(Users user)
 {
     _Iusersdal.Add(user);
     return(new SuccessResult());
 }