示例#1
0
        public void ChangeUserDisableStatus(UpdateDisableStatusRequest model)
        {
            Action <SqlParameterCollection> inputParamDelegate = delegate(SqlParameterCollection paramCollection)
            {
                paramCollection.AddWithValue("@ChangeStatus", model.Disabled);
                paramCollection.AddWithValue("@Id", model.Id);
            };

            _dataProvider.ExecuteNonQuery("dbo.Users_EnableDisableUser", inputParamDelegate);
        }
示例#2
0
        public HttpResponseMessage ChangeDisableStatus(UpdateDisableStatusRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            _userService.ChangeUserDisableStatus(request);

            return(Request.CreateResponse(HttpStatusCode.OK, new GSwap.Models.Responses.SuccessResponse()));
        }