Exemple #1
0
        public OperationResult Delete(int DictionaryValue)
        {
            var model = SYS_DICTIONARYList.FirstOrDefault(t => t.DictionaryValue == DictionaryValue);

            SYS_DICTIONARYRepository.Delete(model);
            return(new OperationResult(OperationResultType.Success, "successfully deleted"));
        }
Exemple #2
0
        public OperationResult Update(UpdateSYS_DICTIONARYModel model)
        {
            var entity = SYS_DICTIONARYList.First(t => t.DictionaryValue == model.DictionaryValue);

            entity.DictionaryName  = model.DictionaryName;
            entity.DictionaryValue = model.DictionaryValue;
            entity.Remark          = model.Remark;

            SYS_DICTIONARYRepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
Exemple #3
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"));
        }