public ActionResult Create() { BusMasterModel _model = new BusMasterModel(); BusMasterRepository _rep = new BusMasterRepository(); _model.Message = _res; return(View(_model)); }
public ActionResult Edit(int?id) { BusMasterModel _model = new BusMasterModel(); BusMasterRepository _rep = new BusMasterRepository(); try { _model = _rep.Detail(id); } catch (Exception ex) { _model.Message = BusGeneralRepository.CatchException(ex); } BusGeneralRepository.ActionMessage = _model.Message; return(View(_model)); }
public ActionResult Index(int?page) { BusMasterModel _model = new BusMasterModel(); BusMasterRepository _rep = new BusMasterRepository(); BusGeneralRepository.SetRequestPageRow(); try { _model.TabularList = _rep.GetPagedList(page); } catch (Exception ex) { _model.Message = BusGeneralRepository.CatchException(ex); } _model.Message = _res; return(View(_model)); }
public ActionResult Delete(int?id) { BusMasterModel _model = new BusMasterModel(); BusMasterRepository _rep = new BusMasterRepository(); try { _model.Message = _rep.Delete(id); } catch (Exception ex) { _model.Message = BusGeneralRepository.CatchException(ex); } BusGeneralRepository.ActionMessage = _model.Message; return(RedirectToAction("Index")); }
public ActionResult Create(BusMasterModel model) { BusMasterRepository _rep = new BusMasterRepository(); try { model.Message = _rep.Create(model); } catch (Exception ex) { model.Message = BusGeneralRepository.CatchException(ex); } BusGeneralRepository.ActionMessage = _res; if (model.Message.MsgNumber == 0) { return(RedirectToAction("Index")); } else { return(View(model)); } }
public ActionResult Details(int?id) { BusMasterModel _model = new BusMasterModel(); BusMasterRepository _rep = new BusMasterRepository(); 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")); } }