public ActionResult DeleteConfirmed(int id)
        {
            MK_TO_PARTY mK_TO_PARTY = db.MK_TO_PARTY.Find(id);

            db.MK_TO_PARTY.Remove(mK_TO_PARTY);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,mk,party,fromDate,toDate,knessetNumber")] MK_TO_PARTY mK_TO_PARTY)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mK_TO_PARTY).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.mk    = new SelectList(db.MK, "Id", "mk_name", mK_TO_PARTY.mk);
     ViewBag.party = new SelectList(db.PARTY, "Id", "party1", mK_TO_PARTY.party);
     return(View(mK_TO_PARTY));
 }
        // GET: MK_TO_PARTY/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MK_TO_PARTY mK_TO_PARTY = db.MK_TO_PARTY.Find(id);

            if (mK_TO_PARTY == null)
            {
                return(HttpNotFound());
            }
            return(View(mK_TO_PARTY));
        }
        // GET: MK_TO_PARTY/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MK_TO_PARTY mK_TO_PARTY = db.MK_TO_PARTY.Find(id);

            if (mK_TO_PARTY == null)
            {
                return(HttpNotFound());
            }
            ViewBag.mk    = new SelectList(db.MK, "Id", "mk_name", mK_TO_PARTY.mk);
            ViewBag.party = new SelectList(db.PARTY, "Id", "party1", mK_TO_PARTY.party);
            return(View(mK_TO_PARTY));
        }