コード例 #1
0
        public ActionResult Create()
        {
            BusMasterModel      _model = new BusMasterModel();
            BusMasterRepository _rep   = new BusMasterRepository();

            _model.Message = _res;
            return(View(_model));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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"));
        }
コード例 #5
0
        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));
            }
        }
コード例 #6
0
        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"));
            }
        }