Exemplo n.º 1
0
 private void ExitApplications()
 {
     if (MdiChildren.Length > 0)
     {
         if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionResetApplication) == DialogResult.Yes)
         {
             Application.Exit();
         }
     }
     else
     {
         Application.Exit();
     }
 }
Exemplo n.º 2
0
 private void _010800_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (MdiChildren.Length > 0)
     {
         if (DelMessageBox.DelMessageBoxYN(StringMessage.QuestionResetApplication) == DialogResult.Yes)
         {
             Application.Restart();
         }
     }
     else
     {
         Application.Restart();
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 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();
     }
 }
Exemplo n.º 5
0
        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);
        }