public ActionResult PrintAllCertificates() { MedCertificateBusiness mb = new MedCertificateBusiness(); // With no Model and default view name. Pdf is always the default view name //return new PdfResult(); return(new PdfResult(mb.GetallMedCert(), "PrintAllCertificates")); }
public ActionResult CreateMedCertificate(MedicalCertificateModel med) { try { // TODO: Add insert logic here var ee = new MedCertificateBusiness(); int PatientId = Convert.ToInt32(System.Web.HttpContext.Current.Session["PId"]); ee.create(med, PatientId); return(RedirectToAction("Index", new { PatientId = PatientId })); } catch { return(View()); } }
public ActionResult CreateMedCertificate(int?PatientId) { var ee = new MedCertificateBusiness(); var Pb = new PatientBusiness(); if (PatientId.HasValue) { var Pname = Pb.GetPatients().Find(x => x.PatientId == PatientId.Value); var model = new MedicalCertificateModel { PatintName = Pname.FullName + " " + Pname.Surname, PatientId = PatientId.Value, FileName = Pname.FileName, FileType = Pname.FileType, resultFile = Pname.File }; System.Web.HttpContext.Current.Session["PId"] = PatientId; return(View(model)); } return(View()); }
public ActionResult CreateMedCertificate(int?PatientId12) { var ee = new MedCertificateBusiness(); var Pb = new PatientBusiness(); int PatientId = Convert.ToInt32(Session["newpatientid"]); if (PatientId != 0) { var Pname = Pb.GetPatients().Find(x => x.PatientId == PatientId); var model = new MedicalCertificateModel { PatintName = Pname.FullName.ToUpper() + " " + Pname.Surname.ToUpper(), PatientId = PatientId, FileName = Pname.FileName, FileType = Pname.FileType, resultFile = Pname.File }; System.Web.HttpContext.Current.Session["PId"] = PatientId; return(View(model)); } return(View()); }