コード例 #1
0
 public dynamic Get(string id)
 {
     var cop = new CoperativaRepository().Get(int.Parse(id));
     return Json(cop, new JsonSerializerSettings()
     {
         NullValueHandling = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore
     });
 }
コード例 #2
0
        public dynamic Get()
        {
            var ret1 = new CoperativaRepository().GetGrid();

            return Json(ret1, new JsonSerializerSettings()
            {
                NullValueHandling = NullValueHandling.Ignore,
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            });
        }
コード例 #3
0
 public dynamic Post(Coperativa usua)
 {
     try
     {
         usua.DataCadastro = DateTime.Now;
         usua.Controles[0].DataContrato = DateTime.Now;
         var user = new CoperativaRepository().Post(usua);
         return Json(new { error = "" });
     }
     catch (Exception ex)
     {
         return Json(new { error = ex.Message });
     }
 }