public IBOPurchaseOrderDetails BOPurchaseOrderDetails(IPurchaseOrderDetailsRepository repo) { BOPurchaseOrderDetails boPurchaseOrderDetails = (BOPurchaseOrderDetails)BOPurchaseOrderDetails(); boPurchaseOrderDetails.Repository = repo; return(boPurchaseOrderDetails); }
public async Task <IHttpActionResult> DeletePurchaseOrderDetails(string id) { var result = Task.Factory.StartNew(() => { IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { PurchaseOrderDetailsRepository }); var bo = new BOPurchaseOrderDetails(); bo.Repository = PurchaseOrderDetailsRepository; bo.Init(id); uow.Delete(bo); string err; if (!uow.Commit(out err)) { var resp = new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent(err) }; throw new HttpResponseException(resp); } return(true); }); await result; if (!result.Result) { return(NotFound()); } return(Ok(result.Result)); }
public IBOPurchaseOrderDetails BOPurchaseOrderDetails() { var boPurchaseOrderDetails = new BOPurchaseOrderDetails() { İd = this.İd, PurchaseOrderİd = this.PurchaseOrderİd, Productİd = this.Productİd, Quantity = this.Quantity, UnitCost = this.UnitCost, DateReceived = this.DateReceived, PostedToİnventory = this.PostedToİnventory, İnventoryİd = this.İnventoryİd }; return(boPurchaseOrderDetails); }