angular.module('usercredentialsService',[]).factory('Usercredentials',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'usercredentialspaging',data:filter,withCredentials: true,headers:headers});
		},
		getNoPaging:function(filter){
			return $http({method:'POST',
				headers:headers,
				url:url_server + 'usercredentialsnopaging',
				data:filter,
				withCredentials: true});	
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'usercredentials/getall',withCredentials: true,headers:headers});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'usercredentials/search',data:fil,withCredentials: true,headers:headerster});
		},
		show:function(id){
			return $http.get(url_server+ 'usercredentials/'+id,{withCredentials: true,headers:headers});
		},
		save:function(usercredentialsData){
			return $http({method:'POST',url:url_server+'usercredentials',data:usercredentialsData,withCredentials: true,headers:headers});
		},
		update:function(id, usercredentialsData){
			return $http.put(url_server+'usercredentials/'+id,usercredentialsData,{withCredentials: true,headers:headers});
		},
		destroy:function(id){
			return $http.delete(url_server + 'usercredentials/'+id,{withCredentials: true,headers:headers});
		},
		activeAndInactiveUser:function(id, status){
			return $http.put(url_server+'usercredentials/activeAndInactive/'+id,{status:status},{withCredentials: true,headers:headers});
		}
	};
});
