public OperationResult Delete(string ID) { var model = SALES_VIEWEDList.FirstOrDefault(t => t.ID == ID); SALES_VIEWEDRepository.Delete(model); return(new OperationResult(OperationResultType.Success, "successfully deleted")); }
public OperationResult Update(UpdateSALES_VIEWEDModel model) { var entity = SALES_VIEWEDList.First(t => t.ID == model.ID); entity.ID = model.ID; entity.ProductNo = model.ProductNo; entity.CustomerID = model.CustomerID; entity.ContactID = model.ContactID; entity.CreateDate = model.CreateDate; entity.ModiDate = model.ModiDate; entity.Creator = model.Creator; entity.Modifier = model.Modifier; entity.RowID = model.RowID; SALES_VIEWEDRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }
public OperationResult Insert(SALES_VIEWEDModel model) { var entity = new SALES_VIEWED { ID = model.ID, ProductNo = model.ProductNo, CustomerID = model.CustomerID, ContactID = model.ContactID, CreateDate = model.CreateDate, ModiDate = model.ModiDate, Creator = model.Creator, Modifier = model.Modifier, RowID = model.RowID, }; SALES_VIEWEDRepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }