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()
        {
            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 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);
        }