using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hukpiWinApp.Forms
{
    public partial class ReportListForm : BaseForm
    {
        public ReportListForm()
        {
            InitializeComponent();
        }

        private void buttonViewReport_Click(object sender, EventArgs e)
        {
            if (this.listViewReports.SelectedItems[0].Tag == null)
            {
                throw new Exception("Nincs cél jelentés beállítva a kiválasztott sorhoz!");
            }
            switch (this.listViewReports.SelectedItems[0].Tag.ToString())
            {
                case "routesReport" :
                    ((MainForm)this.MdiParent).openNewMDIChildForm(new Forms.ReportDetailsRouteForm());
                    break;
                case "animalDepotsReport" :
                    ((MainForm)this.MdiParent).openNewMDIChildForm(new Forms.ReportDetailsAnimalDepotsForm());
                    break;

            }
        }
    }
}
