Exemple #1
0
    /// <summary>
    /// Geths the datasource for the grid and binds it
    /// </summary>
    private void LoadExchangeRates()
    {
        //Get the connection manger
        ConnectionManager = SessionManager.GetConnectionManager(this);

        ExchangeRates exchangeRates = new ExchangeRates(ConnectionManager);

        //Use the year selected in the combo
        exchangeRates.Year = int.Parse(cmbYear.Items[cmbYear.SelectedIndex].Text);
        //Get the dataset
        SourceDS = exchangeRates.GetAll(true);

        grdExchangeRates.DataSource = SourceDS;
        grdExchangeRates.DataMember = SourceDS.Tables[0].TableName;
        grdExchangeRates.Rebind();
    }