public ActionResult DeleteConfirmed(int id)
        {
            PrzetargModels przetargModels = db.Przetargi.Find(id);

            db.Przetargi.Remove(przetargModels);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,ProfileID,DateOfCreate,DateOfEnd")] PrzetargModels przetargModels)
 {
     if (ModelState.IsValid)
     {
         db.Entry(przetargModels).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProfileID = new SelectList(db.Profile, "ID", "Login", przetargModels.ProfileID);
     return(View(przetargModels));
 }
        // GET: PrzetargModels/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PrzetargModels przetargModels = db.Przetargi.Find(id);

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

            if (przetargModels == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ProfileID = new SelectList(db.Profile, "ID", "Login", przetargModels.ProfileID);
            return(View(przetargModels));
        }