public ActionResult Edit(string ID)
        {
            var model  = new UpdatePROD_MASTERCOMMONModel();
            var entity = PROD_MASTERCOMMONService.PROD_MASTERCOMMONList.FirstOrDefault(t => t.ID == ID);

            if (null != entity)
            {
                model = new UpdatePROD_MASTERCOMMONModel
                {
                    ID = entity.ID, ProductNo = entity.ProductNo, CommTitle = entity.CommTitle, CommSummary = entity.CommSummary, CommContent = entity.CommContent, Creator = entity.Creator, CreateDate = entity.CreateDate, Modifier = entity.Modifier, ModiDate = entity.ModiDate, Status = entity.Status, Item01 = entity.Item01, Item02 = entity.Item02, Item03 = entity.Item03, Item04 = entity.Item04, Item05 = entity.Item05
                };
            }
            return(PartialView(model));
        }
 public ActionResult Edit(UpdatePROD_MASTERCOMMONModel model)
 {
     if (ModelState.IsValid)
     {
         this.UpdateBaseData <UpdatePROD_MASTERCOMMONModel>(model);
         OperationResult result = PROD_MASTERCOMMONService.Update(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
        public OperationResult Update(UpdatePROD_MASTERCOMMONModel model)
        {
            var entity = PROD_MASTERCOMMONList.First(t => t.ID == model.ID);

            entity.ID          = model.ID;
            entity.ProductNo   = model.ProductNo;
            entity.CommTitle   = model.CommTitle;
            entity.CommSummary = model.CommSummary;
            entity.CommContent = model.CommContent;
            entity.Creator     = model.Creator;
            entity.CreateDate  = model.CreateDate;
            entity.Modifier    = model.Modifier;
            entity.ModiDate    = model.ModiDate;
            entity.Status      = model.Status;
            entity.Item01      = model.Item01;
            entity.Item02      = model.Item02;
            entity.Item03      = model.Item03;
            entity.Item04      = model.Item04;
            entity.Item05      = model.Item05;

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