示例#1
0
        public JsonResult SalvarMes([FromBody] JObject body)
        {
            var result = new ResultProcessing();

            var mes = new Mes()
            {
                Id               = body.GetValue("id").Value <int>(),
                Pago             = body.GetValue("pago").Value <bool>(),
                Data             = body.GetValue("data").Value <DateTime>(),
                PlanoId          = body.GetValue("planoId").Value <int>(),
                AlunoId          = body.GetValue("alunoId").Value <int>(),
                ValorPromocional = body.GetValue("valorPromocional").Value <double?>(),
                Ativo            = body.GetValue("ativo").Value <bool>()
            };

            result = servico.SalvarMes(mes);

            return(Json(new { success = result.Success, message = result.Message }));
        }