Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            EJobs jobs = db.jobs.Find(id);

            db.jobs.Remove(jobs);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "JobName,Currency,Rate,RateType")] EJobs jobs)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobs).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "JobName,Currency,Rate,RateType")] EJobs jobs)
        {
            if (ModelState.IsValid)
            {
                db.jobs.Add(jobs);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(RedirectToAction("Index"));
        }
Exemplo n.º 4
0
        // GET: AddJobs/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EJobs jobs = db.jobs.Find(id);

            if (jobs == null)
            {
                return(HttpNotFound());
            }
            return(PartialView(jobs));
        }