public OperationResult Delete(string CustomerID, string ProductNo) { var model = SALES_INTERNETPRICEList.FirstOrDefault(t => t.CustomerID == CustomerID && t.ProductNo == ProductNo); SALES_INTERNETPRICERepository.Delete(model); return(new OperationResult(OperationResultType.Success, "successfully deleted")); }
public OperationResult Update(UpdateSALES_INTERNETPRICEModel model) { var entity = SALES_INTERNETPRICEList.First(t => t.CustomerID == model.CustomerID && t.ProductNo == model.ProductNo); entity.CustomerID = model.CustomerID; entity.ProductNo = model.ProductNo; entity.IPrice = model.IPrice; entity.Status = model.Status; SALES_INTERNETPRICERepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }
public OperationResult Insert(SALES_INTERNETPRICEModel model) { var entity = new SALES_INTERNETPRICE { CustomerID = model.CustomerID, ProductNo = model.ProductNo, IPrice = model.IPrice, Status = model.Status, }; SALES_INTERNETPRICERepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }