Beispiel #1
0
        public AccountController(IMAccountRepository mAccountRepository, IMAccountCatRepository mAccountCatRepository)
        {
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");
            Check.Require(mAccountCatRepository != null, "mAccountCatRepository may not be null");

            this._mAccountRepository    = mAccountRepository;
            this._mAccountCatRepository = mAccountCatRepository;
        }
Beispiel #2
0
        public InventoryController(ITTransRepository tTransRepository, IMWarehouseRepository mWarehouseRepository, IMSupplierRepository mSupplierRepository, IMItemRepository mItemRepository, ITStockCardRepository tStockCardRepository, ITStockItemRepository tStockItemRepository, ITTransRefRepository tTransRefRepository, ITStockRepository tStockRepository, ITStockRefRepository tStockRefRepository, IMCustomerRepository mCustomerRepository, IMRoomRepository mRoomRepository, IMEmployeeRepository mEmployeeRepository, ITTransDetRepository tTransDetRepository, ITTransRoomRepository tTransRoomRepository, IMPacketRepository mPacketRepository, IMPacketItemCatRepository mPacketItemCatRepository, ITTransDetItemRepository tTransDetItemRepository, IMAccountRefRepository mAccountRefRepository, ITJournalRepository tJournalRepository, ITJournalDetRepository tJournalDetRepository, IMAccountRepository mAccountRepository, IMActionRepository mActionRepository, ITCommissionRepository tCommissionRepository, IMActionCommRepository mActionCommRepository, ITJournalRefRepository tJournalRefRepository)
        {
            Check.Require(tTransRepository != null, "tTransRepository may not be null");
            Check.Require(mWarehouseRepository != null, "mWarehouseRepository may not be null");
            Check.Require(mSupplierRepository != null, "mSupplierRepository may not be null");
            Check.Require(mItemRepository != null, "mItemRepository may not be null");
            Check.Require(tStockCardRepository != null, "tStockCardRepository may not be null");
            Check.Require(tStockItemRepository != null, "tStockItemRepository may not be null");
            Check.Require(tTransRefRepository != null, "tTransRefRepository may not be null");
            Check.Require(tStockRepository != null, "tStockRepository may not be null");
            Check.Require(tStockRefRepository != null, "tStockRefRepository may not be null");
            Check.Require(mCustomerRepository != null, "mCustomerRepository may not be null");
            Check.Require(mRoomRepository != null, "mRoomRepository may not be null");
            Check.Require(mEmployeeRepository != null, "mEmployeeRepository may not be null");
            Check.Require(tTransDetRepository != null, "tTransDetRepository may not be null");
            Check.Require(tTransRoomRepository != null, "tTransRoomRepository may not be null");
            Check.Require(mPacketRepository != null, "mPacketRepository may not be null");
            Check.Require(mPacketItemCatRepository != null, "mPacketItemCatRepository may not be null");
            Check.Require(tTransDetItemRepository != null, "tTransDetItemRepository may not be null");
            //Check.Require(mPacketCommRepository != null, "mPacketCommRepository may not be null");
            Check.Require(mAccountRefRepository != null, "mAccountRefRepository may not be null");
            Check.Require(tJournalRepository != null, "tJournalRepository may not be null");
            Check.Require(tJournalDetRepository != null, "tJournalDetRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");
            Check.Require(mActionRepository != null, "mActionRepository may not be null");
            Check.Require(tCommissionRepository != null, "tCommissionRepository may not be null");
            Check.Require(mActionCommRepository != null, "mActionCommRepository may not be null");
            Check.Require(tJournalRefRepository != null, "tJournalRefRepository may not be null");

            this._tTransRepository         = tTransRepository;
            this._mWarehouseRepository     = mWarehouseRepository;
            this._mSupplierRepository      = mSupplierRepository;
            this._mItemRepository          = mItemRepository;
            this._tStockCardRepository     = tStockCardRepository;
            this._tStockItemRepository     = tStockItemRepository;
            this._tTransRefRepository      = tTransRefRepository;
            this._tStockRepository         = tStockRepository;
            this._tStockRefRepository      = tStockRefRepository;
            this._mCustomerRepository      = mCustomerRepository;
            this._mRoomRepository          = mRoomRepository;
            this._mEmployeeRepository      = mEmployeeRepository;
            this._tTransDetRepository      = tTransDetRepository;
            this._tTransRoomRepository     = tTransRoomRepository;
            this._mPacketRepository        = mPacketRepository;
            this._mPacketItemCatRepository = mPacketItemCatRepository;
            this._tTransDetItemRepository  = tTransDetItemRepository;
            // this._mPacketCommRepository = mPacketCommRepository;
            this._mAccountRefRepository = mAccountRefRepository;
            this._tJournalRepository    = tJournalRepository;
            this._tJournalDetRepository = tJournalDetRepository;
            this._mAccountRepository    = mAccountRepository;
            this._mActionRepository     = mActionRepository;
            this._tCommissionRepository = tCommissionRepository;
            this._mActionCommRepository = mActionCommRepository;
            this._tJournalRefRepository = tJournalRefRepository;
        }
        public JobTypeController(IMJobTypeRepository mJobTypeRepository, IMAccountRefRepository mAccountRefRepository, IMAccountRepository mAccountRepository)
        {
            Check.Require(mJobTypeRepository != null, "mJobTypeRepository may not be null");
            Check.Require(mAccountRefRepository != null, "mAccountRefRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");

            _mJobTypeRepository         = mJobTypeRepository;
            this._mAccountRefRepository = mAccountRefRepository;
            this._mAccountRepository    = mAccountRepository;
        }
