public ActionResult Edit(int?id) { OperatorBusCategoryModel _model = new OperatorBusCategoryModel(); OperatorBusCategoryRepository _rep = new OperatorBusCategoryRepository(); try { _model = _rep.Detail(id); } catch (Exception ex) { _model.Message = BusGeneralRepository.CatchException(ex); } BusGeneralRepository.ActionMessage = _model.Message; _model = _rep.Fill(_model); return(View(_model)); }
public ActionResult Details(int?id) { OperatorBusCategoryModel _model = new OperatorBusCategoryModel(); OperatorBusCategoryRepository _rep = new OperatorBusCategoryRepository(); 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")); } }