public ActionResult Create(tbl_CommentHiring tbl_commenthiring)
        {
            if (ModelState.IsValid)
            {
                db.tbl_CommentHiring.AddObject(tbl_commenthiring);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.tid = new SelectList(db.tbl_HiringAdvice, "id", "title", tbl_commenthiring.tid);
            return View(tbl_commenthiring);
        }
예제 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tbl_CommentHiring EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbl_CommentHiring(tbl_CommentHiring tbl_CommentHiring)
 {
     base.AddObject("tbl_CommentHiring", tbl_CommentHiring);
 }
예제 #3
0
 /// <summary>
 /// Create a new tbl_CommentHiring object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static tbl_CommentHiring Createtbl_CommentHiring(global::System.Int32 id)
 {
     tbl_CommentHiring tbl_CommentHiring = new tbl_CommentHiring();
     tbl_CommentHiring.id = id;
     return tbl_CommentHiring;
 }
 public ActionResult Edit(tbl_CommentHiring tbl_commenthiring)
 {
     if (ModelState.IsValid)
     {
         db.tbl_CommentHiring.Attach(tbl_commenthiring);
         db.ObjectStateManager.ChangeObjectState(tbl_commenthiring, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.tid = new SelectList(db.tbl_HiringAdvice, "id", "title", tbl_commenthiring.tid);
     return View(tbl_commenthiring);
 }