public PdfEntity(string groupId, PdfType type) { GroupId = groupId; FileId = Guid.NewGuid().ToString().Replace("-", string.Empty).Replace("+", string.Empty); Created = DateTime.UtcNow; Type = type; }
private string DestinationFile(PdfType type) { string retValue = ""; switch (type) { case PdfType.Aspose: retValue = string.Format("{0}\\aspose_{1}{2}", Path.GetDirectoryName(txtPdfFilePath.Text), DateTime.Now.ToString("yyyyMMddhhmmss"), Path.GetExtension(txtPdfFilePath.Text)); break; case PdfType.iText: retValue = string.Format("{0}\\itext_{1}{2}", Path.GetDirectoryName(txtPdfFilePath.Text), DateTime.Now.ToString("yyyyMMddhhmmss"), Path.GetExtension(txtPdfFilePath.Text)); break; } return(retValue); }