/// <summary> /// Send Email to User as well as HOD /// </summary> public void sendEmailNotification() { if (TempData["emailData"] != null && TempData["emailId"] != null) { var emaildata = TempData["emailData"] as EmailNotificationModel; var emailid = TempData["emailId"].ToString(); EmailNotifications.SendBookingRequestNotificationTo_Requester(emaildata, emailid); } if (TempData["emailData_HR"] != null && TempData["emailId_HR"] != null) { var emaildataHod = TempData["emailData_HR"] as EmailNotificationModel; var emailidHod = TempData["emailId_HR"].ToString(); EmailNotifications.SendBookingRequestNotificationTo_HOD(emaildataHod, emailidHod); } }
//[System.Web.Http.HttpGet] //[Route("api/FileApi/GetListToFinancialApproval")] //public IHttpActionResult GetListToFinancialApproval() //{ // //var controller = DependencyResolver.Current.GetService<trnsController>(); // //try // //{ // // var list = _userRepository.GetListTosendTriggerFinancalApproval(); // // foreach (var lst in list) // // { // // controller.ResendApproverRequest(lst.TravelRequestId.ToString(), lst.HotelRequestId.ToString(), "SOD"); // // } // // return Json( "success"); // //} // //catch (Exception ex) // //{ // // throw ex; // //} // return Json("success"); //} /// <summary> /// Send Email Notification to booking requester/user /// </summary> /// <returns></returns> private void sendEmailNotification(object emailData, string emailId, object emailData_Hod, string emailId_Hod) { try { if (emailData != null && emailId != null) { var emaildata = emailData as EmailNotificationModel; var emailid = emailId; EmailNotifications.SendBookingRequestNotificationTo_Requester(emaildata, emailid); } if (emailData_Hod != null && emailId_Hod != null) { var emaildataHod = emailData_Hod as EmailNotificationModel; var emailidHod = emailId_Hod; EmailNotifications.SendBookingRequestNotificationTo_HOD(emaildataHod, emailidHod); } } catch (Exception ex) { var json = ex.InnerException; } }
/// <summary> /// Send Email Notification to booking requester/user /// </summary> /// <returns></returns> public void sendEmailNotification() { try { if (TempData["emailData"] != null && TempData["emailId"] != null) { var emaildata = TempData["emailData"] as EmailNotificationModel; var emailid = TempData["emailId"].ToString(); EmailNotifications.SendBookingRequestNotificationTo_Requester(emaildata, emailid); } if (TempData["emailData_Hod"] != null && TempData["emailId_Hod"] != null) { var emaildataHod = TempData["emailData_Hod"] as EmailNotificationModel; var emailidHod = TempData["emailId_Hod"].ToString(); EmailNotifications.SendBookingRequestNotificationTo_HOD(emaildataHod, emailidHod); } } catch (Exception ex) { TempData["fun3"] = ex.InnerException; } }