Exemple #1
0
        public static List <CustomerShippingInfo> GetShippingInfo(int id)
        {
            ISqlHelper               sqlHelper               = new SqlHelper();
            PriviledgeRepository     priviledgeRepository    = new PriviledgeRepository(sqlHelper);
            IUserRepository          userRepository          = new UserRepository(priviledgeRepository);
            IEntityTrackerRepository entityTrackerRepository = new EntityTrackerRepository(sqlHelper);
            IOrderRepository         oRepository             = new OrderRepository(sqlHelper, userRepository, entityTrackerRepository);
            ICompanyRepository       companyRepository       = new CompanyRepository(sqlHelper);
            IPartRepository          partRepository          = new PartRepository(sqlHelper, userRepository, companyRepository);

            ICustomerRepository           customerRepository        = new CustomerRepository(sqlHelper, userRepository);
            ITransactionRepository        transactionRepository     = new TransactionRepository();
            IPoRepository                 poRepository              = new PoRepository(sqlHelper, entityTrackerRepository, userRepository);
            IUserActivityReportRepository userActivityRepository    = new UserActivityReportRepository(sqlHelper);
            ISupplierInvoiceRepository    supplierInvoiceRepository = new SupplierInvoiceRepository(sqlHelper, poRepository, transactionRepository, userRepository);
            IPackingSlipRepository        pRepository = new PackingSlipRepository(sqlHelper, oRepository, partRepository, entityTrackerRepository, customerRepository, userRepository, supplierInvoiceRepository, userActivityRepository);

            var result = pRepository.GetPackingSlip(id);

            List <CustomerShippingInfo> customerShippingInfos = new List <CustomerShippingInfo>();

            customerShippingInfos.Add(result.customerShippingInfo);
            //packingSlips.Add(GetPackingSlipAsync(id).Result);
            return(customerShippingInfos.ToList());
        }
Exemple #2
0
        public static async Task <PackingSlip> GetPackingSlipAsync(int id)
        {
            ISqlHelper                    sqlHelper                 = new SqlHelper();
            IPriviledgeRepository         priviledgeRepository      = new PriviledgeRepository(sqlHelper);
            IUserRepository               userRepository            = new UserRepository(priviledgeRepository);
            IOrderRepository              oRepository               = new OrderRepository(sqlHelper, userRepository);
            IPartRepository               partRepository            = new PartRepository(sqlHelper, userRepository);
            IEntityTrackerRepository      entityTrackerRepository   = new EntityTrackerRepository(sqlHelper);
            ICustomerRepository           customerRepository        = new CustomerRepository(sqlHelper, userRepository);
            ITransactionRepository        transactionRepository     = new TransactionRepository();
            IUserActivityReportRepository userActivityRepository    = new UserActivityReportRepository(sqlHelper);
            IPoRepository                 poRepository              = new PoRepository(sqlHelper, entityTrackerRepository, userRepository);
            ISupplierInvoiceRepository    supplierInvoiceRepository = new SupplierInvoiceRepository(sqlHelper, poRepository, transactionRepository, userRepository);
            IPackingSlipRepository        pRepository               = new PackingSlipRepository(sqlHelper, oRepository, partRepository, entityTrackerRepository, customerRepository, userRepository, supplierInvoiceRepository, userActivityRepository);

            return(await pRepository.GetPackingSlipAsync(id));
        }
Exemple #3
0
        public static List <PackingSlipReport> GetPackingSlipReport(int id)
        {
            ISqlHelper               sqlHelper               = new SqlHelper();
            PriviledgeRepository     priviledgeRepository    = new PriviledgeRepository(sqlHelper);
            IUserRepository          userRepository          = new UserRepository(priviledgeRepository);
            IEntityTrackerRepository entityTrackerRepository = new EntityTrackerRepository(sqlHelper);
            IOrderRepository         orderRepository         = new OrderRepository(sqlHelper, userRepository, entityTrackerRepository);
            ICompanyRepository       companyRepository       = new CompanyRepository(sqlHelper);
            ICustomerRepository      customerRepository      = new CustomerRepository(sqlHelper, userRepository);
            ISupplierRepository      supplierRepository      = new SupplierRepository(sqlHelper, userRepository);
            IPartRepository          partRepository          = new PartRepository(sqlHelper, userRepository, companyRepository);
            IReportRepository        reportRepository        = new ReportRepository(sqlHelper, orderRepository, companyRepository,
                                                                                    customerRepository, partRepository, supplierRepository);

            var result = reportRepository.GetPackingSlipReport(id);

            return(result);
        }