public IActionResult Prescription(int id) { ViewBag.var = id; var data = PrescriptionTable.GetDataById(id); return(View(data[0])); }
public IActionResult PdfPrescription(int id) { var prescription = PrescriptionTable.GetDataById(id); var patData = PatientTable.GetPatientById(Properties.UserId); patData[0].Name = patData[0].Name + " " + patData[0].Surname; ViewBag.patient = patData; var doc = DoctorTable.GetDoctorIdByName(prescription[0].DoctorName); var docData = DoctorTable.GetSpecializationById(doc[0].Id); docData[0].Name = docData[0].Name + " " + docData[0].Surname; ViewBag.doctor = docData; return(View(prescription)); }