Exemplo n.º 1
0
 private void butDelete_Click(object sender, EventArgs e)
 {
     if (_isInsertMode)             //Creating new TimeCardRules, nothing to delete.
     {
         DialogResult = DialogResult.Cancel;
         return;
     }
     if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Are you sure you want to delete this time card rule?"))
     {
         return;
     }
     TimeCardRules.Delete(_timeCardRule.TimeCardRuleNum);
     DialogResult = DialogResult.OK;
 }
Exemplo n.º 2
0
 private void butDelete_Click(object sender, EventArgs e)
 {
     if (timeCardRule.IsNew)
     {
         DialogResult = DialogResult.Cancel;
         return;
     }
     if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Are you sure you want to delete this time card rule?"))
     {
         return;
     }
     TimeCardRules.Delete(timeCardRule.TimeCardRuleNum);
     DialogResult = DialogResult.OK;
 }