示例#1
0
        private void 人事设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Renshi a = new Renshi();

            a.MdiParent = this;
            a.Show();
        }
示例#2
0
        //删除选中行
        private void button1_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("请先选择要删除的记录!");
                return;
            }
            DialogResult result = MessageBox.Show("是否要删除该记录?");
            string       name;
            Renshi       s = new Renshi();

            s.Name = name = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();

            dataGridView1.Rows.Remove(dataGridView1.SelectedRows[0]);
        }