Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmUserManageEdit frm = new frmUserManageEdit(EditMode.Add, null);

            frm.MdiParent   = this.MdiParent;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgv.SelectedCells.Count <= 0)
            {
                Func.ShowMessage(MessageType.Error, "请选择一行");
                return;
            }

            int iRowIndex = dgv.CurrentCell.RowIndex;

            EapUser user = new EapUser();

            user.USER_ID   = dgv.Rows[iRowIndex].Cells["USER_ID"].Value.ToString();
            user.USER_NAME = dgv.Rows[iRowIndex].Cells["USER_NAME"].Value.ToString();
            user.IS_STOP   = Convert.ToDecimal(dgv.Rows[iRowIndex].Cells["IS_STOP"].Value.ToString());

            frmUserManageEdit frm = new frmUserManageEdit(EditMode.Edit, user);

            frm.MdiParent   = this.MdiParent;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }