コード例 #1
0
 private void saveB_Click(object sender, EventArgs e)
 {
     int   pegi          = int.Parse(pegiTB.Text);
     float priceNew      = float.Parse(priceNewTB.Text);
     float priceOld      = float.Parse(priceOldTB.Text);
     float pricePurchase = float.Parse(pricePurchaseTB.Text);
     int   result        = GameProcessor.CreateGame(nameTB.Text, pegi, descriptionTB.Text,
                                                    priceNew, priceOld, pricePurchase, imageTB.Text, availabilityTB.Text);
 }
コード例 #2
0
 public ActionResult AddGame(Game game)
 {
     if (ModelState.IsValid)
     {
         int recs = GameProcessor.CreateGame(game.Name, game.CreatedBy, game.Year, game.GameConsole,
                                             User.Identity.GetUserId());
         return(RedirectToAction("BrowseGames"));
     }
     return(View());
 }