Exemple #1
0
        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));
        }
Exemple #2
0
        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"));
            }
        }