コード例 #1
0
        public ActionResult Edit(string ID)
        {
            var model  = new UpdateSYS_DICTIONARY_DATAModel();
            var entity = SYS_DICTIONARY_DATAService.SYS_DICTIONARY_DATAList.FirstOrDefault(t => t.ID == ID);

            if (null != entity)
            {
                model = new UpdateSYS_DICTIONARY_DATAModel
                {
                    ID = entity.ID
                };
            }
            return(PartialView(model));
        }
コード例 #2
0
 public ActionResult Edit(UpdateSYS_DICTIONARY_DATAModel model)
 {
     if (ModelState.IsValid)
     {
         this.UpdateBaseData <UpdateSYS_DICTIONARY_DATAModel>(model);
         OperationResult result = SYS_DICTIONARY_DATAService.Update(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
コード例 #3
0
        public OperationResult Update(UpdateSYS_DICTIONARY_DATAModel model)
        {
            var entity = SYS_DICTIONARY_DATAList.First(t => t.ID == model.ID);

            entity.ID = model.ID;
            entity.DictionaryValue = model.DictionaryValue;
            entity.DictDataName    = model.DictDataName;
            entity.DictDataValue   = model.DictDataValue;
            entity.DictDataType    = model.DictDataType;
            entity.IsFixed         = model.IsFixed;
            entity.IsCancel        = model.IsCancel;
            entity.DictParentID    = model.DictParentID;
            entity.CreateDate      = model.CreateDate;
            entity.ModiDate        = model.ModiDate;
            entity.Remark          = model.Remark;
            entity.DisplayOrder    = model.DisplayOrder;

            SYS_DICTIONARY_DATARepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }