public PharmacyHttp(MyDbContext context) { SftpService = new SftpService(); HttpRequests = new HttpRequests(); SmptServerService = new SmptServerService(); ReportText = new ReportText(context); }
public TenderController(MyDbContext context) { MedicineForTenderingService = new MedicineForTenderingService(context); TenderService = new TenderService(context); MedicineTenderOfferService = new MedicineTenderOfferService(context); PharmacyTenderOfferService = new PharmacyTenderOfferService(context); SmptServerService = new SmptServerService(); }
public bool SendReport(DateOfOrder date) { String report = ReportText.CreateReport(date); try { HttpRequests.UploadReportFile(report); SmptServerService.SendEMailNotification(report, "report"); return(true); } catch (Exception e) { return(false); } }
public bool SendReport(DateOfOrder date) { try { String report = ReportText.CreateReport(date); String[] reportParts = report.Split('\\'); SftpService.UploadFile(report, @"\pub\" + reportParts[1]); SmptServerService.SendEMailNotification(report, "report"); return(true); } catch (Exception e) { return(false); } }