コード例 #1
0
        /// <summary>
        /// Gets the tax returns ListView.
        /// </summary>
        /// <param name="taxReturnListView">The tax return ListView.</param>
        /// <returns></returns>
        public ITaxReturnListView GetTaxAuthorityTaxReturnsView(ITaxReturnListView taxReturnListView)
        {
            var taxReturnInfo  = new List <ITaxReturn>();
            var jurisdictionId = (int)session.GetSessionValue(SessionKey.JurisdictionId);
            var branches       = this.agentOfDeductionRepository.GetBranchByJurisdiction(jurisdictionId);



            var taxReturn = this.agentOfDeductionRepository.GetTaxReturnByJurisdictionId(jurisdictionId);

            taxReturnInfo = taxReturn.Where(x => x.BranchId == taxReturnListView.BranchId && x.ContractDate >= taxReturnListView.StartDate && x.ContractDate <= taxReturnListView.EndDate).OrderBy(x => x.IncomeTypeName).ToList();



            return(this.agentOfDeductionFactory.GetTaxReturnListView(taxReturnInfo, branches, taxReturnListView));
        }
コード例 #2
0
        /// <summary>
        /// Gets the system admin tax returns view.
        /// </summary>
        /// <param name="taxReturnListView">The tax return ListView.</param>
        /// <returns></returns>
        public ITaxReturnListView GetSystemAdminTaxReturnsView(ITaxReturnListView taxReturnListView)
        {
            var taxReturnInfo       = new List <ITaxReturn>();
            var agentOfDeductionnfo = this.generalRepository.GetAgentOFDeduction();
            var jurisdictionInfo    = this.generalRepository.GetJurisdiction();

            if (taxReturnListView.JurisdictionId > 0)
            {
                var taxReturnList = this.agentOfDeductionRepository.GetTaxReturnList();
                taxReturnInfo = taxReturnList.Where(x => x.JurisdictionId == taxReturnListView.JurisdictionId && x.ContractDate >= taxReturnListView.StartDate && x.ContractDate <= taxReturnListView.EndDate).OrderBy(x => x.IncomeTypeName).ToList();
            }
            else
            {
                var taxReturn = this.agentOfDeductionRepository.GetTaxReturnList();
                taxReturnInfo = taxReturn.Where(x => x.BranchId == taxReturnListView.BranchId && x.ContractDate >= taxReturnListView.StartDate && x.ContractDate <= taxReturnListView.EndDate).OrderBy(x => x.IncomeTypeName).ToList();
            }

            return(this.agentOfDeductionFactory.GetTaxReturnView(taxReturnInfo, agentOfDeductionnfo, jurisdictionInfo, taxReturnListView));
        }
コード例 #3
0
        /// <param name="branches">The branches.</param>
        /// <param name="incomeTypes">The income types.</param>
        /// <returns></returns>
        public ITaxReturnListView GetTaxReturnView(IList <ITaxReturn> taxReturns, IList <IAgentOfDeduction> agentOfDeductions, IList <IJurisdiction> jurisdictions, ITaxReturnListView taxReturnListView)
        {
            var jurisdictionDDL = GetJurisdictionDropdown.GetJurisdicions(jurisdictions, -1);

            var agentOfDeductonDDL = GetAgentOfDeductionDropdown.AgentOfDeductionListItems(agentOfDeductions, -1);

            var view = new TaxReturnListView
            {
                TaxReturnCollection = taxReturns,
                Branch                = new List <SelectListItem>(),
                JurisdictionList      = jurisdictionDDL,
                AgentOfDeductionList  = agentOfDeductonDDL,
                SelectedBranchId      = taxReturnListView.BranchId,
                SelectedJursidctionId = taxReturnListView.JurisdictionId
            };

            return(view);
        }
コード例 #4
0
        /// <summary>
        /// Gets the tax return ListView.
        /// </summary>
        /// <param name="taxReturns">The tax returns.</param>
        /// <param name="branches">The branches.</param>
        /// <param name="incomeTypes">The income types.</param>
        /// <returns></returns>
        public ITaxReturnListView GetTaxReturnListView(IList <ITaxReturn> taxReturns, IList <IBranch> branches, ITaxReturnListView taxReturnListView)
        {
            var branchType = GetBranchDropdownList.BranchListItems(branches, -1);


            var view = new TaxReturnListView
            {
                TaxReturnCollection = taxReturns,
                Incometype          = new List <SelectListItem>(),
                Branch           = branchType,
                SelectedBranchId = taxReturnListView.BranchId
            };

            return(view);
        }