public ActionResult Create(ReferralModel model) { try { var rfm = new ReferalBus(); rfm.CreateMethod(model); return(new PdfResult(model, "PrintReferal")); } catch { return(View()); } }
public ActionResult Create(string ConsultId) { var pr = new PatientBusiness(); var cb = new ConsultationBusiness(); var rl = new ReferalBus(); if (ConsultId != null) { var rlp = cb.GetConsultations().Find(x => x.ConsultId == ConsultId); var model = new ReferralModel { Patient_name = rlp.patientfullname, PatientId = rlp.PatientId, Patient_age = pr.GetPatient(rlp.PatientId).Age, Patient_number = pr.GetPatient(rlp.PatientId).Telephone, diagnotics = rlp.Notes + " " + rlp.Description }; return(View(model)); } return(View()); }