public void SendEmailToClerk(int empid, string body, string subject) { EmployeeBLL empbll = new EmployeeBLL(); Employee currentuser = new Employee(); //Employee storeclerk = new Employee(); currentuser = empbll.GetEmployeeById(empid); string toemail = bll.getstoreClerk(); string bodymsg = "New collection point is :"+ "<br/>" + body + "<br/>With Regards,<br/>" + currentuser.EmployeeName; bll.SendEmailToStore(toemail, currentuser.Email, bodymsg, subject); }
protected void btnRevoke_Click(object sender, EventArgs e) { EmployeeBLL empBll = new EmployeeBLL(); string empName = txtEmpName.Text; //DateTime endDate = Convert.ToDateTime(empBll.GetDelegateEndDate(empName)); //lblDatetest.Text = empBll.GetDelegateEndDate(empName); //DateTime currentDate = DateTime.Today; //lblCurretDate.Text = currentDate.ToString(); string revoke_info = empBll.RevokeEmployeeDelegation(empName); lblmsg.Text = revoke_info; }
public void SendEmailToSupplier(int empid, string body, string subject) { PurchaseOrderBLL pobll = new PurchaseOrderBLL(); EmployeeBLL empbll = new EmployeeBLL(); Employee currentuser = new Employee(); currentuser = empbll.GetEmployeeById(empid); Supplier toSupplier = new Supplier(); toSupplier = supbll.GetSupplierByName(ddlSupplierList.SelectedValue); string bodymsg = "Purchase Order Number: " + poNum + "<br/>" + body + "<br/>With Regards,<br/>" + currentuser.EmployeeName; pobll.SendEmailToSupplier(toSupplier.Email, currentuser.Email, bodymsg, subject); }
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; }
protected void btnAssign_Click(object sender, EventArgs e) { EmployeeBLL empBll = new EmployeeBLL(); //Employee emp = new Employee(); //emp.EmployeeName = txtEmpName.Text; emp_Nmae = txtEmpName.Text; // emp.TempType = Convert.ToString(ddlEmpType.SelectedItem.Text); string Temp_role = "DeptHead"; // emp.FromDate = DateTime.ParseExact(Convert.ToString(txtFromDate.Text), "M/d/yyyy", null); DateTime fromDate = DateTime.ParseExact(Convert.ToString(txtFromDate.Text), "M/d/yyyy", null); //emp.ToDate = DateTime.ParseExact(Convert.ToString(txtToDate.Text), "M/d/yyyy", null); DateTime toDate = DateTime.ParseExact(Convert.ToString(txtToDate.Text), "M/d/yyyy", null); string s = empBll.DelegateEmployeeInfo(emp_Nmae, Temp_role, fromDate, toDate); string assigned_emp_Name = txtEmpName.Text; // (need to change ddl for Employee Namel and ID for related Dept) int assigned_emp_Id = empBll.GetEmployeeIDByName(assigned_emp_Name); string body_info = assigned_emp_Name + "is assigned temporarily as Department Head"; string subject_info = "Empoloyee Delegation"; string email_msg = SendEmailNotification(assigned_emp_Id, body_info, subject_info); lblmsg.Text = email_msg + s; }
protected void ddlPONumber_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPONumber.SelectedIndex != 0) { string ponum = ddlPONumber.SelectedValue; pendingPO = pobll.GetPurchaseOrderByPONum(ponum); EmployeeBLL emp = new EmployeeBLL(); int orderById =(Int32)pendingPO.Ordered_By; //string supcode = ; SupplierBLL supbll = new SupplierBLL(); Supplier sup = supbll.GetSupplierByCode(pendingPO.Supplier_Code); txtSupplierName.Text = sup.Supplier_Name; txtOrderBy.Text = emp.GetEmployeeNameById(orderById); txtOrderDate.Text = pendingPO.Order_Date.ToShortDateString(); txtSupplierName.ReadOnly = true; txtOrderBy.ReadOnly = true; txtOrderDate.ReadOnly = true; List<PurchaseOrderDetail> pendingPOD = new List<PurchaseOrderDetail>(); pendingPOD = podetailbll.GetPendingPODetails(ponum); gvPODetailList.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtDeliveredDate.Text = DateTime.Today.ToShortDateString(); IList pending_ponums = pobll.GetPendingPONums(); ddlPONumber.DataSource = pending_ponums; ddlPONumber.DataTextField = "PONumber"; ddlPONumber.DataValueField = "PONumber"; ddlPONumber.DataBind(); ddlPONumber.Items.Insert(0, new ListItem("<Select PO Number>", "")); EmployeeBLL emp = new EmployeeBLL(); recievedById = Convert.ToInt32(Session["loginUser"]); //Convert.ToInt32(Session["LoginUser"].ToString()); // to change later txtRecievedBy.Text = emp.GetEmployeeNameById(recievedById); } }
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; }
void SendNotification() { EmployeeBLL empbll = new EmployeeBLL(); Employee employeeinfo = new Employee(); Employee headinfo = new Employee(); int empid = Convert.ToInt32(Session["loginUser"]); // int empid = 1004; //to update empid employeeinfo = empbll.getEmployeebyempid(empid); headinfo = empbll.getEmailAddressbyempType(employeeinfo.DepartmentCode, "head"); //to update employee type String body = "Please help to approve my stationery request! Thanks.\n" + "Best Regards,\n" + employeeinfo.EmployeeName; String subject = "Stationery Request from " + employeeinfo.EmployeeName; emreqbll.sendNotificationToDeptHead(headinfo.Email, employeeinfo.Email, body, subject); }
void gvRequestHeader_DataBind() { DepartmentBLL deptbll = new DepartmentBLL(); int empid = Convert.ToInt32(Session["loginUser"]); // int empid = 1004; //to update empid EmployeeBLL empbll = new EmployeeBLL(); Employee empinfo = empbll.getEmployeebyempid(empid); //Department depart = deptbll.getDeptCodebyEmpID(empid); if (empinfo.EmployeeType.ToLower().Trim() == "head") { gvRequestHeader.DataSource = emreqbll.GetHeaderRecordsforHead(empinfo.DepartmentCode); //to show all requisition if loginuser is department head } else { gvRequestHeader.DataSource = emreqbll.GetHeaderRecords(empinfo.DepartmentCode, empid); //to show only individual records if loginuser is employee } gvRequestHeader.DataBind(); }
void SendNotification(int empid, string body, string subject) { DepartmentRequBLL deptreqBll = new DepartmentRequBLL(); int currentuserid = Convert.ToInt32(Session["loginUser"]); //int currentuserid = Convert.ToInt32(System.Web.HttpContext.Current.User.Identity.Name.ToString()); //int currentuserid = 1004; //to update empid EmployeeBLL empbll = new EmployeeBLL(); Employee employeeinfo = new Employee(); Employee currentuserinfo = new Employee(); employeeinfo = empbll.getEmployeebyempid(empid); currentuserinfo = empbll.getEmployeebyempid(currentuserid); //to update employee type string body1 = body + currentuserinfo.EmployeeName; deptreqBll.sendNotificationToEmployee(employeeinfo.Email, currentuserinfo.Email, body1, subject); }