angular.module('notetasktypesService',[]).factory('Notetasktypes',function($http){
	
	return {
		getPaging:function(filter){
			return $http({method:'POST',
				headers:headers,
				url:url_server + 'notetasktypespaging',
				data:filter,
				withCredentials: true});
			// return $http({method:'POST',url:url_server + 'notetasktypespaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'notetasktypes/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'notetasktypes/search',data:filter});
		},
		show:function(id){
			return $http({method:'GET',
				headers:headers,
				url:url_server + 'notetasktypes/'+id,
				withCredentials: true});
			// return $http.get(url_server+ 'notetasktypes/'+id);
		},
		save:function(notetasktypesData){
			return $http({method:'POST',
				headers:headers,
				url:url_server + 'notetasktypes',
				data:notetasktypesData,
				withCredentials: true});
			// return $http({method:'POST',
			// 				url:url_server+'notetasktypes',
			// 				data:notetasktypesData});
		},
		update:function(id, notetasktypesData){
			return $http.put(url_server+'notetasktypes/'+id,notetasktypesData,{headers:headers, withCredentials: true });
			// return $http.put(url_server+'notetasktypes/'+id,notetasktypesData);
		},
		destroy:function(id, status){
			return $http({method:'POST',
				headers:headers,
				url:url_server + 'notetasktypes/active',
				data:{id:id, status:status},
				withCredentials: true});
			// return $http({method:'POST',
			// 				url:url_server+'notetasktypes/active',
			// 				data:{id:id, status:status}});
		}
	};
});
