Skip to content
Permalink
Browse files

your hearts been aching but you're to shy to say it

  • Loading branch information
adl13006 committed Dec 9, 2015
1 parent 1a4351b commit 5c762bb4446454c158458f7cd33328f4f4f97939
@@ -83,7 +83,7 @@ CREATE TABLE `Person`
CREATE TABLE `TrackURL`
(
`TrackID` INT NOT NULL,
`URL` VARCHAR(45) NOT NULL,
`URL` VARCHAR(150),
CONSTRAINT `PK_TrackURL` PRIMARY KEY (`TrackID`)
);

@@ -244,9 +244,15 @@ Add IsDefault to Payment
**************************/
ALTER TABLE payment ADD COLUMN IsDefault bool;

/**************************
*add things
**************************/
INSERT INTO TrackURL(TrackID)
SELECT TrackID
FROM Track;



UPDATE TrackURL
SET url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";



@@ -516,7 +516,8 @@ public List<Invoice> getInvoices(int custId)
}
else
{
IsDef = int.Parse(EmptyDefault);
//IsDef = int.Parse(EmptyDefault);
IsDef = 0;
}

Payment LoadPayment = new Payment
@@ -80,7 +80,7 @@ angular.module('routerApp').controller('userController', function ($q, $window,
{ field: 'AlbumTitle', displayName: ' Album ', width: "15%" },
{ field: 'MediaType', displayName: ' Media ', width: "10%" },
{ field: 'Genre', displayName: ' Genre ', width: "10%" },
{ field: 'Clip', displayName: ' Clip ', width: "10%" },
{ field: 'Clip', displayName: ' Clip ', width: "10%", cellTemplate: '<audio id="audio1"><source src="http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a"></source>Your browser isn\'t invited for super fun audio time.</audio><center> <button data-ng-click="grid.appScope.play()" class="btn btn-normal btn-xs"> <i class="glyphicon glyphicon-play"></i> </button></center>' },
{ field: 'UnitPrice', displayName: ' Price ', width: "10%" }
];

@@ -254,6 +254,12 @@ angular.module('routerApp').controller('userController', function ($q, $window,
})
};

//Play Audio Clip
$scope.play = function () {
var audio = document.getElementById("audio1");
audio.play();
};

// Get CustomPlaylist Tracks
$scope.getMyPlaylistTracks = function (id) {
$http.get("http://localhost:50031/api/GetPlaylist?PlaylistID=" + id)
@@ -298,8 +304,10 @@ angular.module('routerApp').controller('userController', function ($q, $window,
}

// Open window for orders
$scope.openOrder = function (size, orderid) {
$scope.getOrderTracks(orderid);
$scope.openOrder = function (orderid) {
console.log(orderid);
$scope.catcats = orderid;
$scope.getOrderTracks(orderid.invoiceId);
var modalInstance = $uibModal.open({
animation: $scope.animationsEnabled,
templateUrl: 'pages/user-ordermodal.html',
@@ -317,6 +325,7 @@ angular.module('routerApp').controller('userController', function ($q, $window,
$scope.getOrderTracks = function (orderid) {
$http.get("http://localhost:50031/api/GetOrderTracks?orderId=" + orderid)
.success(function (response) {
console.log(response);
$scope.currordertracks = angular.copy(response);
console.log($scope.currordertracks);
})
@@ -363,7 +372,7 @@ angular.module('routerApp').controller('userController', function ($q, $window,

// From shopping cart to invoice
$scope.buy = function (payid) {
console.log("YAY");
console.log(payid);
$http.get("http://localhost:50031/api/GenerateInvoice?custId=" + $cookies.get('userid') + "&payId=" + payid + "&orderId=" + $scope.currOrderID)
.success(function (response) {
$http.get("http://localhost:50031/api/CreateOrder?CustomerID=" + $cookies.get('userid'))
@@ -383,7 +392,7 @@ angular.module('routerApp').controller('userController', function ($q, $window,

// Initialize User Portal Informations
$scope.initPortal = function () {
// $scope.getMyOrders();
$scope.getMyOrders();
}

// Get Invoice for a specific user
@@ -47,12 +47,10 @@

<br /><br />
<table>
<tr><th colspan="2"><center><h2>My Orders</h2><br />Click an order to see details</center></th></tr>
<td width="90%"><center>Track Name</center></td>
<td width="10%"><center>Price</center></td>
<tr ng-repeat="x in [1,2,3,4]">
<td width="90%">{{x}}</td>
<td width="10%"><text ng-click="openOrder(x)">{{x}}</text></td>
<tr><th ><center><h2>My Orders</h2><br />Click an order to see details</center></th></tr>
<td><center>Invoice Number</center></td>
<tr ng-repeat="x in currorders">
<td > <center><text ng-click="openOrder(x)"><b>{{x.invoiceId}}</b></text></center> </td>
</tr>
</table>

@@ -1,8 +1,14 @@

<div ng-controller='userController'>
<h2><center>CATS CATS CATS CATS CATS</center></h2>
<h4>Invoice ID : {{catcats.invoiceId}}</h4>
<h4>Invoice Date : {{catcats.invoiceDate}}</h4>
<h4>Invoice Address : {{catcats.address}} {{catcats.city}} {{catcats.state}}</h4>
<h4 ng-show="catcats.payment.token">Apple token : {{catcats.paymment.token}}</h4>
<h4 ng-show="catcats.payment.email">Email Address : {{catcats.payment.email}}</h4>
<h4 ng-show="catcats.payment.cardnum">Card number : {{catcats.payment.cardnum}}</h4>
<h4 ng-show="catcats.payment.expr_date">Card number : {{catcats.payment.expr_date}}</h4>
<table>
<tr ng-repeat="x in currplaylist">
<tr ng-repeat="x in currordertracks">
<td>{{x.TrackName}}</td>
</tr>
</table>
@@ -56,15 +56,21 @@
<td width="25%"><center>Album Name</center></td>
<td width="16%"><center>Media Type</center></td>
<td width="8%"><center>Genre</center></td>
<td width="5%">CLIP</td>
<td width="5%"><i class="glyphicon glyphicon-music"></i></td>
<td width="10%"><center>Price</center></td>
<tr ng-repeat="x in orderOptions.data">
<td width="3%"> <center><button data-ng-click="addToCart({{x.TrackId}})" class="btn btn-success btn-xs"> + </button></center></td> </td>
<td width="3%"> <center> <button data-ng-click="addToCart({{x.TrackId}})" class="btn btn-success btn-xs"> + </button></center> </td> </td>
<td width="30%">{{x.TrackName}}</td>
<td width="30%">{{x.AlbumTitle}}</td>
<td width="16%">{{x.MediaType}}</td>
<td width="8%">{{x.Genre}}</td>
<td width="5%">CLIP</td>
<td width="5%">
<audio id="audio1">
<source src="http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a"></source>
Your browser isn't invited for super fun audio time.
</audio>
<center> <button data-ng-click="play()" class="btn btn-normal btn-xs"> <i class="glyphicon glyphicon-play"></i> </button></center>
</td>
<td width="4%">{{x.UnitPrice}}</td>
</tr>
</table>

0 comments on commit 5c762bb

Please sign in to comment.
You can’t perform that action at this time.