Exemplo n.º 1
0
 private void btnClearHis_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure want to clear history ?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         OrderHistoryBUS.clearAll();
         orderHistorysBindingSource.DataSource = OrderHistoryBUS.GetAll();
     }
 }
Exemplo n.º 2
0
 private void btnExport_Click(object sender, EventArgs e)
 {
     progressBar.Visible = true;
     labelStatus.Visible = true;;
     orderHistorysBindingSource.DataSource = OrderHistoryBUS.GetAll();
     if (backgroundWorker.IsBusy)
     {
         return;
     }
     using (SaveFileDialog sfd = new SaveFileDialog()
     {
         Filter = "*.xls|*.xls"
     })
     {
         if (sfd.ShowDialog() == DialogResult.OK)
         {
             input.FileName      = sfd.FileName;
             input.hisList       = OrderHistoryBUS.GetAll();
             progressBar.Minimum = 0;
             progressBar.Value   = 0;
             backgroundWorker.RunWorkerAsync(input);
         }
     }
 }
Exemplo n.º 3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     OrderHistoryBUS.insert();
     orderHistorysBindingSource.DataSource = OrderHistoryBUS.GetAll();
     isSave = true;
 }
Exemplo n.º 4
0
 private void btnRefHis_Click(object sender, EventArgs e)
 {
     orderHistorysBindingSource.DataSource = OrderHistoryBUS.GetAll();
 }