コード例 #1
0
        private void mainFrm_Load(object sender, EventArgs e)
        {
            factions      = new FactionsSQL();
            factionMatrix = new FactionMatrixSQL();

            object[] dataSource = new object[2];
            for (int i = 0; i < factions.getFactionTable().Rows.Count; i++)
            {
                dataSource[0] = factions.getFactionTable().Rows[i]["faction_id"].ToString();
                dataSource[1] = factions.getFactionTable().Rows[i]["name"].ToString();

                dataGridView1.Rows.Add(dataSource);
            }
        }
コード例 #2
0
        private void toolStripButton5_Click(object sender, EventArgs e)
        {
            dataGridView1.Rows.Clear();
            factions = new FactionsSQL();

            object[] dataSource = new object[2];
            for (int i = 0; i < factions.getFactionTable().Rows.Count; i++)
            {
                dataSource[0] = factions.getFactionTable().Rows[i]["faction_id"].ToString();
                dataSource[1] = factions.getFactionTable().Rows[i]["name"].ToString();

                dataGridView1.Rows.Add(dataSource);
            }
        }