コード例 #1
0
        private void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.Enabled = false;
            var            dt = services.GetRegularParkerDataTable();
            SaveFileDialog sd = new SaveFileDialog();

            sd.Filter   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "Regular Parkers Report";
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }
コード例 #2
0
        private async void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.Enabled = false;
            var dt = await services.GetUserAccessMatrixDatatableAsync(cboUser.SelectedValue.ToString());

            SaveFileDialog sd = new SaveFileDialog();

            sd.Filter   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "User Access Matrix Report " + DateTime.Now.ToString("MMddyyyy");
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }
コード例 #3
0
        private async void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.Enabled = false;
            var dt = await services.OperationOccupancyReportDataTableAsync(dtDate.Value);

            SaveFileDialog sd = new SaveFileDialog();

            sd.Filter   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "Operation Occupancy Report " + dtDate.Value.ToString("MMddyyyy");
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }
コード例 #4
0
ファイル: AuditTrail.cs プロジェクト: mendozaarjay/PMSReports
        private void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.Enabled = false;
            var            from = DateTimeConverter.GetDateTime(dtFrom, timeFrom);
            var            to   = DateTimeConverter.GetDateTime(dtTo, timeTo);
            var            dt   = services.AuditTrailDataTable(from, to, cbTerminal.SelectedValue.ToString(), txtKeyword.Text);
            SaveFileDialog sd   = new SaveFileDialog();

            sd.Filter   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "Audit Trail Report " + from.ToString("MMddyyyy hhmmsstt") + "-" + to.ToString("MMddyyyy hhmmsstt");
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }
コード例 #5
0
        private async void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.Enabled = false;
            var from = DateTimeConverter.GetDateTime(dtFrom, timeFrom);
            var to   = DateTimeConverter.GetDateTime(dtTo, timeTo);
            var dt   = await services.HourlyAccountabilityReportDatatableAsync(from, to, cbTerminal.SelectedValue.ToString());

            SaveFileDialog sd = new SaveFileDialog();

            sd.Filter   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "Hourly Accountability Report " + from.ToString("MMddyyyy hhmmsstt") + "-" + to.ToString("MMddyyyy hhmmsstt");
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }
コード例 #6
0
ファイル: BIR.cs プロジェクト: mendozaarjay/PMSReports
        private async void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.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   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "BIR Report " + dateFrom.ToString("MMddyyyy") + "-" + dateTo.ToString("MMddyyyy");
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }
コード例 #7
0
ファイル: History.cs プロジェクト: mendozaarjay/PMSReports
        private async void btnExcel_Click(object sender, EventArgs e)
        {
            btnExcel.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   = "Excel File(.xlsx)|*.xlsx";
            sd.Title    = "Save Excel File";
            sd.FileName = "History Report " + from.ToString("MMddyyyy hhmmsstt") + "-" + to.ToString("MMddyyyy hhmmsstt");
            if (sd.ShowDialog() != DialogResult.Cancel)
            {
                ExportToExcelFile.Export(dt, sd.FileName);
            }
            btnExcel.Enabled = true;
        }