public ActionResult Edit(int?id) { BusCityModel _model = new BusCityModel(); BusCityRepository _rep = new BusCityRepository(); try { _model = _rep.Detail(id); } catch (Exception ex) { _model.Message = BusGeneralRepository.CatchException(ex); } BusGeneralRepository.ActionMessage = _model.Message; return(View(_model)); }
public ActionResult Details(int?id) { BusCityModel _model = new BusCityModel(); BusCityRepository _rep = new BusCityRepository(); try { _model = _rep.Detail(id); } catch (Exception ex) { _model.Message = BusGeneralRepository.CatchException(ex); } BusGeneralRepository.ActionMessage = _res; if (_model.Message.MsgNumber == 0) { return(View(_model)); } else { return(RedirectToAction("Index")); } }