Пример #1
0
        public JsonResult AgragarCondominioUsuario(FormCollection collection)
        {
            UsuarioDAL dal        = new UsuarioDAL();
            int        usuario    = int.Parse(collection["Usuario"].ToString());
            int        condominio = int.Parse(collection["Condominio"].ToString());
            var        model      = dal.AsignarNuevoCondominio(usuario, condominio);

            if (model)
            {
                var result = new { Success = true, Message = "Succes Message", model };
                return(Json(result, JsonRequestBehavior.AllowGet));
            }
            else
            {
                var result = new { Success = false, Message = "Error Message" };
                return(Json(result, JsonRequestBehavior.AllowGet));
            }
        }