Exemplo n.º 1
0
        public IBOİnventoryTransactionTypes BOİnventoryTransactionTypes(IInventoryTransactionTypesRepository repo)
        {
            BOInventoryTransactionTypes boİnventoryTransactionTypes = (BOInventoryTransactionTypes)BOİnventoryTransactionTypes();

            boİnventoryTransactionTypes.Repository = repo;
            return(boİnventoryTransactionTypes);
        }
        public async Task <IHttpActionResult> DeleteİnventoryTransactionTypes(string id)
        {
            var result = Task.Factory.StartNew(() =>
            {
                IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { İnventoryTransactionTypesRepository });
                var bo          = new BOInventoryTransactionTypes();
                bo.Repository   = İnventoryTransactionTypesRepository;
                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));
        }
Exemplo n.º 3
0
        public IBOİnventoryTransactionTypes BOİnventoryTransactionTypes()
        {
            var boİnventoryTransactionTypes = new BOInventoryTransactionTypes()
            {
                İd       = this.İd,
                TypeName = this.TypeName
            };

            return(boİnventoryTransactionTypes);
        }