public ActionResult Details(int id)
        {
            tblAppoinment ad = dc.tblAppoinments.SingleOrDefault(ob => ob.AppointmentID == id);

            ViewBag.DoctorName  = (from ob in dc.tblDoctors where ob.DoctorId == ad.DoctorID select ob).Take(1).SingleOrDefault().FirstName;
            ViewBag.PatientName = (from ob1 in dc.tblPatients where ob1.PatientId == ad.PatientID select ob1).Take(1).SingleOrDefault().FirstName;
            string name  = ViewBag.DoctorName;
            string pname = ViewBag.patientName;

            return(View(ad));
        }
        public JsonResult Active(int id)
        {
            tblAppoinment ad = dc.tblAppoinments.SingleOrDefault(ob => ob.AppointmentID == id);

            if (ad.IsNew == true)
            {
                ad.IsNew = false;
            }
            else
            {
                ad.IsNew = true;
            }
            dc.SaveChanges();
            return(Json(ad.IsNew, JsonRequestBehavior.AllowGet));
        }