Exemple #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            AddUserFrm addFrm = new AddUserFrm();

            addFrm.Text = "添加用户信息";
            addFrm.ShowDialog();

            refreshDataGridView();
        }
Exemple #2
0
        private void buttonModify_Click(object sender, EventArgs e)
        {
            if (null == dataGridViewUser.CurrentRow)
            {
                return;
            }
            int        index  = dataGridViewUser.CurrentRow.Index;
            AddUserFrm addFrm = new AddUserFrm();

            addFrm.setUserId(int.Parse(dataGridViewUser.Rows[index].Cells["Id"].Value.ToString()));
            addFrm.fillField();
            addFrm.Text = "修改用户信息";
            addFrm.ShowDialog();

            refreshDataGridView();
        }