private void btnAddDept_Click(object sender, EventArgs e)
        {
            frmAddDept frm = new frmAddDept();

            frm.username = this.Tag.ToString().Split(',')[0];
            frm.flag     = 0;//新增
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                LoadDeptInfo(string.Empty);
            }
        }
        private void btnUpdateDept_Click(object sender, EventArgs e)
        {
            if (gdvInfo.GetSelectedRows().Count() <= 0)
            {
                MessageBox.Show("请点击选择要修改的行!");
                return;
            }
            frmAddDept frm = new frmAddDept();

            frm.username = this.Tag.ToString().Split(',')[0];
            frm.flag     = 1;//更新
            frm.deptno   = Convert.ToInt32(gdvInfo.GetFocusedRowCellValue("deptno"));
            frm.deptname = gdvInfo.GetFocusedRowCellValue("deptname").ToString();
            frm.remark   = gdvInfo.GetFocusedRowCellValue("remark").ToString();
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                LoadDeptInfo(string.Empty);
            }
        }