Exemple #1
0
        // GET: OrdenPago/Create
        public ActionResult Create()
        {
            var Model = new OrdenPago
            {
                FechaPago = DateTime.Now,
                lstMoneda = _OrdenPago.ListaMoneda(),
                lstEstado = _OrdenPago.ListaEstado()
            };

            return(View(Model));
        }
Exemple #2
0
 public ActionResult Create([Bind(Include = "IDOrdenPago,Monto,FechaPago,IDMoneda,IDEstado")] OrdenPago _OrdenPago)
 {
     try
     {
         ModelState.Remove("IDBanco");
         ModelState.Remove("IDSucursal");
         if (!ModelState.IsValid)
         {
             _OrdenPago.lstEstado = _OrdenPago.ListaEstado();
             _OrdenPago.lstMoneda = _OrdenPago.ListaMoneda();
             return(View(_OrdenPago));
         }
         try
         {
             _OrdenPago.InsertOrdenPago(_OrdenPago);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             throw;
         }
     }
     catch
     {
         return(View());
     }
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "IDOrdenPago,Monto,IDMoneda,IDEstado,FechaPago")] OrdenPago _OrdenPago)
 {
     ModelState.Remove("IDBanco");
     ModelState.Remove("IDSucursal");
     if (!ModelState.IsValid)
     {
         _OrdenPago.lstEstado = _OrdenPago.ListaEstado();
         _OrdenPago.lstMoneda = _OrdenPago.ListaMoneda();
         return(View(_OrdenPago));
     }
     try
     {
         // TODO: Add update logic here
         _OrdenPago.UpdateOrdenPago(_OrdenPago);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }