Advertisement
Guest User

Untitled

a guest
Nov 25th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var ConfirmationModule = angular.module('ConfirmationModule', []);
  2.  
  3. ConfirmationModule.factory('ConfirmationService', function($rootScope){
  4.   var sharedService = {};
  5.  
  6.   sharedService.sourceWarehouse  = 0;
  7.   sharedService.destinyWarehouse = 0;
  8.   sharedService.productList      = [];
  9.  
  10.   /**
  11.    * Send data from ProductPick Model to Confirmation Model
  12.    *
  13.    * @method sendProductList
  14.    * @param sourceWarehouse {Integer}
  15.    *  source warehouse ID
  16.    * @param destinyWarehouse {Integer}
  17.    *  destiny warehouse ID
  18.    * @param productList {Array Object}
  19.    *  product info and amounts
  20.    */
  21.   sharedService.sendProductList = function(sourceWarehouse, destinyWarehouse, productList){
  22.     this.sourceWarehouse  = sourceWarehouse;
  23.     this.destinyWarehouse = destinyWarehouse;
  24.     this.productList      = productList;
  25.  
  26.     $rootScope.$broadcast('sendProductList');
  27.   }
  28.  
  29.   return sharedService;
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement