Exemple #1
0
 //修改按钮
 private void 修改_Click(object sender, EventArgs e)
 {
     if (FormMain.Power == "教师" && treeView1.SelectedNode.Text == "所有教师")
     {
         MessageBox.Show("你无法修改教师", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         if (dataGridView1.SelectedCells.Count == 0)
         {
             MessageBox.Show("请选择要修改的数据", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         else
         {
             if (dataGridView1.SelectedCells[0].Value.ToString() == "")
             {
                 FormCheckuser_Z add = new FormCheckuser_Z();
                 add.ShowDialog();
             }
             else
             {
                 FormCheckuser_G exchange = new FormCheckuser_G();
                 exchange.XGID = dataGridView1.SelectedCells[0].Value.ToString();
                 exchange.XG   = treeView1.SelectedNode.Text;
                 exchange.ShowDialog();
             }
         }
     }
 }
Exemple #2
0
        //添加按钮
        private void 增加_Click(object sender, EventArgs e)
        {
            FormCheckuser_Z ee = new FormCheckuser_Z();

            ee.ShowDialog();
        }