コード例 #1
0
 public ActionResult Index()
 {
     SetDefaulButton(StandardButtonMode.Index);
     if (TempSearch.IsDefaultSearch && !Request.GetRequest("page").IsNullOrEmpty())
     {
         localModel = TempSearch.CloneObject();
     }
     return(View(StandardActionName.Index, localModel));
 }
コード例 #2
0
        public ActionResult Search(SECS02P003Model model)
        {
            var da = new SECS02P003DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SECS02P003ExecuteType.GetAll;
            if (Request.GetRequest("page").IsNullOrEmpty())
            {
                model.IsDefaultSearch = true;
                TempSearch            = model;
            }
            da.DTO.Model = TempSearch;
            da.Select(da.DTO);
            return(JsonAllowGet(da.DTO.Models, da.DTO.Result));
        }
コード例 #3
0
        public ActionResult Info(decimal?TITLE_ID)
        {
            SetDefaulButton(StandardButtonMode.View);
            var da = new SECS02P003DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SECS02P003ExecuteType.GetByID;
            TempModel.TITLE_ID         = da.DTO.Model.TITLE_ID = TITLE_ID;
            da.Select(da.DTO);
            if (da.DTO.Model != null)
            {
                localModel = da.DTO.Model;
            }
            return(View(StandardActionName.Info, localModel));
        }
コード例 #4
0
        public ActionResult SaveCreate(SECS02P003Model model)
        {
            var jsonResult = new JsonResult();

            if (ModelState.IsValid)
            {
                var result = SaveData(StandardActionName.SaveCreate, model);
                jsonResult = Success(result, StandardActionName.SaveCreate, Url.Action(StandardActionName.Index, new { page = 1 }));
            }
            else
            {
                jsonResult = ValidateError(ModelState, StandardActionName.SaveCreate);
            }
            return(jsonResult);
        }
コード例 #5
0
        public ActionResult SaveModify(SECS02P003Model model)
        {
            var jsonResult = new JsonResult();

            if (ModelState.IsValid)
            {
                model.TITLE_ID = TempModel.TITLE_ID;
                var result = SaveData(StandardActionName.SaveModify, model);
                jsonResult = Success(result, StandardActionName.SaveModify, Url.Action(StandardActionName.Index, new { page = 1 }));
            }
            else
            {
                jsonResult = ValidateError(ModelState, StandardActionName.SaveModify);
            }
            return(jsonResult);
        }