示例#1
0
 /**
  * Constructor for PatientInfoManager
  */
 public PatientInfoManager(FileManager fileManager, EyeDoc db, AdvantageModel dbCon)
 {
     this.fileManager = fileManager;
     this.db = db;
     this.dbContext = dbCon;
     
 }
示例#2
0
        /**
         * Repairs the pdf
         * */
        public static void repairPDF(String file, String repairer)
        {

            try
            {
                CMDUtil c = new CMDUtil();
                String uniqueFile = UtilManager.getUniqueFile("C:\\windows\\temp\\", "pdf");
                FileManager fManager = new FileManager();
                FileInfo f = new FileInfo(file);
                if (f.Exists)
                {
                    c.repairPDF(file, uniqueFile, repairer);
                    f = new FileInfo(uniqueFile);
                    if (f.Exists && f.Length > 0)
                    {
                        File.Copy(uniqueFile, file);
                        //fManager.deleteFile(uniqueFile);
                    }

                }
                else
                {
                    System.Diagnostics.Debug.WriteLine("ERROR: Repairing file (" + file + ") does not exist.");
                }
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e.StackTrace);
            }

        }