Esempio n. 1
0
 public DataContextReport()
 {
     try
     {
         var command = new CommandSnuOneAuto();
         Report = new ReportXlsxMethod(ConfigFile.ExcelReportFile);
         ReportJurnalAndFile = new ReportJurnalMethod(ConfigFile.PathJurnal, ConfigFile.PathInn);
         Xml          = new XmlUseMethod();
         DeleteJurnal = new DelegateCommand(() => { ReportJurnalAndFile.DeleteXmlReportJurnal(); });
         DeleteReport = new DelegateCommand(() => { Report.DeleteReportFile(); });
         OpenReport   = new DelegateCommand(() => { Report.OpenReport(); });
         OpenFile     = new DelegateCommand(() => { command.ConvertXslToXmlAndOpen(Report, ReportJurnalAndFile, ConfigFile.ExcelReportFile); });
         Update       = new DelegateCommand(() =>
         {
             ReportJurnalAndFile.AddFileXml(ConfigFile.PathInn);
             ReportJurnalAndFile.AddJurnal(ConfigFile.PathJurnal);
         });
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Команда Update вынесена в отдельный клас чтобы не загромождать логику MVVM
 /// </summary>
 /// <param name="xmlusemethod">XmlUseMethod Метод файла xml</param>
 /// <param name="reportjurnalmethod">ReportJurnalMethod метод журнала файла xml</param>
 /// <param name="pathfileinn">Путь к файлу FullName</param>
 /// <param name="pathjurnal">Просто путь к журналу</param>
 /// <param name="pathinn">Просто путь к ИНН</param>
 public void UpdateModel(XmlUseMethod xmlusemethod, ReportJurnalMethod reportjurnalmethod, string pathfileinn, string pathjurnal, string pathinn)
 {
     xmlusemethod.UpdateFileXml(pathfileinn);
     reportjurnalmethod.AddFileXml(pathinn);
     reportjurnalmethod.AddJurnal(pathjurnal);
 }