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()); }
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)); }
public RepositoryFactory() { Repository bankRepository = new Repository(new Bank()); CurrencyRepository ccyRepository = new CurrencyRepository(); Repository divRepository = new Repository(new Division()); Repository empRepository = new EmployeeRepository(new Employee()); Repository topRepository = new Repository(new TermOfPayment()); Repository unitRepository = new Repository(new Unit()); Repository cuscatRepository = new Repository(new CustomerCategory()); Repository supcatRepository = new Repository(new SupplierCategory()); Repository pricecatRepository = new Repository(new PriceCategory()); Repository taxRepository = new Repository(new Tax()); Repository prtGroupRepository = new Repository(new PartGroup()); Repository warehouseRepository = new Repository(new Warehouse()); Repository prtCategoryRepository = new Repository(new PartCategory()); Repository docTypeRepository = new Repository(new DocumentType()); Repository excRateRepository = new Repository(new ExchangeRate()); CustomerRepository customerRepository = new CustomerRepository(); SupplierRepository supplierRepository = new SupplierRepository(); Repository yearRepository = new YearRepository(); Repository partRepository = new PartRepository(new Part()); StockTakingRepository stocktakingRepository = new StockTakingRepository(); UserRepository userRepository = new UserRepository(new User()); GeneralSetupRepository generalsetupRepository = new GeneralSetupRepository(); PurchaseOrderRepository poRepository = new PurchaseOrderRepository(); PeriodRepository periodRepository = new PeriodRepository(); UserSettingsRepository usRepository = new UserSettingsRepository(); GoodReceiveNoteRepository grnRepository = new GoodReceiveNoteRepository(); PurchaseReturnRepository prRepository = new PurchaseReturnRepository(); SupplierInvoiceRepository siRepository = new SupplierInvoiceRepository(); SupplierOutStandingInvoiceRepository soiRepository = new SupplierOutStandingInvoiceRepository(); SupplierInvoiceJournalRepository sijRepository = new SupplierInvoiceJournalRepository(); PaymentRepository payRepository = new PaymentRepository(); APDebitNoteRepository apdnRepository = new APDebitNoteRepository(); ProcessTransactionRepository prtrRepository = new ProcessTransactionRepository(); SalesOrderRepository slsorderRepository = new SalesOrderRepository(); DeliveryOrderRepository doRepository = new DeliveryOrderRepository(); SalesReturnRepository srRepository = new SalesReturnRepository(); CustomerOutStandingInvoiceRepository coirRepository = new CustomerOutStandingInvoiceRepository(); CustomerInvoiceRepository cirRepository = new CustomerInvoiceRepository(); ReceiptRepository rcptRepository = new ReceiptRepository(); ARCreditNoteRepository arcrRepository = new ARCreditNoteRepository(); CustomerInvoiceJournalRepository cijRepository = new CustomerInvoiceJournalRepository(); OpeningStockRepository opstRepository = new OpeningStockRepository(); POSRepository posRepository = new POSRepository(); m_listService.Add(BANK_REPOSITORY, bankRepository); m_listService.Add(CURRENCY_REPOSITORY, ccyRepository); m_listService.Add(DIVISION_REPOSITORY, divRepository); m_listService.Add(EMPLOYEE_REPOSITORY, empRepository); m_listService.Add(TOP_REPOSITORY, topRepository); m_listService.Add(UNIT_REPOSITORY, unitRepository); m_listService.Add(CUSTOMER_CATEGORY_REPOSITORY, cuscatRepository); m_listService.Add(SUPPLIER_CATEGORY_REPOSITORY, supcatRepository); m_listService.Add(PRICE_CATEGORY_REPOSITORY, pricecatRepository); m_listService.Add(TAX_REPOSITORY, taxRepository); m_listService.Add(PART_GROUP_REPOSITORY, prtGroupRepository); m_listService.Add(WAREHOUSE_REPOSITORY, warehouseRepository); m_listService.Add(PART_CATEGORY_REPOSITORY, prtCategoryRepository); m_listService.Add(DOC_TYPE_REPOSITORY, docTypeRepository); m_listService.Add(EXCHANGE_RATE_REPOSITORY, excRateRepository); m_listService.Add(CUSTOMER_REPOSITORY, customerRepository); m_listService.Add(SUPPLIER_REPOSITORY, supplierRepository); m_listService.Add(YEAR_REPOSITORY, yearRepository); m_listService.Add(PART_REPOSITORY, partRepository); m_listService.Add(STOCKTAKING_REPOSITORY, stocktakingRepository); m_listService.Add(USER_REPOSITORY, userRepository); m_listService.Add(GENERAL_SETUP_REPOSITORY, generalsetupRepository); m_listService.Add(PURCHASEORDER_REPOSITORY, poRepository); m_listService.Add(PERIOD_REPOSITORY, periodRepository); m_listService.Add(USER_SETTING_REPOSITORY, usRepository); m_listService.Add(GOODRECEIVENOTE_REPOSITORY, grnRepository); m_listService.Add(PURCHASE_RETURN_REPOSITORY, prRepository); m_listService.Add(SUPPLIERINVOICE_REPOSITORY, siRepository); m_listService.Add(SUPPLIERINVOICE_JOURNAL_REPOSITORY, sijRepository); m_listService.Add(SUPPLIER_OUTSTANDING_INVOICE_REPOSITORY, soiRepository); m_listService.Add(PAYMENT_REPOSITORY, payRepository); m_listService.Add(APDEBITNOTE_REPOSITORY, apdnRepository); m_listService.Add(PROCESS_TRANSACTION_REPOSITORY, prtrRepository); m_listService.Add(SALES_ORDER_REPOSITORY, slsorderRepository); m_listService.Add(DELIVERY_ORDER_REPOSITORY, doRepository); m_listService.Add(SALES_RETURN_REPOSITORY, srRepository); m_listService.Add(CUSTOMER_OUTSTANDING_INVOICE_REPOSITORY, coirRepository); m_listService.Add(CUSTOMERINVOICE_REPOSITORY, cirRepository); m_listService.Add(RECEIPT_REPOSITORY, rcptRepository); m_listService.Add(ARCREDITNOTE_REPOSITORY, arcrRepository); m_listService.Add(CUSTOMERINVOICE_JOURNAL_REPOSITORY, cijRepository); m_listService.Add(OPENING_STOCK_REPOSITORY, opstRepository); m_listService.Add(POS_REPOSITORY, posRepository); }