// 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")); } }
// 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")); } }