Beispiel #4
0
        public SupplierController(IMSupplierRepository mSupplierRepository, IRefAddressRepository refAddressRepository, IMAccountRefRepository mAccountRefRepository, IMAccountRepository mAccountRepository)
        {
            Check.Require(mSupplierRepository != null, "mSupplierRepository may not be null");
            Check.Require(refAddressRepository != null, "refAddressRepository may not be null");
            Check.Require(mAccountRefRepository != null, "mAccountRefRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");

            this._mSupplierRepository   = mSupplierRepository;
            this._refAddressRepository  = refAddressRepository;
            this._mAccountRefRepository = mAccountRefRepository;
            this._mAccountRepository    = mAccountRepository;
        }
Beispiel #5
0
        public static SelectList GetAccounts(IMAccountRepository mAccountRepository, string defaultText)
        {
            IList <MAccount> listAcc = mAccountRepository.GetAll();

            if (!string.IsNullOrEmpty(defaultText))
            {
                MAccount account = new MAccount();
                account.AccountName = defaultText;
                listAcc.Insert(0, account);
            }
            return(new SelectList(listAcc, "Id", "AccountName"));
        }
        public WarehouseController(IMWarehouseRepository mWarehouseRepository, IRefAddressRepository refAddressRepository, IMEmployeeRepository mEmployeeRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRefRepository mAccountRefRepository, IMAccountRepository mAccountRepository)
        {
            Check.Require(mWarehouseRepository != null, "mWarehouseRepository may not be null");
            Check.Require(refAddressRepository != null, "refAddressRepository may not be null");
            Check.Require(mEmployeeRepository != null, "mEmployeeRepository may not be null");
            Check.Require(mCostCenterRepository != null, "mCostCenterRepository may not be null");
            Check.Require(mAccountRefRepository != null, "mAccountRefRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");

            this._mWarehouseRepository  = mWarehouseRepository;
            this._refAddressRepository  = refAddressRepository;
            this._mEmployeeRepository   = mEmployeeRepository;
            this._mCostCenterRepository = mCostCenterRepository;
            this._mAccountRefRepository = mAccountRefRepository;
            this._mAccountRepository    = mAccountRepository;
        }
        public AccountingController(ITJournalRepository tJournalRepository, ITJournalDetRepository tJournalDetRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRepository mAccountRepository, ITRecAccountRepository tRecAccountRepository, ITRecPeriodRepository tRecPeriodRepository, IMAccountCatRepository mAccountCatRepository)
        {
            Check.Require(tJournalRepository != null, "tJournalRepository may not be null");
            Check.Require(tJournalDetRepository != null, "tJournalDetRepository may not be null");
            Check.Require(mCostCenterRepository != null, "mCostCenterRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");
            Check.Require(tRecAccountRepository != null, "tRecAccountRepository may not be null");
            Check.Require(tRecPeriodRepository != null, "tRecPeriodRepository may not be null");
            Check.Require(mAccountCatRepository != null, "mAccountCatRepository may not be null");

            this._tJournalRepository    = tJournalRepository;
            this._tJournalDetRepository = tJournalDetRepository;
            this._mCostCenterRepository = mCostCenterRepository;
            this._mAccountRepository    = mAccountRepository;
            this._tRecAccountRepository = tRecAccountRepository;
            this._tRecPeriodRepository  = tRecPeriodRepository;
            this._mAccountCatRepository = mAccountCatRepository;
        }
