Example #1
0
        public static Result Criar(Sprint request)
        {
            Result response = new Result() { success = true, Message = "Sprint salva com Sucesso" };
            using (KANBANEntities db = new KANBANEntities())
            {
                db.sprints.Add(new Kanban.sprints()
                {
                    descricao = request.descricao,
                });
                db.SaveChanges();
            }

            return response;
        }
Example #2
0
        public static Result Editar(Sprint request)
        {
            Result response = new Result() { success = true, Message = "Sprint Salva com Sucesso!" };

            try
            {
                using (KANBANEntities db = new KANBANEntities())
                {
                    Kanban.sprints editSprint = db.sprints.FirstOrDefault(x => x.id == request.idSprint);
                    editSprint.descricao = request.descricao;
                    db.SaveChanges();
                }
            }
            catch (Exception)
            {
                response.Message = "Houve erro ao atualizar as informações da sprint, contate o suporte técnico.";
                response.success = false;
            }

            return response;
        }
Example #3
0
 public ActionResult Editar(Sprint request)
 {
     var response = SprintModel.Editar(request);
     return Json(response);
 }
Example #4
0
 public ActionResult Criar(Sprint request)
 {
     Result response = SprintModel.Criar(request);
     return Json(response);
 }