Beispiel #1
0
 /// <summary>
 /// 老师修改学生信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         if (Istuid >= 0)
         {
             XJGLYM fin = new XJGLYM(UpdataGridView12, Istuid);
             fin.ShowDialog();
         }
         else if (Str != null)
         {
             string selectId = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
             XJGLYM f        = new XJGLYM(UpdataGridView1, selectId);
             f.ShowDialog();
         }
     }
     catch
     {
         MessageBox.Show("选择要修改的行");
     }
 }
Beispiel #2
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            XJGLYM f = new XJGLYM(UpdataGridView11, null);

            f.ShowDialog();
        }