예제 #1
0
 public MainViewModel(Window1 window1)
 {
     RentReportCMD = new RentReport(this);
     BuyReportCMD  = new BuyReport(this);
     LogoutCMD     = new Logout(this);
     UserCMD       = new User(this);
     BookCMD       = new Book(this);
     FilialCMD     = new Filial(this);
     WorkerCMD     = new Worker(this);
     CustomerCMD   = new Customer(this);
     Window1       = window1;
 }
예제 #2
0
 protected override void Print()
 {
     try
     {
         if (ShowMaint)
         {
             string          path   = Properties.Settings.Default.MaintTemplatePath;
             ExcelProperties props  = new ExcelProperties(2, 1, false);
             MaintReport     report = new MaintReport(MaintReports.ToList(), path, props);
             report.Print();
         }
         else
         {
             string          path   = Properties.Settings.Default.RentTempatePath;
             ExcelProperties props  = new ExcelProperties(2, 1, false);
             RentReport      report = new RentReport(RentReports.ToList(), path, props);
             report.Print();
         }
     }
     catch (Exception ex)
     {
         Helper.LogShowError(ex);
     }
 }