public ActionResult Index() { base.SetDisplayBtn(); base.SetCreateBtn(); base.SetEditBtn(); base.SetDeleteBtn(); var model = new PROD_RELATEDITEMModel(); return(View(model)); }
public OperationResult Insert(PROD_RELATEDITEMModel model) { var entity = new PROD_RELATEDITEM { ProductNo = model.ProductNo, RelatedID = model.RelatedID, Ranking = model.Ranking, }; PROD_RELATEDITEMRepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }
public ActionResult Display(string ProductNo, string RelatedID) { var model = new PROD_RELATEDITEMModel(); var entity = PROD_RELATEDITEMService.PROD_RELATEDITEMList.FirstOrDefault(t => t.ProductNo == ProductNo && t.RelatedID == RelatedID); if (null != entity) { model = new PROD_RELATEDITEMModel { ProductNo = entity.ProductNo, RelatedID = entity.RelatedID, Ranking = entity.Ranking }; } return(View(model)); }
public ActionResult Create(PROD_RELATEDITEMModel model) { if (ModelState.IsValid) { this.CreateBaseData <PROD_RELATEDITEMModel>(model); OperationResult result = PROD_RELATEDITEMService.Insert(model); if (result.ResultType == OperationResultType.Success) { return(Json(result)); } else { return(PartialView(model)); } } else { return(PartialView(model)); } }
public ActionResult Create() { var model = new PROD_RELATEDITEMModel(); return(PartialView(model)); }