Пример #1
0
        public JsonResult Update(PersonUpdateDto data)
        {
            #region TOKEN
            var      sessione  = (SessionModel)Session[Resources.Constante.SessionUsuario];
            LoginDto oLoginDto = new LoginDto();
            oLoginDto.v_UserName = sessione.UserName;
            oLoginDto.v_Password = sessione.Pass;
            var validated = _securityBL.ValidateAccess(oLoginDto);
            if (validated == null)
            {
                return(Json("", "application/json", Encoding.UTF8, JsonRequestBehavior.AllowGet));
            }
            #endregion

            var response = _personBL.Update(data, validated.Token);
            return(Json(response, "application/json", Encoding.UTF8, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public HttpResponseMessage Update(Person person)
        {
            var response = PersonBL.Update(person);

            return(Request.CreateResponse(response.StatusCode, response));
        }