コード例 #1
0
        // GET: OrdenPago/Details/5
        public ActionResult Details(int id)
        {
            var entity = BCOrdenPago.Get(id);
            var model  = Mapper.Map <OrdenPago>(entity);

            return(View(model));
        }
コード例 #2
0
 // GET: OrdenPago/Delete/5
 public ActionResult Delete(int id)
 {
     try
     {
         var entity = BCOrdenPago.Get(id);
         if (entity == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         var model = Mapper.Map <OrdenPago>(entity);
         return(View(model));
     }
     catch
     {
         return(RedirectToAction("Index"));
     }
 }
コード例 #3
0
        // GET: OrdenPago/Edit/5
        public ActionResult Edit(int id)
        {
            try
            {
                var entity = BCOrdenPago.Get(id);
                if (entity == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                var model = Mapper.Map <OrdenPago>(entity);
                PopulateEstadoOrdenPagoDropDownList(entity.Estado);
                PopulateMonedasDropDownList(entity.Moneda);
                PopulateSucursalesDropDownList(entity.Sucursal);
                return(View(model));
            }
            catch
            {
                return(RedirectToAction("Index"));
            }
        }