Beispiel #8
0
        public PaymentController(ITJournalRepository tJournalRepository, ITJournalDetRepository tJournalDetRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRepository mAccountRepository, ITRecAccountRepository tRecAccountRepository, ITRecPeriodRepository tRecPeriodRepository, IMBrandRepository mBrandRepository, IMSupplierRepository mSupplierRepository, IMWarehouseRepository mWarehouseRepository, IMItemRepository mItemRepository, ITStockCardRepository tStockCardRepository, ITStockItemRepository tStockItemRepository, ITTransDetRepository tTransDetRepository, ITTransRepository tTransRepository, ITPaymentRepository tPaymentRepository, ITPaymentDetRepository tPaymentDetRepository, IMAccountRefRepository mAccountRefRepository, IMCustomerRepository mCustomerRepository)
        {
            Check.Require(tJournalRepository != null, "tJournalRepository may not be null");
            Check.Require(tJournalDetRepository != null, "tJournalDetRepository may not be null");
            Check.Require(mCostCenterRepository != null, "mCostCenterRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");
            Check.Require(tRecAccountRepository != null, "tRecAccountRepository may not be null");
            Check.Require(tRecPeriodRepository != null, "tRecPeriodRepository may not be null");
            Check.Require(mBrandRepository != null, "mBrandRepository may not be null");
            Check.Require(mSupplierRepository != null, "mSupplierRepository may not be null");
            Check.Require(mWarehouseRepository != null, "mBrandRepository may not be null");
            Check.Require(mItemRepository != null, "mItemRepository may not be null");
            Check.Require(tStockCardRepository != null, "tStockCardRepository may not be null");
            Check.Require(tStockItemRepository != null, "tStockItemRepository may not be null");
            Check.Require(tTransDetRepository != null, "tTransDetRepository may not be null");
            Check.Require(tTransRepository != null, "tTransRepository may not be null");
            Check.Require(tPaymentRepository != null, "tPaymentRepository may not be null");
            Check.Require(tPaymentDetRepository != null, "tPaymentDetRepository may not be null");
            Check.Require(mAccountRefRepository != null, "mAccountRefRepository may not be null");
            Check.Require(mCustomerRepository != null, "mCustomerRepository may not be null");


            this._tJournalRepository    = tJournalRepository;
            this._tJournalDetRepository = tJournalDetRepository;
            this._mCostCenterRepository = mCostCenterRepository;
            this._mAccountRepository    = mAccountRepository;
            this._tRecAccountRepository = tRecAccountRepository;
            this._tRecPeriodRepository  = tRecPeriodRepository;
            this._mBrandRepository      = mBrandRepository;
            this._mSupplierRepository   = mSupplierRepository;
            this._mWarehouseRepository  = mWarehouseRepository;
            this._mItemRepository       = mItemRepository;
            this._tStockCardRepository  = tStockCardRepository;
            this._tStockItemRepository  = tStockItemRepository;
            this._tTransDetRepository   = tTransDetRepository;
            this._tTransRepository      = tTransRepository;
            this._tPaymentRepository    = tPaymentRepository;
            this._tPaymentDetRepository = tPaymentDetRepository;
            this._mAccountRefRepository = mAccountRefRepository;
            this._mCustomerRepository   = mCustomerRepository;
        }
        public ReportController(ITJournalRepository tJournalRepository, ITJournalDetRepository tJournalDetRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRepository mAccountRepository, ITRecAccountRepository tRecAccountRepository, ITRecPeriodRepository tRecPeriodRepository, IMBrandRepository mBrandRepository, IMSupplierRepository mSupplierRepository, IMWarehouseRepository mWarehouseRepository, IMItemRepository mItemRepository, ITStockCardRepository tStockCardRepository, ITStockItemRepository tStockItemRepository, ITTransDetRepository tTransDetRepository, ITRealRepository tRealRepository, IVJournalDetFlowRepository vJournalDetFlowRepository, IVStockCardFlowRepository vStockCardFlowRepository)
        {
            Check.Require(tJournalRepository != null, "tJournalRepository may not be null");
            Check.Require(tJournalDetRepository != null, "tJournalDetRepository may not be null");
            Check.Require(mCostCenterRepository != null, "mCostCenterRepository may not be null");
            Check.Require(mAccountRepository != null, "mAccountRepository may not be null");
            Check.Require(tRecAccountRepository != null, "tRecAccountRepository may not be null");
            Check.Require(tRecPeriodRepository != null, "tRecPeriodRepository may not be null");
            Check.Require(mBrandRepository != null, "mBrandRepository may not be null");
            Check.Require(mSupplierRepository != null, "mSupplierRepository may not be null");
            Check.Require(mWarehouseRepository != null, "mBrandRepository may not be null");
            Check.Require(mItemRepository != null, "mItemRepository may not be null");
            Check.Require(tStockCardRepository != null, "tStockCardRepository may not be null");
            Check.Require(tStockItemRepository != null, "tStockItemRepository may not be null");
            Check.Require(tTransDetRepository != null, "tTransDetRepository may not be null");
            Check.Require(tRealRepository != null, "tRealRepository may not be null");
            Check.Require(vJournalDetFlowRepository != null, "vJournalDetFlowRepository may not be null");
            Check.Require(vStockCardFlowRepository != null, "vStockCardFlowRepository may not be null");

            this._tJournalRepository        = tJournalRepository;
            this._tJournalDetRepository     = tJournalDetRepository;
            this._mCostCenterRepository     = mCostCenterRepository;
            this._mAccountRepository        = mAccountRepository;
            this._tRecAccountRepository     = tRecAccountRepository;
            this._tRecPeriodRepository      = tRecPeriodRepository;
            this._mBrandRepository          = mBrandRepository;
            this._mSupplierRepository       = mSupplierRepository;
            this._mWarehouseRepository      = mWarehouseRepository;
            this._mItemRepository           = mItemRepository;
            this._tStockCardRepository      = tStockCardRepository;
            this._tStockItemRepository      = tStockItemRepository;
            this._tTransDetRepository       = tTransDetRepository;
            this._tRealRepository           = tRealRepository;
            this._vJournalDetFlowRepository = vJournalDetFlowRepository;
            this._vStockCardFlowRepository  = vStockCardFlowRepository;
        }
        public static CashFormViewModel CreateCashFormViewModel(ITJournalRepository tJournalRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRepository mAccountRepository)
        {
            CashFormViewModel viewModel = new CashFormViewModel();

            viewModel.CostCenterList = FillHelper.GetCostCenters(mCostCenterRepository, "-Pilih Cost Center-");
            //viewModel.AccountList = FillHelper.GetAccounts(mAccountRepository, "-Pilih Akun Kas-");

            return(viewModel);
        }
        public static CashFormViewModel CreateCashFormViewModel(ITJournalRepository tJournalRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRepository mAccountRepository)
        {
            CashFormViewModel viewModel = new CashFormViewModel();

            IList <MCostCenter> list       = mCostCenterRepository.GetAll();
            MCostCenter         costCenter = new MCostCenter();

            costCenter.CostCenterName = "-Pilih Cost Center-";
            list.Insert(0, costCenter);
            viewModel.CostCenterList = new SelectList(list, "Id", "CostCenterName");

            IList <MAccount> listAcc = mAccountRepository.GetAll();
            MAccount         account = new MAccount();

            account.AccountName = "-Pilih Akun Kas-";
            listAcc.Insert(0, account);
            viewModel.AccountList = new SelectList(listAcc, "Id", "AccountName");

            return(viewModel);
        }