angular.module('listviewusersService',[]).factory('Listviewusers',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'listviewuserspaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'listviewusers/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'listviewusers/search',data:filter});
		},
		show:function(id){
			
			return $http({method:'GET',
				headers:headers,
				url:url_server + 'listviewusers/'+id,
				withCredentials: true});
			// return $http.get(url_server+ 'listviewusers/'+id);
		},
		save:function(listviewusersData){

			return $http({method:'POST',
				headers:headers,
				url:url_server+'listviewusers',
				data:listviewusersData,
				withCredentials: true});
			// return $http({method:'POST',
			// 				url:url_server+'listviewusers',
			// 				data:listviewusersData});
		},
		update:function(id, listviewusersData){
			
			return $http.put(url_server+'listviewusers/'+id,listviewusersData,{headers:headers, withCredentials: true });

			// return $http.put(url_server+'listviewusers/'+id,listviewusersData);
		},
		destroy:function(id){
			
			return $http.delete(url_server+'listviewusers/'+id,{headers:headers, withCredentials: true });

			// return $http.delete(url_server + 'listviewusers/'+id);
		}
	};
});
