예제 #1
0
        //generate csv button
        private void button1_Click(object sender, EventArgs e)
        {
            string month = _from.ToString("MMMM");
            string year  = DateTime.Now.Year.ToString();

            if (folder == null)
            {
                folder = default_filepath;
            }

            string filename = folder + "\\" + year + "-" + month + ".csv";

            System.IO.Directory.CreateDirectory(folder);
            PHP.Functions.GenerateCSV.ListViewToCSV(ReportTable, TotalsTable, filename);

            var ConfirmationPopup = new Popup_FileGenerated(folder);

            ConfirmationPopup.Show(this);
        }
예제 #2
0
        // generate csv button
        private void button1_Click(object sender, EventArgs e)
        {
            string date      = DateTime.Now.Date.DayOfWeek.ToString();
            string date_from = _from.ToString("d").Replace('/', '-');
            string date_to   = _to.ToString("d").Replace('/', '-');

            if (folder == null)
            {
                folder = default_filepath;
            }

            string filename = folder + "\\" + date_from + " to " + date_to + ".csv";

            System.IO.Directory.CreateDirectory(folder);
            PHP.Functions.GenerateCSV.ListViewToCSV(ReportTable, TotalsTable, filename);

            var ConfirmationPopup = new Popup_FileGenerated(folder);

            ConfirmationPopup.Show(this);
        }