public ActionResult AddnEdit(Vaksin vak)
 {
     using (TVaksinEntities2 db = new TVaksinEntities2())
     {
         if (vak.IdVaksin == 0)
         {
             db.Vaksin.Add(vak);
             db.SaveChanges();
             return(Json(new { success = true, message = "Saved Successfully" }, JsonRequestBehavior.AllowGet));
         }
         else
         {
             db.Entry(vak).State = EntityState.Modified;
             db.SaveChanges();
             return(Json(new { success = true, message = "Updated Successfully" }, JsonRequestBehavior.AllowGet));
         }
     }
 }
 public ActionResult Delete(int id)
 {
     using (TVaksinEntities2 db = new TVaksinEntities2())
     {
         Vaksin emp = db.Vaksin.Where(x => x.IdVaksin == id).FirstOrDefault <Vaksin>();
         db.Vaksin.Remove(emp);
         db.SaveChanges();
         return(Json(new { success = true, message = "Deleted Successfully" }, JsonRequestBehavior.AllowGet));
     }
 }