Rock.Apps.StatementGenerator.SelectAccountsPage.SelectAccountsPage C# (CSharp) Method

SelectAccountsPage() public method

Initializes a new instance of the SelectAccountsPage class.
public SelectAccountsPage ( ) : System.Collections.Generic
return System.Collections.Generic
        public SelectAccountsPage()
        {
            InitializeComponent();

            RockConfig rockConfig = RockConfig.Load();

            _rockRestClient = new RockRestClient( rockConfig.RockBaseUrl );
            _rockRestClient.Login( rockConfig.Username, rockConfig.Password );

            var accounts = _rockRestClient.GetData<List<Rock.Client.FinancialAccount>>( "api/FinancialAccounts" );

            lstAccounts.ItemsSource = accounts.OrderBy( a => a.Order ).ThenBy( a => a.Name ).Select( a => new NameIdIsChecked { Id = a.Id, Name = a.Name, IsChecked = true } );

            lblWarning.Visibility = Visibility.Hidden;
        }