コード例 #1
0
        public async Task <IHttpActionResult> Deleteİnvoices(string id)
        {
            var result = Task.Factory.StartNew(() =>
            {
                IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { İnvoicesRepository });
                var bo          = new BOInvoices();
                bo.Repository   = İnvoicesRepository;
                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));
        }
コード例 #2
0
        public IBOİnvoices BOİnvoices(IInvoicesRepository repo)
        {
            BOInvoices boİnvoices = (BOInvoices)BOİnvoices();

            boİnvoices.Repository = repo;
            return(boİnvoices);
        }
コード例 #3
0
ファイル: InvoicesVm.cs プロジェクト: isakatirci/NorthwindMVC
        public IBOInvoices BOInvoices()
        {
            var boInvoices = new BOInvoices()
            {
                ShipName       = this.ShipName,
                ShipAddress    = this.ShipAddress,
                ShipCity       = this.ShipCity,
                ShipRegion     = this.ShipRegion,
                ShipPostalCode = this.ShipPostalCode,
                ShipCountry    = this.ShipCountry,
                CustomerID     = this.CustomerID,
                CustomerName   = this.CustomerName,
                Address        = this.Address,
                City           = this.City,
                Region         = this.Region,
                PostalCode     = this.PostalCode,
                Country        = this.Country,
                Salesperson    = this.Salesperson,
                OrderID        = this.OrderID,
                OrderDate      = this.OrderDate,
                RequiredDate   = this.RequiredDate,
                ShippedDate    = this.ShippedDate,
                ShipperName    = this.ShipperName,
                ProductID      = this.ProductID,
                ProductName    = this.ProductName,
                UnitPrice      = this.UnitPrice,
                Quantity       = this.Quantity,
                Discount       = this.Discount,
                ExtendedPrice  = this.ExtendedPrice,
                Freight        = this.Freight
            };

            return(boInvoices);
        }
コード例 #4
0
        public IBOİnvoices BOİnvoices()
        {
            var boİnvoices = new BOInvoices()
            {
                İd          = this.İd,
                Orderİd     = this.Orderİd,
                İnvoiceDate = this.İnvoiceDate,
                DueDate     = this.DueDate,
                Tax         = this.Tax,
                Shipping    = this.Shipping,
                AmountDue   = this.AmountDue
            };

            return(boİnvoices);
        }