Пример #1
0
        private void toolStripButtonAddNew_Click(object sender, EventArgs e)
        {
            frmAddUser add = new frmAddUser();

            //CommStatic.FrmAddUser= add;
            if (add.ShowDialog() == DialogResult.OK)
            {
                InitList();
            }
            CommStatic.TxtBoxCardId = txtCardId;
        }
Пример #2
0
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection col = dgvUserList.SelectedRows;

            if (col.Count < 1)
            {
                MessageBox.Show("请选择要编辑的项目");
                return;
            }
            DataTable  dt   = dgvUserList.DataSource as DataTable;
            DataRow    row  = dt.Rows[col[0].Index];
            frmAddUser edit = new frmAddUser(row);

            // CommStatic.FrmAddUser = edit;
            if (edit.ShowDialog() == DialogResult.OK)
            {
                InitList();
            }
            CommStatic.TxtBoxCardId = txtCardId;
        }