Esempio n. 1
0
        /// <summary>
        /// 添加员工
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEmpolyeeEntry_ItemClick(object sender, ItemClickEventArgs e)
        {
            EmployeeEditForm editForm = new EmployeeEditForm("新员工入职", m_MianDbOp);

            if (editForm.ShowDialog() == DialogResult.OK)
            {
                DataTable pEmployeDt = m_MianDbOp.GetDataTable(Common.Table_Employe);
                Common.CoverTableCaption(pEmployeDt);
                mainGridControl.DataSource = pEmployeDt;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 员工信息修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEmployeeDimission_ItemClick(object sender, ItemClickEventArgs e)
        {
            DataRow pRow = mainGridView.GetFocusedDataRow();

            if (pRow == null)
            {
                XtraMessageBox.Show("请选择需要修改的员工", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            Employee         UpdateEm = new Employee(pRow, m_MianDbOp);
            EmployeeEditForm editForm = new EmployeeEditForm("员工信息修改", m_MianDbOp, UpdateEm);

            if (editForm.ShowDialog() == DialogResult.OK)
            {
                DataTable pEmployeDt = m_MianDbOp.GetDataTable(Common.Table_Employe);
                Common.CoverTableCaption(pEmployeDt);
                mainGridControl.DataSource = pEmployeDt;
            }
        }