Example #1
0
        public ActionResult Edit(string ID)
        {
            var model  = new UpdatePROD_PROPERTIESModel();
            var entity = PROD_PROPERTIESService.PROD_PROPERTIESList.FirstOrDefault(t => t.ID == ID);

            if (null != entity)
            {
                model = new UpdatePROD_PROPERTIESModel
                {
                    ID = entity.ID, ProductNo = entity.ProductNo, PropertyID = entity.PropertyID, PropertyValue = entity.PropertyValue, PLevel = entity.PLevel, ParentID = entity.ParentID, RelationCode = entity.RelationCode, RowID = entity.RowID, RealProductNo = entity.RealProductNo, DisplayOrder = entity.DisplayOrder, Remark = entity.Remark, Status = entity.Status
                };
            }
            return(PartialView(model));
        }
Example #2
0
 public ActionResult Edit(UpdatePROD_PROPERTIESModel model)
 {
     if (ModelState.IsValid)
     {
         this.UpdateBaseData <UpdatePROD_PROPERTIESModel>(model);
         OperationResult result = PROD_PROPERTIESService.Update(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
Example #3
0
        public OperationResult Update(UpdatePROD_PROPERTIESModel model)
        {
            var entity = PROD_PROPERTIESList.First(t => t.ID == model.ID);

            entity.ID            = model.ID;
            entity.ProductNo     = model.ProductNo;
            entity.PropertyID    = model.PropertyID;
            entity.PropertyValue = model.PropertyValue;
            entity.PLevel        = model.PLevel;
            entity.ParentID      = model.ParentID;
            entity.RelationCode  = model.RelationCode;
            entity.RowID         = model.RowID;
            entity.RealProductNo = model.RealProductNo;
            entity.DisplayOrder  = model.DisplayOrder;
            entity.Remark        = model.Remark;
            entity.Status        = model.Status;

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