public void ShowIncomeTypes()
        {
            SqlDataAdapter adapter;
            DataSet        dataSet;
            string         sqlQuery = "select * from Income_Types;";

            adapter = new SqlDataAdapter(sqlQuery, connect.GetConnection());
            dataSet = new DataSet();
            connect.OpenConnection();
            adapter.Fill(dataSet, "Income_Types");
            activeForm.DataGridViewIncomeTypes.DataSource = dataSet.Tables["Income_Types"];
            connect.CloseConnection();
        }
Esempio n. 2
0
        public void ShowUsersList()
        {
            SqlDataAdapter adapter;
            DataSet        dataSet;
            string         sqlQuery = "select id, email, cash from Users;";

            adapter = new SqlDataAdapter(sqlQuery, connect.GetConnection());
            dataSet = new DataSet();
            connect.OpenConnection();
            adapter.Fill(dataSet, "Users");
            activeMenu.UsersListDataGridView.DataSource = dataSet.Tables["Users"];
            connect.CloseConnection();
        }