public PDF PDFUpdateFileDeletion(int pdfId) { PDFDAL dal = new PDFDAL(); PDF pdf = dal.PDFSelectAuto(null, null, pdfId); if (pdf != null) { pdf.FileDeletionDate = DateTime.Now; pdf = dal.PDFUpdateAuto(null, null, pdf); } else { throw new Exception("Could not find existing pdf record"); } return(pdf); }
public PDF PDFUpdateGenerationInfo(int pdfId, string fileLocation, string fileUrl, int numberImagesMissing, int numberOcrMissing) { PDFDAL dal = new PDFDAL(); PDF pdf = dal.PDFSelectAuto(null, null, pdfId); if (pdf != null) { pdf.FileLocation = fileLocation; pdf.FileUrl = fileUrl; pdf.FileGenerationDate = DateTime.Now; pdf.NumberImagesMissing = numberImagesMissing; pdf.NumberOcrMissing = numberOcrMissing; pdf.PdfStatusID = this.PdfStatusGenerated; pdf = dal.PDFUpdateAuto(null, null, pdf); } else { throw new Exception("Could not find existing pdf record"); } return(pdf); }