Ejemplo n.º 1
0
 void worker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         WorkerPayload payload = (WorkerPayload)e.Argument;
         IndicatorManager mngr = new IndicatorManager();
         mngr.CreateImportFile(payload.Options, payload.FileName);
     }
     catch (Exception ex)
     {
         Logger log = new Logger();
         log.Error("Error creating import file. ImportStepListSelection:worker_DoWork. ", ex);
         throw;
     }
 }
Ejemplo n.º 2
0
 void worker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         IndicatorManager mngr = new IndicatorManager();
         WorkerPayload payload = (WorkerPayload)e.Argument;
         IndicatorUpdateResult result = mngr.ImportData(payload.FileName); 
         e.Result = result;
     }
     catch (Exception ex)
     {
         Logger log = new Logger();
         log.Error("Error uploading indicator file. IndStepType:worker_DoWork. ", ex);
         e.Result = new IndicatorUpdateResult(Translations.UnexpectedException + " " + ex.Message);
     }
 }
Ejemplo n.º 3
0
 void worker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         WorkerPayload payload = (WorkerPayload)e.Argument;
         IndicatorManager mngr = new IndicatorManager();
         mngr.CreateUpdateZip(payload.Details, payload.FileName);
     }
     catch (Exception ex)
     {
         Logger log = new Logger();
         log.Error("Error compressed zip of update files. IndStepResult:worker_DoWork. ", ex);
         throw;
     }
 }