public void FigureAdd(int SightingId, string Source, string Alternative, string Caption, HttpPostedFileBase ImgFile)
 {
     if (ImgFile != null && ImgFile.ContentLength > 0)
     {
         using (var reader = new BinaryReader(ImgFile.InputStream))
         {
             var imgByteArray = reader.ReadBytes(ImgFile.ContentLength);
             dbHelper.AddFigure(SightingId, Source, Alternative, Caption, imgByteArray);
         }
     }
 }
Example #2
0
 public ActionResult FigureAdd(int SightingId, string Source, string Alternative, string Caption)
 {
     dbHelper.AddFigure(SightingId, Source, Alternative, Caption);
     return(RedirectToAction("FigureList", new { Id = SightingId }));
 }