Ejemplo n.º 1
0
        private void btnExportDailyLog_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                int identityId = Convert.ToInt32(cboClient.SelectedValue);

                DateTime start = dteStartDate.SelectedDate.Value;

                start = start.Subtract(start.TimeOfDay);

                DateTime end = dteEndDate.SelectedDate.Value;

                end = end.Subtract(end.TimeOfDay).Add(new TimeSpan(23, 59, 59));

                Facade.IJob facJob = new Facade.Job();

                DataSet dsCallInSheet = null;

                dsCallInSheet = facJob.GetDailyLogExportCSV(identityId, start, end);
                //dsCallInSheet = facJob.GetCallInSheetForClient(identityId, start, end, chkShowLatesOnly.Checked);

                Session["__ExportDS"] = dsCallInSheet.Tables[0];

                Server.Transfer("../Reports/csvexport.aspx?filename=DailyLogExport.csv");
            }
        }