예제 #1
0
 // GET: Sucursal/Delete/5
 public ActionResult Delete(int id)
 {
     try
     {
         var entity = BCSucursal.Get(id);
         if (entity == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         var model = Mapper.Map <Sucursal>(entity);
         return(View(model));
     }
     catch
     {
         return(RedirectToAction("Index"));
     }
 }
예제 #2
0
        // GET: Sucursal/Edit/5
        public ActionResult Edit(int id)
        {
            try
            {
                var entity = BCSucursal.Get(id);
                if (entity == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                var model = Mapper.Map <Sucursal>(entity);
                PopulateBancosDropDownList(model.BancoId);
                return(View(model));
            }
            catch
            {
                return(RedirectToAction("Index"));
            }
        }