示例#1
0
        public ActionResult Details(int id)
        {
            tblDiagnoseDetail ad = dc.tblDiagnoseDetails.SingleOrDefault(ob => ob.DiagnosisId == 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));
        }
示例#2
0
        public JsonResult Active(int id)
        {
            tblDiagnoseDetail ad = dc.tblDiagnoseDetails.SingleOrDefault(ob => ob.DiagnosisId == id);

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