private void ExitApplications() { if (MdiChildren.Length > 0) { if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionResetApplication) == DialogResult.Yes) { Application.Exit(); } } else { Application.Exit(); } }
private void _010800_ItemClick(object sender, ItemClickEventArgs e) { if (MdiChildren.Length > 0) { if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionResetApplication) == DialogResult.Yes) { Application.Restart(); } } else { Application.Restart(); } }
protected virtual bool BarButtonDelete_Click() { if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionDelete, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { DeleteVoucher(); SetNullControl(groHeader); LoadData(); if (grvSearch.RowCount > 0) { VoucherID = grvSearch.GetRowCellValue(0, "VoucherID")?.ToString(); } } return(true); }
protected override void OnClosing(CancelEventArgs e) { if (MdiChildren.Length > 0) { if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionResetApplication) == DialogResult.Yes) { new WriteHistory().EndSession(); } else { e.Cancel = true; } } else { new WriteHistory().EndSession(); Application.Exit(); } }
protected virtual bool BarButtonDelete_Click() { SetStatus("Đang xóa"); if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionDelete, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { functionsGUIService.DeleteRowTable(Table, NameFieldCodePrimary, CodePrimary); SetNullControl(gro_general); LoadData(); if (grv_search.RowCount > 0) { CodePrimary = grv_search.GetRowCellValue(0, NameFieldCodePrimary)?.ToString(); } SetStatus("Xóa thành công"); } SetStatus("Hủy xóa"); return(true); }