angular.module('pipusService',[]).factory('Pipus',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'pipuspaging',data:filter,withCredentials: true,headers:headers});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'pipus/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'pipus/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'pipus/'+id,{withCredentials: true,headers:headers});
		},
		save:function(pipusData){
			return $http({method:'POST',
							url:url_server+'pipus',
							data:pipusData,withCredentials: true,headers:headers});
		},
		update:function(id, pipusData){
			return $http.put(url_server+'pipus/'+id,pipusData,{withCredentials: true,headers:headers});
		},
		destroy:function(id){
			return $http.delete(url_server + 'pipus/'+id,{withCredentials: true,headers:headers});
		},
		exportPipus:function(pipus){
			return $http({method:'POST',url:url_server + 'userdetails/exportpipus',data:pipus,withCredentials: true,headers:headers});
		},getAllUsers:function(filter){
		return $http({method:'POST',url:url_server + 'userspaging',data:filter,withCredentials: true,headers:headers});
		}
	};
});
