コード例 #1
0
 public ActionResult Clubs(HttpPostedFileBase file, string ClubName)
 {
     if (file != null && file.ContentLength > 0)
     {
         var imageResizer = new ImageProcessor.ImageResizer();
         var path         = imageResizer.WriteImage(file.InputStream, "Club");
         var db           = new FifaRepository();
         db.SaveClubInfo(new Models.FifaClub {
             ClubName = ClubName, ClubImagePath = path
         });
     }
     return(View());
 }
コード例 #2
0
 public ActionResult Nations(HttpPostedFileBase file, string NationName)
 {
     if (file != null && file.ContentLength > 0)
     {
         var imageResizer = new ImageProcessor.ImageResizer();
         var path         = imageResizer.WriteImage(file.InputStream, "Nation");
         var db           = new FifaRepository();
         db.SaveNationInfo(new FifaNation {
             NationName = NationName, NationImagePath = path
         });
     }
     return(View());
 }