private void calculatePage() {

		if ((currentPage - 1) > 0) {
			hasPreviousPage = true;
		} else {
			hasPreviousPage = false;
		}

		if (currentPage >= totalPage) {
			hasNextPage = false;
		} else {
			hasNextPage = true;
		}

		if (currentPage * pageSize < totalRecord) {
			endPage = currentPage * pageSize;
			startPage = endPage - pageSize;
		} else {
			endPage = totalRecord;
			startPage = pageSize * (totalPage - 1);
		}

	}