Exemplo n.º 1
0
 public bool submitForm(feedback Feed)
 {
     using (objFeed)
     {
         objFeed.feedbacks.InsertOnSubmit(Feed);
         objFeed.SubmitChanges();
         return true;
     }
 }
        public ActionResult FeedbackAdminDelete(int id, feedback Feed)
        {
            try
            {

                objFeed.commitDelete(id);
                return RedirectToAction("FeedbackAdminIndex");
            }
            catch
            {
                return RedirectToAction("FeedbackAdminIndex");

            }
        }
 public ActionResult _FeedbackPublicForm(feedback Feed)
 {
     if (ModelState.IsValid)
     {
         try
         {
             objFeed.submitForm(Feed);
             //DISPLAYS IN CONFIRM BOX WHEN FEEDBACK SUBMIT IS SUCCESSFUL
             @ViewBag.message = "Thank you " + Feed.fb_fname + " " + Feed.fb_lname + ", your feedback has been submitted! ";
             return View();
         }
         catch
         {
             //IF FORM SUBMISSION NOT SUCCESSFUL RETURN FORM VIEW
             return View();
         }
     }
     return View();
 }
 partial void Deletefeedback(feedback instance);
 partial void Updatefeedback(feedback instance);
 partial void Insertfeedback(feedback instance);