예제 #1
0
        public OperationResult Update(UpdateSYS_CONFIGModel model)
        {
            var entity = SYS_CONFIGList.First(t => t.ID == model.ID);

            entity.ID            = model.ID;
            entity.ConfigName    = model.ConfigName;
            entity.ConfigContent = model.ConfigContent;
            entity.FieldProperty = model.FieldProperty;
            entity.IsSystem      = model.IsSystem;

            SYS_CONFIGRepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
예제 #2
0
        public ActionResult Edit(string ID)
        {
            var model  = new UpdateSYS_CONFIGModel();
            var entity = SYS_CONFIGService.SYS_CONFIGList.FirstOrDefault(t => t.ID == ID);

            if (null != entity)
            {
                model = new UpdateSYS_CONFIGModel
                {
                    ID = entity.ID
                };
            }
            return(PartialView(model));
        }
예제 #3
0
 public ActionResult Edit(UpdateSYS_CONFIGModel model)
 {
     if (ModelState.IsValid)
     {
         this.UpdateBaseData <UpdateSYS_CONFIGModel>(model);
         OperationResult result = SYS_CONFIGService.Update(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }