public string ApproveAppointment(ApproveAppointment model) { if (model.Id > 0) { var appointment = _service.GetById(model.Id); if (appointment != null) { var bodyTemplate = Utility.ReadFileToString("~/Template/ApproveAppointment.html"); bodyTemplate = bodyTemplate.Replace("[@PORTAL-NAME]", ConfigItems.PortalName); bodyTemplate = bodyTemplate.Replace("[@FULLNAME]", appointment.Name); bodyTemplate = bodyTemplate.Replace("[@APPROVEDDATE]", model.ApproveDate.ToString("dd/MM/yyyy hh:mm tt")); bodyTemplate = bodyTemplate.Replace("[@REMARKS]", model.ApproveRemarks); bool resultNotify = EmailHelper.SendMail(appointment.Email, "Appointment Confirmation", bodyTemplate, true); var result = _service.ApproveAppointment(model.Id, model.ApproveDate, resultNotify, model.ApproveRemarks); return(string.Empty); } } return("Something Went Wrong"); }
public ActionResult ApproveAppointmentPartial(int Id) { var approveAppointment = new ApproveAppointment(Id); return(PartialView("_ApproveAppointmentPartial", approveAppointment)); }