private void 新用户注册ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Add_User add = new Add_User();

            add.type = "1";
            add.ShowDialog();
        }
예제 #2
0
        private void sign_in_Click(object sender, EventArgs e)
        {
            Add_User sign = new Add_User();

            sign.type = "0";
            sign.ShowDialog();
        }
 private void Edit_Info_Click(object sender, EventArgs e)
 {
     if (level1 == "管理员")
     {
         Edit_User edit = new Edit_User();
         edit.ShowDialog();
     }
     if (level1 == "用户")
     {
         Add_User edit = new Add_User();
         edit.type = "3";
         edit.ShowDialog();
     }
 }
 private void 用户信息查询ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (level1 == "管理员")
     {
         Edit_User edit = new Edit_User();
         edit.ShowDialog();
     }
     if (level1 == "用户")
     {
         Add_User add = new Add_User();
         add.type = "4";
         add.ShowDialog();
     }
 }
 private void 用户信息修改ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (PublicPassBy.level == "管理员")
     {
         Edit_User edit = new Edit_User();
         edit.ShowDialog();
     }
     if (level1 == "用户")
     {
         Add_User edit = new Add_User();
         edit.type = "3";
         edit.ShowDialog();
     }
 }
 private void Add_User_Click(object sender, EventArgs e)
 {
     if (level1 == "管理员")
     {
         Add_User add = new Add_User();
         add.type = "1";
         add.ShowDialog();
     }
     if (level1 == "用户")
     {
         Add_User add = new Add_User();
         add.type = "3";
         add.ShowDialog();
     }
 }
        private void button_Edit_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.RowCount == 0)
            {
                MessageBox.Show("请先选择数据");
                return;
            }
            Add_User edit = new Add_User();

            edit.type      = "2";
            edit.select_ID = (string)dataGridView1.CurrentCell.Value;
            //edit.select_ID = this.dataGridView1.SelectedRows[1].Cells[1].Value.ToString();//获取选中行的第一个单元格的值
            if ((string)dataGridView1.CurrentCell.Value == "")
            {
                MessageBox.Show("你没选中");
                return;
            }
            edit.ShowDialog();
        }