コード例 #1
0
        private void no_Click(object sender, RoutedEventArgs e)
        {
            //try
            //{
            popup.IsOpen = false;
            ReportDocument r = new ReportDocument();

            co.ROOM_NO = roomno;
            if (co.ROOM_NO == "" || co.ROOM_NO == null)
            {
                MessageBox.Show("Please select the room and try Again.!");
                this.NavigationService.Refresh();
            }
            else
            {
                DataTable ch_p = co.check_prints();
                if (ch_p.Rows.Count == 0)
                {
                    if (Ch_PendingAmount < 0)
                    {
                        popamount.IsOpen = true;
                        pamount.Text     = Ch_PendingAmount.ToString();
                    }
                    else
                    {
                        Ch_Total = (Ch_CSGST * 2) + Ch_Tarrif + Ch_Charges + RC_TransferAmount;
                        co.Prints_insert();
                        co.PrintStatus_Insert();
                        co.color();
                        this.NavigationService.Refresh();
                    }
                }
                else
                {
                    popup.IsOpen = false;
                    MessageBox.Show("Please Settle the Room And Try again.!");
                }
            }
            //}
            //catch (Exception) { }
        }
コード例 #2
0
 private void yes_Click(object sender, RoutedEventArgs e)
 {
     //try
     //{
     popup.IsOpen = false;
     co.ROOM_NO   = roomno;
     if (co.ROOM_NO == "" || co.ROOM_NO == null)
     {
         MessageBox.Show("Please select the room and try Again.!");
         this.NavigationService.Refresh();
     }
     else
     {
         DataTable ch_p = co.check_prints();
         if (ch_p.Rows.Count == 0)
         {
             Ch_Total = (Ch_CSGST * 2) + Ch_Tarrif + Ch_Charges + RC_TransferAmount;
             if (Ch_PendingAmount < 0)
             {
                 popamount.IsOpen = true;
                 pamount.Text     = Ch_PendingAmount.ToString();
             }
             else
             {
                 popamount.IsOpen = false;
                 co.Prints_insert();
                 co.PrintStatus_Insert();
                 co.color();
                 PrintType = 0;
                 ReportDocument r   = new ReportDocument();
                 DataTable      hot = report();
                 r.Load("../../Checkoutbilling.rpt");
                 DataTable table = hotelprint();
                 r.Load("../../CheckoutbillReport1.rpt");
                 r.SetDataSource(table);
                 r.Subreports[0].SetDataSource(hot);
                 r.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait;
                 r.PrintToPrinter(1, false, 0, 0);
                 r.Refresh();
                 PrintType = 1;
                 ReportDocument r2   = new ReportDocument();
                 DataTable      hot2 = report();
                 r2.Load("../../Checkoutbilling.rpt");
                 DataTable table2 = hotelprint();
                 r2.Load("../../CheckoutbillReport1.rpt");
                 r2.SetDataSource(table2);
                 r2.Subreports[0].SetDataSource(hot2);
                 r2.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait;
                 r2.PrintToPrinter(1, false, 0, 0);
                 r2.Refresh();
                 this.NavigationService.Refresh();
             }
         }
         else
         {
             MessageBox.Show("Please Settle the Room And Try again.!");
         }
     }
     //}
     //catch (Exception) { }
 }