Beispiel #1
0
 public JsonResult Edit(jobdetail job)
 {
     using (jQueryAjaxEntities db = new jQueryAjaxEntities())
     {
         db.Entry(job).State = EntityState.Modified;
         db.SaveChanges();
     }
     return(Json("Success", JsonRequestBehavior.AllowGet));
 }
Beispiel #2
0
 public JsonResult AddJob(jobdetail job)
 {
     using (jQueryAjaxEntities db = new jQueryAjaxEntities())
     {
         db.jobdetails.Add(job);
         db.SaveChanges();
         return(Json("Success"));
     }
 }
Beispiel #3
0
 public JsonResult Delete(int id)
 {
     using (jQueryAjaxEntities db = new jQueryAjaxEntities())
     {
         jobdetail job = db.jobdetails.Where(x => x.JobID == id).FirstOrDefault <jobdetail>();
         db.jobdetails.Remove(job);
         db.SaveChanges();
     }
     return(Json("Success", JsonRequestBehavior.AllowGet));
 }