コード例 #1
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Delete all selected rows?", "Warning", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         BUS_Suppliers bus = new BUS_Suppliers();
         bus.deleteSuppliers(dataGridView1);
     }
     refreshData();
 }
コード例 #2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Save all modified rows?", "Warning", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         BUS_Suppliers bus = new BUS_Suppliers();
         bus.updateSuppliers((DataTable)dataGridView1.DataSource);
     }
     refreshData();
 }
コード例 #3
0
        void refreshData()
        {
            BUS_Suppliers bus = new BUS_Suppliers();

            dataGridView1.DataSource = bus.getSuppliers();
        }
コード例 #4
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BUS_Suppliers bus = new BUS_Suppliers();

            dataGridView1.DataSource = bus.getSuppliers();
        }