// GET: Factura public ActionResult Index() { FacturaCEN fac = new FacturaCEN(); IList <FacturaEN> listaFactura = fac.ReadAll(0, -1).ToList(); IEnumerable <FacturaViewModel> list = new AssemblerFactura().ConvertListENToModel(listaFactura).ToList(); return(View(list)); }
// GET: Factura/Delete/5 public ActionResult Delete(int id) { FacturaViewModel fac = null; SessionInitialize(); FacturaEN facEN = new FacturaCAD(session).ReadOIDDefault(id); fac = new AssemblerFactura().ConvertENToModelUI(facEN); SessionClose(); return(View(fac)); }