예제 #1
0
파일: GLY.cs 프로젝트: Xiaojierui/ASP.NET
 /// <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("选择要修改的行");
     }
 }
예제 #2
0
파일: GLY.cs 프로젝트: Xiaojierui/ASP.NET
        /// <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();
        }