public ActionResult Schedule(PatientSchedule obj) { obj.CreatedDate = DateTime.Now; repository.Insert(obj); repository.Save(); return(Redirect("https://www.gohealthuc.com/about/")); }
public ActionResult PrintPatientSchedule(int patientId) { try { MemoryStream memoryStream = new MemoryStream(); PatientSchedule.CreatePatientSchedulePdf(patientId, SecurityUserId, Server.MapPath("~/XsltTemplates/"), true, true, HttpContext, memoryStream); byte[] pdf = memoryStream.ToArray(); string fileName = System.Guid.NewGuid().ToString() + ".pdf"; return(File(pdf, "application/pdf", Server.UrlEncode(fileName))); } catch (ModelException ex) { return(Json(new { errors = ex.ModelErrors })); } }