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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; | |
using Itsp365.InvoiceFormApp.Api.Models.Entities; | |
using Itsp365.InvoiceFormApp.Api.Repositories; |
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
public class InvoiceForm | |
{ | |
public InvoiceForm() | |
{ | |
this.InvoiceLines = new List<InvoiceLine>(); | |
} | |
[JsonProperty(PropertyName="id")] | |
public string Id { get; set; } | |
public string Reference { get; set; } |
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
'use strict' | |
var constantsModule = angular.module('applicationConstantsModule', []); | |
constantsModule.constant('applicationConstants', { | |
'clientId':'{clientguidhere}', | |
'tenantName':'ithinksharepoint.com', | |
'instance':'https://login.microsoftonline.com/', | |
'endpoints': {'https://{apiurlhere}.azurewebsites.net/api':'https://ithinksharepoint.com/Itsp365.InvoiceFormApp.Api.Mark2'}, | |
'apiUrl': 'https://{apiurlhere}.azurewebsites.net/api' | |
}); |
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
adalProvider.init({ | |
instance: instance, | |
tenant: tenantName, | |
clientId: clientId, | |
endPoints: endPoints, | |
anonymousEndpoints:{}, | |
extraQueryParameter: 'nux=1', | |
cacheLocation: 'localStorage', // enable this for IE, as sessionStorage does not work for localhost. | |
}, $httpProvider); |
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
adalProvider.init({ | |
instance: instance, | |
tenant: tenantName, | |
clientId: clientId, | |
endpoints: endPoints, | |
anonymousEndpoints:{}, | |
extraQueryParameter: 'nux=1', | |
cacheLocation: 'localStorage', // enable this for IE, as sessionStorage does not work for localhost. | |
}, $httpProvider); |
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
'endPoints': {'https://{url}.azurewebsites.net/api':'https://ithinksharepoint.com/Itsp365.InvoiceFormApp.Api.Mark2'}, |
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
var instance=applicationConstants.instance; | |
var clientId=applicationConstants.clientId; | |
var tenantName=applicationConstants.tenantName; | |
var endPoints={'https://{myurl}.azurewebsites.net/api':'https://{myappuri}.com'}; | |
var apiUrl = applicationConstants.apiUrl; | |
configurationServiceProvider.init(apiUrl, tenantName, clientId, endPoints); | |
adalProvider.init({ | |
instance: instance, |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Http; | |
using System.Web.Cors; | |
using System.Web.Http.Cors; | |
namespace Itsp365.InvoiceFormApp.Api | |
{ | |
public static class WebApiConfig |
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
<!doctype html> | |
<html lang="en" ng-app="itspInvoiceFormApp"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>iThink SharePoint Invoice System</title> | |
<link rel="stylesheet" type="text/css" href="/bower_components/bootstrap/dist/css/bootstrap.css" /> | |
<link rel="stylesheet" type="text/css" href="/app/css/invoiceformapp.css" /> | |
</head> | |
<body> | |
<div> |
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
'use strict'; | |
var invoiceFormApp = angular.module('itspInvoiceFormApp', | |
[ | |
'ngRoute', 'invoiceControllersModule', 'dataModelService', 'AdalAngular', 'configurationServiceModule', 'settingsController' | |
]); | |
var appStart = function($routeProvider, $httpProvider, adalProvider, applicationConstants, configurationServiceProvider) { | |
$routeProvider.when('/invoices/add', { |