コード例 #1
0
        private void BetaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DS.ClickInit(DisplayView, dataTable, dataSet);

            string sql = "select * from dbo.Users";

            SqlDataAdapter dataAdapter = new SqlDataAdapter(sql, customer);


            dataAdapter.Fill(dataSet);

            dataAdapter.Fill(dataTable);

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                for (int j = 0; j < dataTable.Columns.Count; j++)
                {
                    Console.WriteLine(dataTable.Rows[i][j].ToString());
                }
            }
        }
コード例 #2
0
        private void HouseLookToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataGridViewLeft.Visible = true;
            DsControl.ClickInit(DataGridViewLeft, tbl, dataSet);
            dgv.dgv = DataGridViewLeft;

            string         sql         = "select * from dbo.Housing where Lno = '" + DataSourses.SellerId + "';";
            SqlDataAdapter dataAdapter = new SqlDataAdapter(sql, sellers);

            dataAdapter.Fill(tbl);
            DataGridViewLeft.AllowUserToAddRows = false;

            DataGridViewLeft.DataSource = tbl;
            dgv.Init();
        }