コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            JobRequirements jobRequirements = db.JobRequirements.Find(id);

            db.JobRequirements.Remove(jobRequirements);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "IdReq,Id_Job,Requirement")] JobRequirements jobRequirements)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobRequirements).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id_Job = new SelectList(db.Jobs, "IdJob", "User", jobRequirements.Id_Job);
     return(View(jobRequirements));
 }
コード例 #3
0
        // GET: JobRequirements/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            JobRequirements jobRequirements = db.JobRequirements.Find(id);

            if (jobRequirements == null)
            {
                return(HttpNotFound());
            }
            return(View(jobRequirements));
        }
コード例 #4
0
        // GET: JobRequirements/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            JobRequirements jobRequirements = db.JobRequirements.Find(id);

            if (jobRequirements == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id_Job = new SelectList(db.Jobs, "IdJob", "User", jobRequirements.Id_Job);
            return(View(jobRequirements));
        }