示例#1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int         id   = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value);
            FormUserAdd form = new FormUserAdd(id);

            form.ShowDialog();
        }
示例#2
0
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("请选择要修改的数据!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            int         id   = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value);
            FormUserAdd form = new FormUserAdd(id);

            form.ShowDialog();
        }
示例#3
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            FormUserAdd form = new FormUserAdd(0);

            form.ShowDialog();
        }