Example #1
0
        public ActionResult Edit([Bind(Include = "id,AlexaUserId,RequestCount,LastRequestDate,CreatedDate")]
                                 Member member)
        {
            if (ModelState.IsValid)
            {
                db.Entry(member).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(member));
        }
Example #2
0
        public ActionResult Edit([Bind(Include = "Id,Name,Tweet,ProfileImageUrl,CreatedDate,UpdatedDate")]
                                 CompetitionWinner competitionWinner)
        {
            if (ModelState.IsValid)
            {
                db.Entry(competitionWinner).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(competitionWinner));
        }
        public ActionResult Edit([Bind(Include = "id,ProductName,Price,Description,Votes,CreatedDate")]
                                 Product product)
        {
            if (ModelState.IsValid)
            {
                db.Entry(product).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(product));
        }
Example #4
0
        public ActionResult Edit([Bind(Include =
                                           "id,MemberId,SessionId,AppId,RequestId,UserId,TimeStamp,Intent,Slots,IsNew,Version,Type,Reason,DateCreated")]
                                 Request request)
        {
            if (ModelState.IsValid)
            {
                db.Entry(request).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.MemberId = new SelectList(db.Members, "id", "AlexaUserId", request.MemberId);
            return(View(request));
        }