protected void DataBindUserGridView()
        {
            DAL.User loggedInUser = Utilities.Membership.GetCurrentLoggedInUser();
            string[] roles = Utilities.Membership.GetCurrentLoggedInUserRole();

            List<User> UserList = null;

            var isAdmin = (from r in roles
                           where r.Contains("Administrators")
                           select r);
            var isDeptHead = (from r in roles
                              where r.Contains("DepartmentHeads") || r.Contains("TemporaryDepartmentHeads")
                              select r);
            using (UserManager um = new UserManager())
                if (isAdmin.Count() > 0)
                {
                    UserList = um.GetAllUsers();
                }
                else if (isDeptHead.Count() > 0)
                {
                    UserList = um.FindUsersByCriteria(
                        new UserSearchDTO() { DepartmentID = loggedInUser.DepartmentID });
                }
                else
                {
                    UserList = um.FindUsersByCriteria(
                        new UserSearchDTO() { UserID = loggedInUser.UserID });
                }
            this.UserGridView.DataSource = UserList;
            this.UserGridView.DataBind();
        }
        protected void DataBindUserGridView()
        {
            List<User> UserList = null;

            using (UserManager um = new UserManager())
                if (Utilities.Membership.IsAdmin)
                {
                    UserList = um.GetAllUsers();
                }
                else if (Utilities.Membership.IsDeptHead || Utilities.Membership.IsTempDeptHead)
                {
                    UserList = um.FindUsersByCriteria(
                        new UserSearchDTO() { DepartmentID = Utilities.Membership.LoggedInuser.DepartmentID });
                }
                else
                {
                    UserList = um.FindUsersByCriteria(
                        new UserSearchDTO() { UserID = Utilities.Membership.LoggedInuser.UserID });
                }
            this.UserGridView.DataSource = UserList;
            this.UserGridView.DataBind();
        }