Esempio n. 1
0
        public FilterAsifTable GetFilterAsifTable(FilterAsifTableSelected filter)
        {
            FilterAsifTable filterAsifTable = new FilterAsifTable();

            filterAsifTable.Selected = filter;

            var asi = _accountStatementImportService.GetForDetailById(filter.IdImport.Value);

            filterAsifTable.AsiBankAgencyLabel = asi.BankAgency.Label;
            filterAsifTable.AsiDateImport      = asi.DateImport;

            var accounts = _accountStatementImportFileService.GetAccountSelectListByIdImport(filter.IdImport.Value);

            filterAsifTable.Selected.Account = filter.Account == null ? accounts[0] : filter.Account;

            var asifStates = _accountStatementImportFileService.GetAsifStates(filter.IdImport.Value, filterAsifTable.Selected.Account.Id);

            filterAsifTable.Selected.AsifState = filter.AsifState == null ? asifStates[0] : filter.AsifState;
            filterAsifTable.Accounts           = accounts;
            filterAsifTable.AsifStates         = asifStates;

            return(filterAsifTable);
        }