Esempio n. 1
0
        public override void Delete(object sender, EventArgs e)
        {
            if (dgvEmployee.SelectedRows.Count < 1)
            {
                frm.NoticeMessage = Resources.DelEmpty;
            }

            if (rdoResign.Checked && dgvEmployee.SelectedRows.Count > 0)
            {
                frm.NoticeMessage = Properties.Resources.DelResigndateError;
            }

            if (rdoWork.Checked && dgvEmployee.SelectedRows.Count > 0)
            {
                if (MessageBox.Show("삭제하시겠습니까?", "확인", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    try
                    {
                        StandardService service = new StandardService();
                        service.DeleteEmployee(item.Employees_ID);
                    }
                    catch (Exception err)
                    {
                        Log.WriteError(err.Message, err);
                    }
                    frm.NoticeMessage      = Resources.DeleteDone;
                    dgvEmployee.DataSource = null;
                    LoadGridView();
                }
            }
        }