public OperationResult Update(UpdatePROD_RELATEDITEMModel model)
        {
            var entity = PROD_RELATEDITEMList.First(t => t.ProductNo == model.ProductNo && t.RelatedID == model.RelatedID);

            entity.ProductNo = model.ProductNo;
            entity.RelatedID = model.RelatedID;
            entity.Ranking   = model.Ranking;

            PROD_RELATEDITEMRepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
        public ActionResult Edit(string ProductNo, string RelatedID)
        {
            var model  = new UpdatePROD_RELATEDITEMModel();
            var entity = PROD_RELATEDITEMService.PROD_RELATEDITEMList.FirstOrDefault(t => t.ProductNo == ProductNo && t.RelatedID == RelatedID);

            if (null != entity)
            {
                model = new UpdatePROD_RELATEDITEMModel
                {
                    ProductNo = entity.ProductNo, RelatedID = entity.RelatedID, Ranking = entity.Ranking
                };
            }
            return(PartialView(model));
        }
 public ActionResult Edit(UpdatePROD_RELATEDITEMModel model)
 {
     if (ModelState.IsValid)
     {
         this.UpdateBaseData <UpdatePROD_RELATEDITEMModel>(model);
         OperationResult result = PROD_RELATEDITEMService.Update(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }