private void butDelete_Click(object sender, EventArgs e) { if (TaskNoteCur.IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } TaskNotes.Delete(TaskNoteCur.TaskNoteNum); DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, EventArgs e) { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } if (TaskNoteCur.IsNew) { DialogResult = DialogResult.Cancel; Close(); //Needed because the window is called as a non-modal window. return; } TaskNotes.Delete(TaskNoteCur.TaskNoteNum); DialogResult = DialogResult.OK; OnEditComplete(); Close(); //Needed because the window is called as a non-modal window. }
private void butDelete_Click(object sender, EventArgs e) { if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } if (TaskNoteCur.IsNew) { DialogResult = DialogResult.Cancel; Close(); //Needed because the window is called as a non-modal window. return; } TaskNotes.Delete(TaskNoteCur.TaskNoteNum); DialogResult = DialogResult.OK; OnEditComplete(); Tasks.TaskEditCreateLog(Permissions.TaskNoteEdit, Lan.g(this, "Deleted note from task"), Tasks.GetOne(TaskNoteCur.TaskNum)); Close(); //Needed because the window is called as a non-modal window. }