Esempio n. 1
0
        public IBOOrderDetails BOOrderDetails(IOrderDetailsRepository repo)
        {
            BOOrderDetails boOrderDetails = (BOOrderDetails)BOOrderDetails();

            boOrderDetails.Repository = repo;
            return(boOrderDetails);
        }
Esempio n. 2
0
        public async Task <IHttpActionResult> DeleteOrderDetails(string id)
        {
            var result = Task.Factory.StartNew(() =>
            {
                IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { OrderDetailsRepository });
                var bo          = new BOOrderDetails();
                bo.Repository   = OrderDetailsRepository;
                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));
        }
Esempio n. 3
0
        public IBOOrderDetails BOOrderDetails()
        {
            var boOrderDetails = new BOOrderDetails()
            {
                OrderID   = this.OrderID,
                ProductID = this.ProductID,
                UnitPrice = this.UnitPrice,
                Quantity  = this.Quantity,
                Discount  = this.Discount
            };

            return(boOrderDetails);
        }
Esempio n. 4
0
        public IBOOrderDetails BOOrderDetails()
        {
            var boOrderDetails = new BOOrderDetails()
            {
                İd              = this.İd,
                Orderİd         = this.Orderİd,
                Productİd       = this.Productİd,
                Quantity        = this.Quantity,
                UnitPrice       = this.UnitPrice,
                Discount        = this.Discount,
                Statusİd        = this.Statusİd,
                DateAllocated   = this.DateAllocated,
                PurchaseOrderİd = this.PurchaseOrderİd,
                İnventoryİd     = this.İnventoryİd
            };

            return(boOrderDetails);
        }