private void DriverReport_Click(object sender, RoutedEventArgs e)
        {
            ViewReport dlg = new ViewReport();

            dlg.type = ReportType.REPORT_DRIVER_LIST;
            dlg.conn = conn;
            dlg.ShowDialog();
        }
        private void CompanyReport_Click(object sender, RoutedEventArgs e)
        {
            ViewReport dlg = new ViewReport();

            dlg.type = ReportType.REPORT_COMAPNY_LIST;
            dlg.conn = conn;
            dlg.ShowDialog();
        }
 private void PrintLastTransaction_Click(object sender, RoutedEventArgs e)
 {
     if (DOC_NUM != null)
     {
         ViewReport dlg = new ViewReport();
         dlg.conn   = conn;
         dlg.DocNum = DOC_NUM.Value;
         dlg.type   = ReportType.REPORT_RECEIPT;
         dlg.ShowDialog();
     }
 }
        private void ServicesReport_Click(object sender, RoutedEventArgs e)
        {
            DatePeriodPicker dlg2 = new DatePeriodPicker();

            dlg2.Owner = this;
            dlg2.ShowDialog();
            if (dlg2.PeriodSelected)
            {
                ViewReport dlg = new ViewReport();
                dlg.type        = ReportType.REPORT_SERVICES;
                dlg.conn        = conn;
                dlg.startPeriod = dlg2.startPeriod;
                dlg.endPeriod   = dlg2.endPeriod;
                dlg.ShowDialog();
            }
        }
        private void AccumulatedPaid_Click(object sender, RoutedEventArgs e)
        {
            DatePeriodPicker dlg2 = new DatePeriodPicker();

            dlg2.Owner = this;
            dlg2.ShowDialog();
            if (dlg2.PeriodSelected)
            {
                ViewReport dlg = new ViewReport();
                dlg.type        = ReportType.REPORT_ACCUMULATED_PAID;
                dlg.conn        = conn;
                dlg.startPeriod = dlg2.startPeriod;
                dlg.endPeriod   = dlg2.endPeriod;
                dlg.ShowDialog();
            }
        }
        private void Hotel_Click(object sender, RoutedEventArgs e)
        {
            CompanyFilter dlg2 = new CompanyFilter();

            dlg2.Owner = this;
            dlg2.conn  = conn;
            dlg2.ShowDialog();
            if (dlg2.PeriodSelected)
            {
                ViewReport dlg = new ViewReport();
                dlg.type        = ReportType.REPORT_HOTEL_INFORMATION;
                dlg.HotelInfo   = dlg2.CmpName;
                dlg.conn        = conn;
                dlg.startPeriod = dlg2.startPeriod;
                dlg.endPeriod   = dlg2.endPeriod;
                dlg.ShowDialog();
            }
        }
        private void DriverAccumulated_Click(object sender, RoutedEventArgs e)
        {
            DriverFilterWnd wnd = new DriverFilterWnd();

            wnd.Owner = this;
            wnd.conn  = conn;
            wnd.ShowDialog();
            if (wnd.PeriodSelected)
            {
                ViewReport dlg = new ViewReport();
                dlg.type        = ReportType.REPORT_ACCUMULATED_BY_DRIVER;
                dlg.conn        = conn;
                dlg.startPeriod = wnd.startPeriod;
                dlg.endPeriod   = wnd.endPeriod;
                dlg.DrvLicense  = wnd.DrvLicense;
                dlg.DrvName     = wnd.DrvName;
                dlg.Deduction   = wnd.Deduction;
                dlg.ShowDialog();
            }
        }