示例#1
0
        public static ResultModel <EFResponse> InsertUsers(User param)
        {
            var validate = _validationUsers(param);

            if (validate.StatusCode != (int)HttpStatusCode.OK)
            {
                res.StatusCode    = validate.StatusCode;
                res.StatusMessage = validate.StatusMessage;
                return(res);
            }
            param.Password = Encryption.Encode(param.Password);
            var ret = ManageUser.Insert(param);

            res.StatusCode = (int)HttpStatusCode.ExpectationFailed;
            if (ret.Success)
            {
                res.StatusCode = (int)HttpStatusCode.OK; res.Value = ret;
            }
            return(res);
        }