public BranchController(IErrorLog errorLog, IBranchRepository branchContext, ILedgerAccountRepository iLedgerAccountRepository) { _errorLog = errorLog; _iLedgerAccountRepository = iLedgerAccountRepository; _branchContext = branchContext; companyId = Convert.ToInt32(HttpContext.Current.Session["CompanyId"]); }
public SupplierProfileController(IErrorLog errorLog, ILedgerAccountRepository iLedgerAccountRepository, ISupplierProfileRepository supplierProfileRepository, IMerchantDataRepository merchantDataRepository, IAccountingRepository iAccountingRepository) : base(errorLog, merchantDataRepository) //inorder to get companyid i changed apicontroller to basecontroller and inherited base() { _errorLog = errorLog; _iAccountingRepository = iAccountingRepository; _supplierProfileContext = supplierProfileRepository; _iLedgerAccountRepository = iLedgerAccountRepository; companyId = MerchantContext.CompanyDetails.Id; }
public LedgerAccountController(IErrorLog iErrorLog, ILedgerAccountRepository ledgerAccountRepository, IGroupAccountRepository groupAccountRepository, IMerchantDataRepository merchantDataRepository, IAccountingRepository accountingRepository) : base(iErrorLog, merchantDataRepository) { _errorLog = iErrorLog; _ledgerAccountRepository = ledgerAccountRepository; _accountingRepository = accountingRepository; _groupAccountRepository = groupAccountRepository; CurrentCompanyId = MerchantContext.CompanyDetails.Id; }