Exemplo n.º 1
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     EmployerCur.EmpName = textEmp.Text;
     if (IsNew)
     {
         Employers.Insert(EmployerCur);
     }
     else
     {
         Employers.Update(EmployerCur);
     }
     DialogResult = DialogResult.OK;
 }
Exemplo n.º 2
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(textEmp.Text))
            {
                MsgBox.Show(this, "Please enter an employer name.");
                return;
            }
            Employer empOld = EmployerCur.Copy();

            EmployerCur.EmpName = textEmp.Text;
            if (IsNew)
            {
                Employers.Insert(EmployerCur);
            }
            else
            {
                Employers.Update(EmployerCur, empOld);
            }
            DialogResult = DialogResult.OK;
        }