public ActionResult CreateOrder(string ASIN, string textReviews, string photoReviews, string videoReviews) { string[] asin = new string[] { ASIN }; ReadResponse processor = new ReadResponse(); Campaign campaign = new Campaign(); processor.Populate(campaign, asin); var exists = (from v in db.Vendors where v.CustomerID.Equals(User.Identity.Name) select v).First(); campaign.VendorID = exists.VendorId; if (String.IsNullOrEmpty(textReviews)) { textReviews = "0"; } if (String.IsNullOrEmpty(photoReviews)) { photoReviews = "0"; } if (String.IsNullOrEmpty(videoReviews)) { videoReviews = "0"; } campaign.TextGoal = int.Parse(textReviews); campaign.PhotoGoal = int.Parse(photoReviews); campaign.VideoGoal = int.Parse(videoReviews); return View(campaign); }
public ActionResult Create(string asin) { if (asin == null) { return HttpNotFound(); } string[] ASIN = new string[] { asin }; ReadResponse processor = new ReadResponse(); Campaign campaign = new Campaign(); processor.Populate(campaign, ASIN); IOrderedQueryable<Vendor> vendors = db.Vendors .OrderBy(i => i.Name); ViewBag.VendorId = new SelectList(vendors, "VendorId", "Name", campaign.VendorID); return View("Validate", campaign); }