Esempio n. 1
0
        public ActionResult Index()
        {
            base.SetDisplayBtn();
            base.SetCreateBtn();
            base.SetEditBtn();
            base.SetDeleteBtn();

            var model = new SYS_CONFIGModel();

            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Display(string ID)
        {
            var model  = new SYS_CONFIGModel();
            var entity = SYS_CONFIGService.SYS_CONFIGList.FirstOrDefault(t => t.ID == ID);

            if (null != entity)
            {
                model = new SYS_CONFIGModel
                {
                    ID = entity.ID
                };
            }
            return(View(model));
        }
Esempio n. 3
0
        public OperationResult Insert(SYS_CONFIGModel model)
        {
            var entity = new SYS_CONFIG
            {
                ID            = model.ID,
                ConfigName    = model.ConfigName,
                ConfigContent = model.ConfigContent,
                FieldProperty = model.FieldProperty,
                IsSystem      = model.IsSystem,
            };

            SYS_CONFIGRepository.Insert(entity);
            return(new OperationResult(OperationResultType.Success, "Added successfully"));
        }
Esempio n. 4
0
 public ActionResult Create(SYS_CONFIGModel model)
 {
     if (ModelState.IsValid)
     {
         this.CreateBaseData <SYS_CONFIGModel>(model);
         OperationResult result = SYS_CONFIGService.Insert(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
Esempio n. 5
0
        public ActionResult Create()
        {
            var model = new SYS_CONFIGModel();

            return(PartialView(model));
        }