예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            NeedHelp needHelp = db.NeedHelps.Find(id);

            db.NeedHelps.Remove(needHelp);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "NeedHelpId,FirstName,LastName,Email,Phone,Message")] NeedHelp needHelp)
 {
     if (ModelState.IsValid)
     {
         db.Entry(needHelp).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(needHelp));
 }
예제 #3
0
        public ActionResult INeedHelp([Bind(Include = "NeedHelpId,FirstName,LastName,Phone,Message")] NeedHelp needHelp)
        {
            if (ModelState.IsValid)
            {
                db.NeedHelps.Add(needHelp);
                db.SaveChanges();
                return(RedirectToAction("Thank", "Home"));
            }

            return(View(needHelp));
        }
예제 #4
0
        // GET: NeedHelps/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NeedHelp needHelp = db.NeedHelps.Find(id);

            if (needHelp == null)
            {
                return(HttpNotFound());
            }
            return(View(needHelp));
        }
예제 #5
0
 internal void ClickNeedHelpLink()
 {
     BaseActions.wait.WaitAWhile(1);
     NeedHelp.Click();
 }