angular.module('listviewsService',[]).factory('Listviews',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'listviewspaging',data:filter});
		},
		getSelect:function(){
			
			return $http({method:'POST',
				headers:headers,
				url:url_server+'listviews/getall',
				withCredentials: true});
			// return $http({method:'POST',url:url_server + 'listviews/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'listviews/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'listviews/'+id);
		},
		save:function(listviewsData){
			return $http({method:'POST',
							url:url_server+'listviews',
							data:listviewsData});
		},
		update:function(id, listviewsData){
			return $http.put(url_server+'listviews/'+id,listviewsData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'listviews/'+id);
		}
	};
});
