예제 #1
0
 private void topURLToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         DateTime       dtStart = DateTime.Parse(tbStart.Text), dtEnd = DateTime.Parse(tbEnd.Text);
         ReportDocument rep = Report.MakeTopHostRep(dtStart, dtEnd);
         ReportForm     rf  = new ReportForm(rep, "Максимальный трафик сайтов");
         rf.MdiParent = this;
         rf.Show();
     }
     catch
     {
         MessageBox.Show("Ошибка создания отчета");
     }
 }
예제 #2
0
 private void userToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         DateTime       dtStart = DateTime.Parse(tbStart.Text), dtEnd = DateTime.Parse(tbEnd.Text);
         ReportDocument rep = Report.MakeUserHostRep(dtStart, dtEnd);
         ReportForm     rf  = new ReportForm(rep, "Пользователи");
         rf.MdiParent = this;
         rf.Show();
     }
     catch
     {
         MessageBox.Show("Ошибка создания отчета");
     }
 }
예제 #3
0
 private void NewCustomReport(object sender, EventArgs e)
 {
     try
     {
         DateTime       dtStart = DateTime.Parse(tbStart.Text), dtEnd = DateTime.Parse(tbEnd.Text);
         ReportDocument rep = Report.MakeCustomRep(dtStart, dtEnd);
         if (rep == null)
         {
             return;
         }
         ReportForm rf = new ReportForm(rep, "Пользовательский отчет");
         rf.MdiParent = this;
         rf.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Ошибка создания отчета: " + ex.Message);
     }
 }