Ejemplo n.º 1
0
 public PrescriptionFileService(MyDbContext context)
 {
     SftpService       = new SftpService();
     HelperFunctions   = new HelperFunctions();
     HttpService       = new HttpService();
     SmptServerService = new SmptServerService();
 }
Ejemplo n.º 2
0
 public ReportService(MyDbContext context)
 {
     SftpService       = new SftpService();
     HelperFunctions   = new HelperFunctions();
     HttpService       = new HttpService();
     ReportText        = new ReportText(context);
     SmptServerService = new SmptServerService();
 }
Ejemplo n.º 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); }
        }
Ejemplo n.º 4
0
        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); }
        }