// GET: Offer/Details/5 public ActionResult Details(int id) { OfferBLL Offer; try { using (ContextBll ctx = new ContextBll()) { Offer = ctx.FindOfferByID(id); if (null == Offer) { return(View("ItemNotFound")); } } } catch (Exception ex) { ViewBag.Exception = ex; return(View("Error")); } return(View(Offer)); }
// GET: Offer/Edit/5 public ActionResult Edit(int id) { OfferBLL Offer; try { using (ContextBll ctx = new ContextBll()) { Offer = ctx.FindOfferByID(id); if (null == Offer) { return(View("ItemNotFound")); } } } catch (Exception ex) { ViewBag.Exception = ex; return(View("Error")); } ViewBag.Offer = GetProductsItems(); ViewBag.Offer = GetBuyersItems(); return(View(Offer)); }