private void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var dt = services.GetRegularParkerDataTable(); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "Regular Parkers Report"; if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }
private async void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var dt = await services.GetUserAccessMatrixDatatableAsync(cboUser.SelectedValue.ToString()); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "User Access Matrix Report " + DateTime.Now.ToString("MMddyyyy"); if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }
private async void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var dt = await services.OperationOccupancyReportDataTableAsync(dtDate.Value); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "Operation Occupancy Report " + dtDate.Value.ToString("MMddyyyy"); if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }
private async void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var from = DateTimeConverter.GetDateTime(dtFrom, timeFrom); var to = DateTimeConverter.GetDateTime(dtTo, timeTo); var dt = await services.AuditPerTerminalDataTableAsync(from, to, cbTerminal.SelectedValue.ToString()); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "Audit Per Terminal Report " + from.ToString("MMddyyyy hhmmsstt") + "-" + to.ToString("MMddyyyy hhmmsstt"); if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }
private async void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var month = int.Parse(cboMonth.SelectedValue.ToString()); var year = int.Parse(cboYear.SelectedValue.ToString()); var dateFrom = new DateTime(year, month, 1); var dateTo = dateFrom.AddMonths(1).AddDays(-1); var dt = await services.BIRReportDataTableAsync(dateFrom, dateTo, cbTerminal.SelectedValue.ToString()); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "BIR Report " + dateFrom.ToString("MMddyyy") + "-" + dateTo.ToString("MMddyyyy"); if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }
private async void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var from = DateTimeConverter.GetDateTime(dtFrom, timeFrom); var to = DateTimeConverter.GetDateTime(dtTo, timeTo); var dt = await services.GetHistoryDataTableAsync(from, to, cboTerminal.SelectedValue.ToString(), txtSearch.Text.Trim(), rbExit.Checked); dt.Columns.Remove("TransitId"); dt.AcceptChanges(); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "History Report " + from.ToString("MMddyyyy hhmmsstt") + "-" + to.ToString("MMddyyyy hhmmsstt"); if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }
private async void btnCsv_Click(object sender, EventArgs e) { btnCsv.Enabled = false; var from = DateTimeConverter.GetDateTime(dtFrom, timeFrom); var to = DateTimeConverter.GetDateTime(dtTo, timeTo); var terminal = int.Parse(cbTerminal.SelectedValue.ToString()); var dt = await services.CashierAccountabilityDataTableAsync(from, to, terminal); dt.Columns.Remove("Row"); dt.AcceptChanges(); SaveFileDialog sd = new SaveFileDialog(); sd.Filter = "CSV Files(*.csv) | *.csv"; sd.Title = "Save Csv File"; sd.FileName = "Cashier Accountability Report " + from.ToString("MMddyyyy hhmmsstt") + "-" + to.ToString("MMddyyyy hhmmsstt"); if (sd.ShowDialog() != DialogResult.Cancel) { FileExport.ExportToCsv(dt, sd.FileName); } btnCsv.Enabled = true; }