Exemple #1
0
 private void Set(SECS01P004Model model)
 {
     foreach (var item in model.SYS_STATUS_MODEL)
     {
         item.Value = item.Value.Trim();
     }
 }
Exemple #2
0
 public ActionResult Index()
 {
     SetDefaulButton(StandardButtonMode.Index);
     if (TempSearch.IsDefaultSearch && !Request.GetRequest("page").IsNullOrEmpty())
     {
         localModel = TempSearch.CloneObject();
     }
     SetDefaultData();
     return(View(StandardActionName.Index, localModel));
 }
Exemple #3
0
        public ActionResult Search(SECS01P004Model model)
        {
            var da = new SECS01P004DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SECS01P004ExecuteType.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));
        }
Exemple #4
0
        public ActionResult SaveCreate(SECS01P004Model model)
        {
            var jsonResult = new JsonResult();

            if (ModelState.IsValid)
            {
                model.COM_CODE = SessionHelper.SYS_COM_CODE;
                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);
        }
Exemple #5
0
        public ActionResult Add()
        {
            SetDefaulButton(StandardButtonMode.Create);

            var da = new SECS01P004DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SECS01P004ExecuteType.GetSeqMax;
            da.DTO.Model.COM_CODE      = SessionHelper.SYS_COM_CODE;
            da.Select(da.DTO);
            if (da.DTO.Model != null)
            {
                localModel = da.DTO.Model;
            }

            SetDefaultData();
            return(View(StandardActionName.Add, localModel));
        }
Exemple #6
0
        public ActionResult Edit(string SYS_CODE)
        {
            SetDefaulButton(StandardButtonMode.Modify);

            var da = new SECS01P004DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SECS01P004ExecuteType.GetByID;
            TempModel.SYS_CODE         = da.DTO.Model.SYS_CODE = SYS_CODE;
            da.DTO.Model.COM_CODE      = SessionHelper.SYS_COM_CODE;
            da.Select(da.DTO);
            if (da.DTO.Model != null)
            {
                localModel = da.DTO.Model;
            }

            SetDefaultData();
            return(View(StandardActionName.Edit, localModel));
        }