angular.module('positiontitlesService',[]).factory('Positiontitles',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'positiontitlespaging',data:filter,withCredentials: true});
		},
		getSelect:function(){
			
			return $http({method:'POST',
				headers:headers,
				url:url_server + 'positiontitles/getall',
				withCredentials: true});
			// return $http({method:'POST',url:url_server + 'positiontitles/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'positiontitles/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'positiontitles/'+id,{withCredentials: true});
		},
		save:function(positiontitlesData){
			return $http({method:'POST',
							url:url_server+'positiontitles',
							data:positiontitlesData,
							withCredentials: true});
		},
		update:function(id, positiontitlesData){
			return $http.put(url_server+'positiontitles/'+id,positiontitlesData,{withCredentials: true});
		},
		destroy:function(id){
			return $http.delete(url_server + 'positiontitles/'+id,{withCredentials: true});
		},
		searchDepart:function(filter){
			return $http({method:'POST',url:url_server + 'positiontitles/searchdepart',data:filter,withCredentials: true});
		}
	};
});
