Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            int index = this.dataGridView1.CurrentRow.Index;

            if (index < 0)
            {
                MessageBox.Show("请选择要修改的记录!", "提示");
                return;
            }
            else
            {
                try
                {
                    StudentItem.InsertStudent f1 = new InsertStudent(ds.Tables[0].Rows[index]["StudentNumber"].ToString());

                    f1.ShowDialog();
                }
                catch
                {
                    MessageBox.Show("一定要先按Search!!", "错误");
                }
            }
        }
Beispiel #2
0
 private void studentInsertToolStripMenuItem_Click(object sender, EventArgs e)
 {
     StudentItem.InsertStudent f = new StudentItem.InsertStudent("");
     f.ShowDialog();
 }