customer.svc.js 867 Bytes
Newer Older
eddie.woo's avatar
eddie.woo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// web service proxy for customer
webservices.factory('customerService', ['$http', 'apiConfig', 'httpCacheService',
function ($http, apiConfig, httpCacheService) {
    'use strict';
     
    return {
        get: function () {
            return $http.get('/customer/get', apiConfig.create());
        },
        getByID: function (ID) {
            return $http.get('/customer/getByID?ID=' +ID , apiConfig.create());
        },
        addRange: function (customerList) {
            return $http.post('/customer/AddRange', customerList, apiConfig.create());
        },
        updateRange: function (customerList) {
            return $http.post('/customer/UpdateRange', customerList, apiConfig.create());
        },
        deleteRange: function (model) {
            return $http.post('/customer/DeleteRange', model, apiConfig.create());
        }
    };
}]);