Exemple #1
0
        private void btnAddEmp_Click(object sender, EventArgs e)
        {
            if (orgID == 0 || deptID == 0)
            {
                this.ShowMessage("请选择所属部门");
                return;
            }
            frmEditEmp frmEditEmp = new frmEditEmp();

            frmEditEmp.orgID  = (int)orgID;
            frmEditEmp.deptID = (int)deptID;
            frmEditEmp.ShowDialog();
            frmEditEmp.RefreshParentForm += new HR.frmEditEmp.dlgRefreshParentForm(SearchEmp);
        }
Exemple #2
0
        void ModifyEmpRec()
        {
            int rowIndex = -1;

            if (dgvEmp.CurrentCell != null)
            {
                rowIndex = dgvEmp.CurrentCell.RowIndex;
            }
            if (rowIndex >= 0)
            {
                frmEditEmp frmEditEmp = new frmEditEmp();
                frmEditEmp.empID  = (int)dgvEmp["colEmpID", rowIndex].Value;
                frmEditEmp.orgID  = (int)dgvEmp["colOrgID", rowIndex].Value;
                frmEditEmp.deptID = (int)dgvEmp["colDeptID", rowIndex].Value;
                frmEditEmp.ShowDialog();
                frmEditEmp.RefreshParentForm += new HR.frmEditEmp.dlgRefreshParentForm(SearchEmp);
            }
        }