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

            var model = new SYS_DICTIONARYModel();

            return(View(model));
        }
Esempio n. 2
0
        public OperationResult Insert(SYS_DICTIONARYModel model)
        {
            var entity = new SYS_DICTIONARY
            {
                DictionaryName  = model.DictionaryName,
                DictionaryValue = model.DictionaryValue,
                Remark          = model.Remark,
            };

            SYS_DICTIONARYRepository.Insert(entity);
            return(new OperationResult(OperationResultType.Success, "Added successfully"));
        }
Esempio n. 3
0
        public ActionResult Display(int DictionaryValue)
        {
            var model  = new SYS_DICTIONARYModel();
            var entity = SYS_DICTIONARYService.SYS_DICTIONARYList.FirstOrDefault(t => t.DictionaryValue == DictionaryValue);

            if (null != entity)
            {
                model = new SYS_DICTIONARYModel
                {
                    DictionaryValue = entity.DictionaryValue
                };
            }
            return(View(model));
        }
Esempio n. 4
0
 public ActionResult Create(SYS_DICTIONARYModel model)
 {
     if (ModelState.IsValid)
     {
         this.CreateBaseData <SYS_DICTIONARYModel>(model);
         OperationResult result = SYS_DICTIONARYService.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_DICTIONARYModel();

            return(PartialView(model));
        }