﻿var sSchedule_dataSources_childPortalDataSource = function () {
	//#region ------------------- ' Variables '-----------------------

	var dataStore = new sSchedule_dataSources();
	var models = new sSchedule_common_dataModels();
	var common = new Sschedule_commonFunctions();
	var serviceRootUrl = common.getServiceRootUrl();

	//#endregion ------------------- ' Variables '-----------------------

	function getDsByName( parameterMapFunc, readCallback) {
		var dataSource = null;
		 
			dataModel = "Portal";
			apiName = "Portals";
			readEntity = "GetAssociatedPortals";
			model = models.getModel(dataModel);
			crudServiceBaseUrl = serviceRootUrl + apiName + "/";
			dataSource = new kendo.data.DataSource({
				transport: {
					read: dataStore.readDs(crudServiceBaseUrl, readEntity, readCallback),
					parameterMap: parameterMapFunc
				},
				error: dataStore.errorDs(),
				schema: {
					type: "json",
					model: model
				}
			});

			return dataSource;
	}

	return {
		getDsByName: getDsByName
	};

	
}