Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
get payment is up
- Loading branch information
Jeremy Mill
committed
Dec 2, 2015
1 parent
57d7765
commit fa53478
Showing
8 changed files
with
117 additions
and
10 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
TeamDBAwesome/TeamDBAwesome/Controllers/GetPaymentController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
using TeamDBAwesome.SqlService; | ||
using TeamDBAwesome.Models; | ||
using Newtonsoft.Json; | ||
|
||
namespace TeamDBAwesome.Controllers | ||
{ | ||
public class GetPaymentController : ApiController | ||
{ | ||
public HttpResponseMessage Get(int CustomerID) | ||
{ | ||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | ||
|
||
MySqlService sql = new MySqlService(); | ||
|
||
List<Payment> payList = sql.GetPayTypes(CustomerID); | ||
|
||
string serialzed = JsonConvert.SerializeObject(payList); | ||
|
||
message.Content = new StringContent(serialzed); | ||
|
||
return message; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.