mobilefish

Untitled

Sep 18th, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.        
  2.        Controller code
  3.        --------------------
  4.        
  5.        
  6.        //get Price Book List
  7.                 $scope.priceBookList = [];
  8.                 PricingService.getPriceBookList()
  9.                 .success(function (result) {
  10.                     console.log(result);   
  11.                     for(i = 0; i < result.length; i++){
  12.                         if(result[i].effectiveFromDate){
  13.  
  14.                             var OPBLEFD = new Date(result[i].effectiveFromDate);
  15.                             result[i].effectiveFromDate = getDateFormat(OPBLEFD);
  16.                         }
  17.                         if (result[i].effectiveToDate) {
  18.                             var OPBLETD = new Date(result[i].effectiveToDate);
  19.                             result[i].effectiveToDate = getDateFormat(OPBLETD);
  20.                         }
  21.                         if (result[i].lastModified) {
  22.                             var OPBLLM= new Date(result[i].lastModified);
  23.                             result[i].lastModified = getDateFormat(OPBLLM);
  24.                         }
  25.                     }
  26.                     $scope.priceBookList = result
  27.                 }).
  28.                 error(function (error) {
  29.                     $scope.status = 'Unable to Show List: ' + error.message;
  30.         });
Add Comment
Please, Sign In to add comment