예제 #1
0
 public ActionResult Edit(Emprestimo emprestimo)
 {
     if (ModelState.IsValid)
     {
         emprestimo.CadastrarDevolucao(emprestimo);
         return(View("Extrato", emprestimo));
     }
     return(View(emprestimo));
 }
예제 #2
0
        public ActionResult Edit([Bind(Include = "id,dataDevolucao,dataAluguel,dataPrevistaDevolucao,clienteId, livroId")] Emprestimo emprestimo)
        {
            if (ModelState.IsValid)
            {
                emprestimo.CadastrarDevolucao(emprestimo);

                return(View("Extrato", emprestimo));
            }
            return(View(emprestimo));
        }