public PrescriptionFileService(MyDbContext context)
 {
     SftpService       = new SftpService();
     HelperFunctions   = new HelperFunctions();
     HttpService       = new HttpService();
     SmptServerService = new SmptServerService();
 }
Beispiel #2
0
 public ReportService(MyDbContext context)
 {
     SftpService       = new SftpService();
     HelperFunctions   = new HelperFunctions();
     HttpService       = new HttpService();
     ReportText        = new ReportText(context);
     SmptServerService = new SmptServerService();
 }
Beispiel #3
0
        public Boolean SendReportSftp(DateOfOrder date)
        {
            try
            {
                String    report      = CreateReport(date);
                String [] reportParts = report.Split('\\');
                SftpService.UploadFile(report, @"\pub\" + reportParts[1]);
                SmptServerService.SendEMailNotification(report, "report");

                return(true);
            }
            catch (Exception e) { return(false); }
        }
        public Boolean SendPrescriptionSftp(EPrescription prescription)
        {
            String prescriptionFile = CreatePrescription(prescription);

            String[] prescriptionParts = prescriptionFile.Split("\\");

            try {
                SftpService.UploadFile(prescriptionFile, @"\pub\" + prescriptionParts[1]);
                SmptServerService.SendEMailNotification(prescriptionFile, "prescription");
                return(true);
            }
            catch (Exception e) { return(false); }
        }