angular.module("app").controller('MainCtrl', function($rootScope, $scope) {
	$rootScope.ajaxRequest('../enrol/std/enrol/list.htm', {}, function(array) {
		$rootScope.EnrolArray = array;
	}, 'array');

	$scope.downloadTicket = function(e) {
		console.log(e);
		$rootScope.ajaxRequest('../enrol/std/enrol/ticket.htm', {
			enrol_id : e.enrol_id
		}, function(entity) {
			window.open(entity);
		}, 'entity');
	}
});