public bool HasPDF(Criminal entity)
 {
     string basePath = Path.Combine(baseDirectory, "PDF", entity.ID.ToString() + "_" + entity.Name);
     try
     {
         FileStream fs = new FileStream(basePath, FileMode.Open, FileAccess.Read, FileShare.None);
         return true;
     }
     catch (FileNotFoundException ex)
     {
         return false;
     }
 }
        public override void Create(Criminal entity)
        {
            string basePath = Path.Combine(baseDirectory, "PDF", entity.ID.ToString() + "_" + entity.Name + ".pdf");

            FileStream fs = new FileStream(basePath, FileMode.Create, FileAccess.Write, FileShare.None);
            Document document = new Document(PageSize.A4, 25, 25, 30, 30);
            PdfWriter writer = PdfWriter.GetInstance(document, fs);
            document.Open();
            document.Add(new Paragraph("Criminal Name : " + entity.Name));
            document.Add(new Paragraph("Criminal Nationality : " + entity.Nationality));
            document.Add(new Paragraph("Criminal Age : " + entity.Age));

            document.Close();
            writer.Close();
            fs.Close();
        }
 public Criminal Get(int id)
 {
     Criminal result = null;
     SQLiteConnection con;
     SQLiteDataReader reader = _sqliteHelper.ExecuteCommand("Select * FROM Criminal where ID='" + id + "'", out con);
     while (reader.Read())
     {
         result = new Criminal
         {
             ID = Convert.ToInt32(reader["ID"]),
             Name = reader["Name"].ToString(),
             Email = reader["Email"].ToString(),
             Age = Convert.ToInt32(reader["Age"]),
             Sex = (Gender)Convert.ToInt32(reader["Sex"]),
             Height = Convert.ToDouble(reader["Height"]),
             Nationality = reader["Nationality"].ToString()
         };
     }
     con.Close();
     return result;
 }
 public override string OpenPdf(Criminal entity)
 {
     return Path.Combine(baseDirectory, "PDF", entity.ID.ToString() + "_" + entity.Name + ".pdf");
 }
 public void Delete(Criminal entity)
 {
     throw new NotImplementedException();
 }
 public void Insert(Criminal entity)
 {
     throw new NotImplementedException();
 }
 public abstract string OpenPdf(Criminal entity);
 public abstract void Create(Criminal entity);