/// <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);
        }
        public IBranchListView GetBranchUserListView(IList <IUserRegistration> userRegistrations, IList <IBranch> branches)
        {
            var userType = GetUserDropdown.UserListItems(userRegistrations, -1);

            var branchType = GetBranchDropdownList.BranchListItems(branches, -1);

            var view = new BranchListView
            {
                BranchCollection = branches,
                BranchNames      = branchType,
                UserNames        = userType,
            };

            return(view);
        }
        /// <summary>
        /// Gets the updated branch user ListView.
        /// </summary>
        /// <param name="userRegistrations">The user registrations.</param>
        /// <param name="branches">The branches.</param>
        /// <param name="branchUserListView">The branch user ListView.</param>
        /// <param name="processingMessage">The processing message.</param>
        /// <returns></returns>
        public IBranchListView GetUpdatedBranchUserListView(IList <IUserRegistration> userRegistrations, IList <IBranch> agentOfDeductionBranches, IBranchListView branchUserListView, string processingMessage)
        {
            var userType = GetUserDropdown.UserListItems(userRegistrations, branchUserListView.UserId);

            var branchType = GetBranchDropdownList.BranchListItems(agentOfDeductionBranches, branchUserListView.BranchId);


            var view = new BranchListView
            {
                BranchNames       = branchType,
                UserNames         = userType,
                ProcessingMessage = processingMessage
            };

            return(view);
        }
        /// <summary>
        /// Gets the branch user ListView.
        /// </summary>
        /// <param name="userRegistrations">The user registrations.</param>
        /// <param name="branches">The branches.</param>
        /// <returns></returns>
        public IBranchListView GetBranchUserListView(IList <IUserRegistration> userRegistrations, IList <IBranch> branchesUsers, IList <IBranch> branches, string infoMessage, int branchId)
        {
            var userType = GetUserDropdown.UserListItems(userRegistrations, -1);

            var branchType = GetBranchDropdownList.BranchListItems(branches, -1);

            var view = new BranchListView
            {
                BranchCollection  = branchesUsers,
                BranchNames       = branchType,
                UserNames         = userType,
                ProcessingMessage = infoMessage,
                BranchId          = branchId
            };

            return(view);
        }
        /// <summary>
        /// Creates the branch view.
        /// </summary>
        /// <param name="branches">The branches.</param>
        /// <returns></returns>
        public IBranchListView CreateBranchView(IList <IBranch> branches, string infomessage, IDigitalFile fileType)
        {
            int?fileTypeId = 0;

            if (fileType != null)
            {
                fileTypeId = fileType.DigitalFileId;
            }
            var branchDDL = GetBranchDropdownList.BranchListItems(branches, -1);

            var branchView = new BranchListView
            {
                FileTypeId        = fileTypeId,
                BranchNames       = branchDDL,
                IncomeTypeNames   = new List <SelectListItem>(),
                ProcessingMessage = infomessage,
            };

            return(branchView);
        }