private string SendEmailNotification(int assignedEmpId, string body, string subject) { EmployeeBLL emp_Bll = new EmployeeBLL(); Employee emp_info = new Employee(); emp_info = emp_Bll.GetEmp_Info(assignedEmpId); //get emp_info to assign int currentUser_Id = Convert.ToInt32(Session["loginUser"]); Employee currentUser_info = new Employee(); currentUser_info = emp_Bll.GetEmp_Info(currentUser_Id); ////get emp_info(current logined user) string body_msg = "To" + emp_info.EmployeeName + body + "From" + currentUser_info.EmployeeName; string ToEmail = emp_Bll.getToEmailid(emp_Nmae); //public void sendEmailNotification(string toEmail, string fromEmail, string body, string subject) string msg = emp_Bll.sendEmailNotification(ToEmail, currentUser_info.Email, body_msg, subject); return msg; }
private string SendEmailNotification(int loginUserId, string body, string subject, string authorizedPerson) { EmployeeBLL emp_Bll = new EmployeeBLL(); Employee login_EmpInfo = new Employee(); login_EmpInfo = emp_Bll.GetEmp_Info(loginUserId); //to get loginEmp_info int authorized_ID = 0; if (authorizedPerson == "Supervisor") authorized_ID = 1007; else if (authorizedPerson == "Manager") authorized_ID = 1009; Employee authorizedPerson_info = new Employee(); authorizedPerson_info = emp_Bll.GetAuthorizedPersonInfo(authorized_ID); ////get authorized emp_info string body_msg = "To " + authorizedPerson_info.EmployeeName + "<br/>" + body + "<br/>From" + login_EmpInfo.EmployeeName; //public void sendEmailNotification(string toEmail, string fromEmail, string body, string subject) string msg = emp_Bll.sendEmailNotification(authorizedPerson_info.Email, login_EmpInfo.Email, body_msg, subject); return msg; }