This commit is contained in:
Beppe
2019-07-04 01:05:11 +02:00
parent 60eb72bd30
commit df39b0392c
67 changed files with 2147 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{46C1FC26-4A1F-43E4-8682-853010AB38AC}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Data</RootNamespace>
<AssemblyName>Data</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="data.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Globals\Globals.csproj">
<Project>{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}</Project>
<Name>Globals</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,26 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Data")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("${AuthorCopyright}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.IO;
using Globals.classes;
using Globals.Interfaces;
using Newtonsoft.Json;
namespace Data
{
public class dataLayer : IData
{
public dataLayer()
{
}
public List<Bet> getBets()
{
List<Bet> list = new List<Bet>();
try
{
using (StreamReader file = File.OpenText(@"Data/bets.json"))
{
JsonSerializer serializer = new JsonSerializer();
list = (List<Bet>)serializer.Deserialize(file, typeof(List<Bet>));
}
} catch (Exception e)
{
}
return list;
}
public List<Game> getGames()
{
List<Game> list = new List<Game>();
try
{
using (StreamReader file = File.OpenText(@"Data/games.json"))
{
JsonSerializer serializer = new JsonSerializer();
list = (List<Game>)serializer.Deserialize(file, typeof(List<Game>));
}
} catch (Exception e)
{
}
return list;
}
public List<Person> getPersons()
{
List<Person> list = new List<Person>();
try {
using (StreamReader file = File.OpenText(@"Data/persons.json"))
{
JsonSerializer serializer = new JsonSerializer();
list = (List<Person>)serializer.Deserialize(file, typeof(List<Person>));
}
} catch (Exception e)
{
}
return list;
}
public List<Ploeg> getPloegen()
{
List<Ploeg> list = new List<Ploeg>();
try
{
using (StreamReader file = File.OpenText(@"Data/ploegen.json"))
{
JsonSerializer serializer = new JsonSerializer();
list = (List<Ploeg>)serializer.Deserialize(file, typeof(List<Ploeg>));
}
} catch (Exception e)
{
}
return list;
}
public void saveBets(List<Bet> b)
{
using (StreamWriter file = File.CreateText(@"Data/bets.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, b);
}
}
public void saveGames(List<Game> g)
{
using (StreamWriter file = File.CreateText(@"Data/games.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, g);
}
}
public void savePersons(List<Person> p)
{
using (StreamWriter file = File.CreateText(@"Data/persons.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, p);
}
}
public void savePloegen(List<Ploeg> p)
{
using (StreamWriter file = File.CreateText(@"Data/ploegen.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, p);
}
}
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net47" />
</packages>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

View File

@@ -0,0 +1,57 @@
using System;
using Globals.Interfaces;
namespace Globals.classes
{
public class Bet : IBet
{
public Bet(Game game, Person person, double cash, main.state ploeg)
{
this.game = game;
this.person = person;
this.cash = cash;
this.ploeg = ploeg;
this.finished = false;
}
public int Id { get; set; }
public Game game { get; set; }
public Person person { get; set; }
public double cash { get; set; }
public bool succes { get { return (ploeg == game.getWinner());}}
public main.state ploeg { get; set; }
public bool finished { get; set; }
public override bool Equals(object obj)
{
Bet b = (Bet)obj;
return b.game == this.game && this.person == b.person && b.cash == this.cash && this.ploeg == b.ploeg;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public double getProfit()
{
double tmp = 0;
if (finished)
{
if (succes)
{
tmp += cash * 2;
}
}
else
{
throw new Exception("GAME NOT FINISHED DUH");
}
return tmp;
}
public override string ToString()
{
return person.ToString() + ":" + this.cash + "$ on " + this.game.ToString();
}
}
}

View File

@@ -0,0 +1,89 @@
using System;
using Globals.Interfaces;
using static Globals.main;
namespace Globals.classes
{
public class Game : IGame
{
public DateTime date { get; set; } //y m d
public Game(Ploeg home, Ploeg away, DateTime d)
{
this.home = home;
this.away = away;
this.date = d;
}
public Game(Ploeg home, Ploeg away, DateTime d, int scoreHome, int scoreAway)
{
this.home = home;
this.away = away;
this.home.score = scoreHome;
this.away.score = scoreAway;
this.date = d;
}
public Game(int id, Ploeg home, Ploeg away)
{
Id = id;
this.home = home ?? throw new ArgumentNullException(nameof(home));
this.away = away ?? throw new ArgumentNullException(nameof(away));
}
public Game(int id, Ploeg home, Ploeg away, int scoreHome, int scoreAway)
{
Id = id;
this.home = home ?? throw new ArgumentNullException(nameof(home));
this.away = away ?? throw new ArgumentNullException(nameof(away));
this.home.score = scoreHome;
this.away.score = scoreAway;
}
public int Id { get; set; }
public Ploeg home { get; set; }
public Ploeg away { get; set; }
public state getWinner()
{
if (!this.home.scoreSet || !this.away.scoreSet)
{
if (this.home.score > this.away.score) return state.home;
else if (this.away.score > this.home.score) return state.away;
else return state.draw;
} else
{
throw new Exception("No scores were set yet. Please set scores for the game first.");
}
}
public override bool Equals(object obj)
{
Game g = (Game)obj;
return this.home == g.away;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override string ToString()
{
return this.home.ToString() + " / " + this.away.ToString();
}
}
}

View File

@@ -0,0 +1,40 @@
using System;
using Globals.Interfaces;
namespace Globals.classes
{
public class Person : IPerson
{
public Person( string name, string lastname, string adress, string gsm, double balance)
{
this.name = name;
this.lastname = lastname;
this.adress = adress;
this.gsm = gsm;
this.balance = balance;
}
public int Id { get; set; }
public string name { get; set; }
public string lastname { get; set; }
public string adress { get; set; }
public string gsm { get; set; }
public double balance { get; set; }
public override bool Equals(object obj)
{
Person p = (Person)obj;
return this.Id == p.Id;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override string ToString()
{
return this.name + " " + this.lastname;
}
}
}

View File

@@ -0,0 +1,47 @@
using System;
using Globals.Interfaces;
namespace Globals.classes
{
public class Ploeg : IPloeg
{
public Ploeg(string naam)
{
this.naam = naam;
this.score = int.MinValue;
}
public Ploeg(string naam, int score) : this(naam)
{
this.score = score;
}
public int Id { get; set; }
public string naam { get; set; }
public int score { get; set; }
public bool scoreSet { get => this.score != int.MinValue; }
public override bool Equals(object obj)
{
Ploeg t = (Ploeg)obj;
return this.Id == t.Id;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override string ToString()
{
string score = "";
if (this.score != int.MinValue)
{
score = ":" + this.score;
}
return this.naam + score;
}
}
}

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Globals</RootNamespace>
<AssemblyName>Globals</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="MyClass.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Classes\Bet.cs" />
<Compile Include="Classes\Game.cs" />
<Compile Include="Classes\Person.cs" />
<Compile Include="Classes\Ploeg.cs" />
<Compile Include="Interfaces\IBet.cs" />
<Compile Include="Interfaces\IData.cs" />
<Compile Include="Interfaces\IGame.cs" />
<Compile Include="Interfaces\ILogic.cs" />
<Compile Include="Interfaces\IPerson.cs" />
<Compile Include="Interfaces\IPloeg.cs" />
<Compile Include="main.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Classes\" />
<Folder Include="Interfaces\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,18 @@
using System;
using Globals.classes;
using static Globals.main;
namespace Globals.Interfaces
{
public interface IBet
{
int Id { get; set; }
Game game { get; set; }
Person person { get; set; }
double cash { get; set; }
bool succes { get; }
state ploeg { get; set; }
bool finished { get; set; }
double getProfit();
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using Globals.classes;
namespace Globals.Interfaces
{
public interface IData
{
List<Person> getPersons();
List<Game> getGames();
List<Ploeg> getPloegen();
List<Bet> getBets();
void saveBets(List<Bet> b);
void saveGames(List<Game> g);
void savePloegen(List<Ploeg> p);
void savePersons(List<Person> p);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using Globals.classes;
using static Globals.main;
namespace Globals.Interfaces
{
public interface IGame
{
int Id { get; set; }
Ploeg home { get; set; }
Ploeg away { get; set; }
DateTime date { get; set; }
state getWinner();
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using Globals.classes;
namespace Globals.Interfaces
{
public interface ILogic
{
List<Person> persons { get; set; }
List<Bet> bets { get; set; }
List<Ploeg> ploegen { get; set; }
List<Game> games { get; set; }
Person getPerson(int id);
Bet getBet(int id);
Ploeg getPloeg(int id);
Game getGame(int id);
void addPloeg(Ploeg p);
void addGame(Game g);
void addBet(Bet b);
void addPerson(Person p);
void save();
void updateGame(Game g);
void updatePerson(Person p);
}
}

View File

@@ -0,0 +1,14 @@
using System;
namespace Globals.Interfaces
{
public interface IPerson
{
int Id { get; set; }
string name { get; set; }
string lastname { get; set; }
string adress { get; set; }
string gsm { get; set; }
double balance { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using System;
namespace Globals.Interfaces
{
public interface IPloeg
{
int Id { get; set; }
string naam { get; set; }
int score { get; set; }
bool scoreSet { get; }
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace Globals
{
public class MyClass
{
public MyClass()
{
}
}
}

View File

@@ -0,0 +1,26 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Globals")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("${AuthorCopyright}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@@ -0,0 +1,9 @@

using System;
namespace Globals
{
public class main
{
public enum state { draw, home, away };
}
}

View File

@@ -0,0 +1,17 @@
<%@ Page Language="C#" Inherits="Gui.Admin" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Admin</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button id="addUser" OnClick="addUser_Click" runat="server" Text="addUser"/>
<asp:Button id="addMatch" OnClick="addMatch_Click" runat="server" Text="addMatch"/>
<asp:Button id="addPloeg" OnClick="addPloeg_Click" runat="server" Text="addPloeg"/>
<p>games:</p>
<asp:ListBox id="listGames" runat="server"/>
<asp:Button id="updateGame" OnClick="updateGame_Click" runat="server" Text="updateGame"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using Globals.classes;
using Logic;
namespace Gui
{
public partial class Admin : System.Web.UI.Page
{
LogicLayer logic;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
listGames.DataSource = logic.games;
listGames.DataBind();
}
}
public void addUser_Click(object sender, EventArgs args)
{
Server.Transfer("addUser.aspx");
}
public void addBet_Click(object sender, EventArgs args)
{
Server.Transfer("addBet.aspx");
}
public void addMatch_Click(object sender, EventArgs args)
{
Server.Transfer("addMatch.aspx");
}
public void addPloeg_Click(object sender, EventArgs args)
{
Server.Transfer("addPloeg.aspx");
}
public void updateGame_Click(object sender, EventArgs args)
{
IList<Game> boundList2 = (IList<Game>)listGames.DataSource;
HttpContext.Current.Application["currGame"] = boundList2[listGames.SelectedIndex];
Server.Transfer("updateGame.aspx");
}
}
}

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class Admin {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.Button addUser;
protected System.Web.UI.WebControls.Button addMatch;
protected System.Web.UI.WebControls.Button addPloeg;
protected System.Web.UI.WebControls.ListBox listGames;
protected System.Web.UI.WebControls.Button updateGame;
}
}

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[{"Id":0,"name":"beppe","lastname":"vanrolleghem","adress":"123 straat","gsm":"1929192919","balance":0.0}]

View File

@@ -0,0 +1 @@
[{"Id":0,"naam":"bepkes","score":-2147483648,"scoreSet":false},{"Id":1,"naam":"selmakes","score":-2147483648,"scoreSet":false}]

View File

@@ -0,0 +1,14 @@
<%@ Page Language="C#" Inherits="Gui.Default" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Default</title>
</head>
<body>
<p>lorem ipsum</p>
<form id="form1" runat="server">
<asp:Button id="button1" runat="server" Text="Login" OnClick="button1Clicked" />
<asp:Button id="adminBtn" runat="server" Text="admin" OnClick="buttonAdminClicked" />
</form>
</body>
</html>

View File

@@ -0,0 +1,19 @@
using System;
using System.Web;
using System.Web.UI;
namespace Gui
{
public partial class Default : System.Web.UI.Page
{
public void button1Clicked(object sender, EventArgs args)
{
Server.Transfer("Login.aspx");
}
public void buttonAdminClicked(object sender, EventArgs args)
{
Server.Transfer("Admin.aspx");
}
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class Default {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.Button button1;
protected System.Web.UI.WebControls.Button adminBtn;
}
}

View File

@@ -0,0 +1 @@
<%@ Application Inherits="Gui.Global" %>

View File

@@ -0,0 +1,16 @@
using System.Web;
using Logic;
namespace Gui
{
public class Global : HttpApplication
{
protected void Application_Start()
{
System.Web.HttpContext.Current.Application["logic"] = new LogicLayer();
System.Web.HttpContext.Current.Application["debug"] = false;
}
}
}

View File

@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{62B345B0-420C-4926-9E6E-9B532AFD3713}</ProjectGuid>
<ProjectTypeGuids>{349C5851-65DF-11DA-9384-00065B846F21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>Gui</RootNamespace>
<AssemblyName>Gui</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Web.Services" />
</ItemGroup>
<ItemGroup>
<Content Include="Global.asax" />
<Content Include="Web.config" />
<Content Include="Default.aspx" />
<Content Include="Login.aspx" />
<Content Include="mainForm.aspx" />
<Content Include="Admin.aspx" />
<Content Include="addUser.aspx" />
<Content Include="addBet.aspx" />
<Content Include="addMatch.aspx" />
<Content Include="addPloeg.aspx" />
<Content Include="addBalance.aspx" />
<Content Include="updateGame.aspx" />
</ItemGroup>
<ItemGroup>
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Login.aspx.cs">
<DependentUpon>Login.aspx</DependentUpon>
</Compile>
<Compile Include="Login.aspx.designer.cs">
<DependentUpon>Login.aspx</DependentUpon>
</Compile>
<Compile Include="mainForm.aspx.cs">
<DependentUpon>mainForm.aspx</DependentUpon>
</Compile>
<Compile Include="mainForm.aspx.designer.cs">
<DependentUpon>mainForm.aspx</DependentUpon>
</Compile>
<Compile Include="Admin.aspx.cs">
<DependentUpon>Admin.aspx</DependentUpon>
</Compile>
<Compile Include="Admin.aspx.designer.cs">
<DependentUpon>Admin.aspx</DependentUpon>
</Compile>
<Compile Include="addUser.aspx.cs">
<DependentUpon>addUser.aspx</DependentUpon>
</Compile>
<Compile Include="addUser.aspx.designer.cs">
<DependentUpon>addUser.aspx</DependentUpon>
</Compile>
<Compile Include="addBet.aspx.cs">
<DependentUpon>addBet.aspx</DependentUpon>
</Compile>
<Compile Include="addBet.aspx.designer.cs">
<DependentUpon>addBet.aspx</DependentUpon>
</Compile>
<Compile Include="addMatch.aspx.cs">
<DependentUpon>addMatch.aspx</DependentUpon>
</Compile>
<Compile Include="addMatch.aspx.designer.cs">
<DependentUpon>addMatch.aspx</DependentUpon>
</Compile>
<Compile Include="addPloeg.aspx.cs">
<DependentUpon>addPloeg.aspx</DependentUpon>
</Compile>
<Compile Include="addPloeg.aspx.designer.cs">
<DependentUpon>addPloeg.aspx</DependentUpon>
</Compile>
<Compile Include="addBalance.aspx.cs">
<DependentUpon>addBalance.aspx</DependentUpon>
</Compile>
<Compile Include="addBalance.aspx.designer.cs">
<DependentUpon>addBalance.aspx</DependentUpon>
</Compile>
<Compile Include="updateGame.aspx.cs">
<DependentUpon>updateGame.aspx</DependentUpon>
</Compile>
<Compile Include="updateGame.aspx.designer.cs">
<DependentUpon>updateGame.aspx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Logic\Logic.csproj">
<Project>{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}</Project>
<Name>Logic</Name>
</ProjectReference>
<ProjectReference Include="..\Globals\Globals.csproj">
<Project>{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}</Project>
<Name>Globals</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Data\" />
</ItemGroup>
<ItemGroup>
<None Include="Data\persons.json" />
<None Include="Data\bets.json" />
<None Include="Data\ploegen.json" />
<None Include="Data\games.json" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<MonoDevelop>
<Properties>
<XspParameters Port="8080" Address="127.0.0.1" SslMode="None" SslProtocol="Default" KeyType="None" CertFile="" KeyFile="" PasswordOptions="None" Password="" Verbose="True" />
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project>

View File

@@ -0,0 +1,14 @@
<%@ Page Language="C#" Inherits="Gui.Login" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Login</title>
</head>
<body>
<h1>HI</h1>
<form id="form1" runat="server">
<asp:ListBox id="lstUsers" runat="server"/>
<asp:Button id="LoginBtn" runat="server" OnClick="Login_Click"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using Logic;
namespace Gui
{
public partial class Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LogicLayer logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
lstUsers.DataSource = logic.persons;
lstUsers.DataBind();
}
}
protected override void OnInitComplete(EventArgs e)
{
base.OnInitComplete(e);
}
protected override void OnPreLoad(EventArgs e)
{
base.OnPreLoad(e);
}
public void Login_Click(object o, EventArgs e)
{
HttpContext.Current.Application["user"] = lstUsers.SelectedItem;
Server.Transfer("mainForm.aspx");
}
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class Login {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.ListBox lstUsers;
protected System.Web.UI.WebControls.Button LoginBtn;
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!--
Web.config file for Gui.
The settings that can be used in this file are documented at
http://www.mono-project.com/Config_system.web and
http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5">
<assemblies />
</compilation>
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>

View File

@@ -0,0 +1,15 @@
<%@ Page Language="C#" Inherits="Gui.addBalance" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>addBalance</title>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox id="balans" runat="server"/>
<asp:Label id="statusLabel" runat="server"/>
<asp:Button id="confirm" OnClick="add" runat="server"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,27 @@
using System;
using System.Web;
using System.Web.UI;
using Globals.classes;
namespace Gui
{
public partial class addBalance : System.Web.UI.Page
{
public void add(Object o, EventArgs e)
{
try
{
double bal = double.Parse(balans.Text);
((Person)HttpContext.Current.Application["user"]).balance += bal;
Response.Redirect("mainForm.aspx");
}
catch (Exception ex)
{
statusLabel.Text = "There was a problem parsing the balance, try again. (format 0.00)";
return;
}
}
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class addBalance {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.TextBox balans;
protected System.Web.UI.WebControls.Label statusLabel;
protected System.Web.UI.WebControls.Button confirm;
}
}

View File

@@ -0,0 +1,21 @@
<%@ Page Language="C#" Inherits="Gui.addBet" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>addBet</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label id="gameinfo" runat="server"/>
<p>Amount</p>
<asp:TextBox id="amount" runat="server"/>
<p>on</p>
<asp:DropDownList id="teams" runat="server"/>
<p>BetType</p>
<asp:DropDownList id="type" runat="server"/>
<asp:Label id="lblStatus" runat="server"/>
<asp:Button id="PlaceBet" runat="server" OnClick="placeBet"/>
<asp:Button id="cancel" runat="server" OnClick="ret"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using Globals.classes;
using Logic;
using static Globals.main;
namespace Gui
{
public partial class addBet : System.Web.UI.Page
{
LogicLayer logic;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
Game currGame = (Game)HttpContext.Current.Application["currGame"];
teams.DataSource = new List<state> { state.home, state.away, state.draw };
gameinfo.Text = currGame.ToString();
}
}
public void placeBet(object sender, EventArgs e)
{
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
try
{
Game currGame = (Game)HttpContext.Current.Application["currGame"];
IList<state> boundList2 = (IList<state>)teams.DataSource;
state currPloeg = boundList2[teams.SelectedIndex];
double cash = double.Parse(amount.Text);
Person currPers = (Person)HttpContext.Current.Application["user"];
if (cash > currPers.balance)
{
lblStatus.Text = "You dont have enough cash my guy.";
}else
{
currPers.balance -= cash;
logic.updatePerson(currPers);
}
Bet b = new Bet(currGame, currPers, cash, currPloeg);
logic.addBet(b);
lblStatus.Text = "Bet placed";
HttpContext.Current.Application["user"] = currPers;
return;
} catch (Exception ex)
{
lblStatus.Text = ex.Message;
return;
}
}
public void ret(object sender, EventArgs e)
{
Response.Redirect("mainForm.aspx");
}
}
}

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class addBet {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.Label gameinfo;
protected System.Web.UI.WebControls.TextBox amount;
protected System.Web.UI.WebControls.DropDownList teams;
protected System.Web.UI.WebControls.DropDownList type;
protected System.Web.UI.WebControls.Label lblStatus;
protected System.Web.UI.WebControls.Button PlaceBet;
protected System.Web.UI.WebControls.Button cancel;
}
}

View File

@@ -0,0 +1,34 @@
<%@ Page Language="C#" Inherits="Gui.addMatch" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>addMatch</title>
</head>
<body>
<form id="form1" runat="server">
<p>leave score blank for non scores</p>
<p>Ploeg1</p>
<asp:DropDownList id="ploeg1" runat="server" />
<p>score</p>
<asp:TextBox id="score1" runat="server" />
<p>Ploeg2</p>
<asp:DropDownList id="ploeg2" runat="server" />
<p>score</p>
<asp:TextBox id="score2" runat="server" />
<p>dag</p>
<asp:DropDownList id="dag" runat="server"/>
<p>maand</p>
<asp:DropDownList id="maand" runat="server" />
<p>year</p>
<asp:DropDownList id="jaar" runat="server"/>
<p>status:</p>
<asp:Label id="statusLabel" runat="server" />
<asp:Button id="matchadd" OnClick="matchadd_Click" runat="server" Text="AddMatch"/>
<asp:Button id="returnHome" OnClick="ret" runat="server" Text="Return home" />
</form>
</body>
</html>

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using Globals.classes;
using Logic;
namespace Gui
{
public partial class addMatch : System.Web.UI.Page
{
LogicLayer logic;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
dag.DataSource = Enumerable.Range(1, 31).ToArray<int>();
dag.DataBind();
maand.DataSource= Enumerable.Range(1, 12).ToArray<int>();
maand.DataBind();
jaar.DataSource = Enumerable.Range(2015, 10).ToArray<int>();
jaar.DataBind();
ploeg1.DataSource = logic.ploegen;
ploeg1.DataBind();
ploeg2.DataSource = logic.ploegen;
ploeg2.DataBind();
}
}
public void matchadd_Click(object sender, EventArgs e)
{
IList<Ploeg> p1l = (IList<Ploeg>)ploeg1.DataSource;
IList<Ploeg> p2l = (IList<Ploeg>)ploeg2.DataSource;
Ploeg home = p1l[ploeg1.SelectedIndex];
Ploeg away = p2l[ploeg2.SelectedIndex];
int d, m, y = 0;
if (home == away)
{
statusLabel.Text = "selecteer nie dezelfde ploege pls";
return;
}
try
{
if (score1.Text != "" || score2.Text != "")
{
home.score = int.Parse(score1.Text);
away.score = int.Parse(score2.Text);
}
d = int.Parse(dag.Text);
m = int.Parse(maand.Text);
y = int.Parse(jaar.Text);
}
catch (Exception ex)
{
statusLabel.Text = "There was a problem parsing the data try again";
return;
}
Game g = new Game(home, away, new DateTime(y, m, d));
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
logic.addGame(g);
logic.save();
System.Web.HttpContext.Current.Application["logic"] = this.logic;
}
public void ret(object sender, EventArgs e)
{
Response.Redirect("Admin.aspx");
}
}
}

View File

@@ -0,0 +1,38 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class addMatch {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.DropDownList ploeg1;
protected System.Web.UI.WebControls.TextBox score1;
protected System.Web.UI.WebControls.DropDownList ploeg2;
protected System.Web.UI.WebControls.TextBox score2;
protected System.Web.UI.WebControls.DropDownList dag;
protected System.Web.UI.WebControls.DropDownList maand;
protected System.Web.UI.WebControls.DropDownList jaar;
protected System.Web.UI.WebControls.Label statusLabel;
protected System.Web.UI.WebControls.Button matchadd;
protected System.Web.UI.WebControls.Button returnHome;
}
}

View File

@@ -0,0 +1,16 @@
<%@ Page Language="C#" Inherits="Gui.addPloeg" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>addPloeg</title>
</head>
<body>
<form id="form1" runat="server">
<p>naam</p>
<asp:TextBox id="naam" runat="server"/>
<asp:Label id="status" runat="server" />
<asp:Button id="confirm" runat="server" Text="confirm" OnClick="confirm_Click"/>
<asp:Button id="ret" runat="server" Text="Return" OnClick="ret_Click"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
using System;
using System.Web;
using System.Web.UI;
using Globals.classes;
using Logic;
namespace Gui
{
public partial class addPloeg : System.Web.UI.Page
{
LogicLayer logic;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
}
}
public void confirm_Click(object sender, EventArgs e)
{
Ploeg p = new Ploeg(naam.Text);
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
logic.addPloeg(p);
logic.save();
HttpContext.Current.Application["logic"] = logic;
}
public void ret_Click(object sender, EventArgs e)
{
Response.Redirect("Admin.aspx");
}
}
}

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class addPloeg {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.TextBox naam;
protected System.Web.UI.WebControls.Label status;
protected System.Web.UI.WebControls.Button confirm;
protected System.Web.UI.WebControls.Button ret;
}
}

View File

@@ -0,0 +1,25 @@
<%@ Page Language="C#" Inherits="Gui.addUser" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>addUser</title>
</head>
<body>
<form id="form1" runat="server">
<p>Naam</p>
<asp:TextBox id="txtName" runat="server"/>
<p>Achternaam</p>
<asp:TextBox id="txtLastName" runat="server"/>
<p>addr</p>
<asp:TextBox id="txtAddr" runat="server"/>
<p>gsm</p>
<asp:TextBox id="txtGsm" runat="server"/>
<p>balans</p>
<asp:TextBox id="txtBalance" runat="server"/>
<asp:Label id="alertlabel" runat="server" />
<asp:Button id="addusr" OnClick="test" runat="server" Text="Add User"/>
<p></p>
<asp:Button id="return" OnClick="ret" runat="server" Text="Return"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,57 @@
using System;
using System.Diagnostics;
using System.Web;
using System.Web.UI;
using Globals.classes;
using Logic;
namespace Gui
{
public partial class addUser : System.Web.UI.Page
{
private LogicLayer logic;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
this.logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
}
}
public void test(object sender, EventArgs e)
{
this.logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
string name = txtName.Text;
string lastname = txtLastName.Text;
string adress = txtAddr.Text;
string gsm = txtGsm.Text;
double balance = 0;
try
{
balance = double.Parse(txtBalance.Text);
}
catch (Exception ex)
{
if ((bool)System.Web.HttpContext.Current.Application["debug"])
{
alertlabel.Text = ex.ToString();
return;
}
alertlabel.Text = "There was a problem parsing your balance. Try formatting the balance as {0.00}";
return;
}
Person p = new Person(name, lastname, adress, gsm, balance);
logic.addPerson(p);
logic.save();
System.Web.HttpContext.Current.Application["logic"] = logic;
}
public void ret(object sender, EventArgs e)
{
Response.Redirect("Admin.aspx");
}
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class addUser {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.TextBox txtName;
protected System.Web.UI.WebControls.TextBox txtLastName;
protected System.Web.UI.WebControls.TextBox txtAddr;
protected System.Web.UI.WebControls.TextBox txtGsm;
protected System.Web.UI.WebControls.TextBox txtBalance;
protected System.Web.UI.WebControls.Label alertlabel;
protected System.Web.UI.WebControls.Button addusr;
protected System.Web.UI.WebControls.Button @return;
}
}

View File

@@ -0,0 +1,22 @@
<%@ Page Language="C#" Inherits="Gui.mainForm" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>mainForm</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label runat="server" id="labelNaam"/>
<asp:Label id="labelAdress" runat="server"/>
<asp:Label id="labelGsm" runat="server"/>
<asp:Label id="labelBalance" runat="server"/>
<asp:Button id="btnAddBalance" runat="server" Text="add balance" OnClick='btnAddBalance_Click'/>
<asp:Label id="labelTitleGamebox" runat="server" />
<asp:ListBox id ="listGames" runat="server"/>
<asp:Button id="btnPlaceBet" runat="server" Text="Place Bet On Selected Game" OnClick="placeBet_Click"/>
<p>your current bets:</p>
<asp:ListBox id="listBets" runat="server"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,33 @@
using System;
using System.Web;
using System.Web.UI;
using Logic;
namespace Gui
{
public partial class mainForm : System.Web.UI.Page
{
LogicLayer logic;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
listGames.DataSource = logic.games;
listGames.DataBind();
}
}
public void btnAddBalance_Click(object o, EventArgs e)
{
}
public void placeBet_Click(object o, EventArgs e)
{
}
}
}

View File

@@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class mainForm {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.Label labelNaam;
protected System.Web.UI.WebControls.Label labelAdress;
protected System.Web.UI.WebControls.Label labelGsm;
protected System.Web.UI.WebControls.Label labelBalance;
protected System.Web.UI.WebControls.Button btnAddBalance;
protected System.Web.UI.WebControls.Label labelTitleGamebox;
protected System.Web.UI.WebControls.ListBox listGames;
protected System.Web.UI.WebControls.Button btnPlaceBet;
protected System.Web.UI.WebControls.ListBox listBets;
}
}

View File

@@ -0,0 +1,17 @@
<%@ Page Language="C#" Inherits="Gui.updateGame" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>updateGame</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label id="thuis" runat="server"/>
<asp:TextBox id="scoreThuis" runat="server"/>
<asp:Label id="uit" runat="server"/>
<asp:TextBox id="scoreUit" runat="server"/>
<asp:Button id="finish" OnClick="scores" runat="server" Text="confirm"/>
<asp:Button id="cancel" OnClick="ret" runat="server" Text="cancel"/>
</form>
</body>
</html>

View File

@@ -0,0 +1,41 @@
using System;
using System.Web;
using System.Web.UI;
using Globals.classes;
using Logic;
namespace Gui
{
public partial class updateGame : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Game g = (Game)System.Web.HttpContext.Current.Application["currGame"];
thuis.Text = g.home.ToString();
uit.Text = g.away.ToString();
}
}
public void scores(Object o, EventArgs e)
{
Game g = (Game)System.Web.HttpContext.Current.Application["currGame"];
LogicLayer logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
try
{
int a = int.Parse(scoreThuis.Text);
int b = int.Parse(scoreUit.Text);
g.home.score = a;
g.away.score = b;
} catch (Exception ex)
{
}
}
}
}

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Gui {
public partial class updateGame {
protected System.Web.UI.HtmlControls.HtmlForm form1;
protected System.Web.UI.WebControls.Label thuis;
protected System.Web.UI.WebControls.TextBox scoreThuis;
protected System.Web.UI.WebControls.Label uit;
protected System.Web.UI.WebControls.TextBox scoreUit;
protected System.Web.UI.WebControls.Button finish;
protected System.Web.UI.WebControls.Button cancel;
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Logic</RootNamespace>
<AssemblyName>Logic</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="LogicLayer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Data\Data.csproj">
<Project>{46C1FC26-4A1F-43E4-8682-853010AB38AC}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\Globals\Globals.csproj">
<Project>{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}</Project>
<Name>Globals</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,175 @@
using System;
using System.Collections.Generic;
using Data;
using Globals.classes;
using Globals.Interfaces;
namespace Logic
{
public class LogicLayer : ILogic
{
private dataLayer d;
public LogicLayer()
{
d = new dataLayer();
persons = d.getPersons();
bets = d.getBets();
ploegen = d.getPloegen();
games = d.getGames();
}
public LogicLayer(bool testMode)
{
d = new dataLayer();
this.persons = new List<Person>();
Person p = new Person("beppe", "vanrolleghem", "123straat", "04877777", 5);
fixIds();
this.persons.Add(p);
}
public List<Person> persons { get ; set; }
public List<Bet> bets { get; set; }
public List<Ploeg> ploegen { get; set; }
public List<Game> games { get; set; }
private void fixIds()
{
int i = 0;
foreach(Person p in persons)
{
p.Id = i;
i++;
}
i = 0;
foreach(Bet b in bets)
{
b.Id = i;
i++;
}
i = 0;
foreach(Ploeg p in ploegen)
{
p.Id = i;
i++;
}
i = 0;
foreach(Game g in games)
{
g.Id = i;
i++;
}
}
public void addBet(Bet b)
{
bets.Add(b);
fixIds();
}
public void addGame(Game g)
{
games.Add(g);
fixIds();
}
public void addPerson(Person p)
{
persons.Add(p);
fixIds();
}
public void addPloeg(Ploeg p)
{
ploegen.Add(p);
fixIds();
}
public Bet getBet(int id)
{
foreach(Bet b in bets)
{
if (b.Id == id) return b;
}
throw new Exception("No bets found with that id");
}
public Game getGame(int id)
{
foreach (Game b in games)
{
if (b.Id == id) return b;
}
throw new Exception("No bets found with that id");
}
public Person getPerson(int id)
{
foreach (Person b in persons)
{
if (b.Id == id) return b;
}
throw new Exception("No bets found with that id");
}
public Ploeg getPloeg(int id)
{
foreach (Ploeg b in ploegen)
{
if (b.Id == id) return b;
}
throw new Exception("No bets found with that id");
}
public void save()
{
fixIds();
d.saveBets(bets);
d.saveGames(games);
d.savePersons(persons);
d.savePloegen(ploegen);
}
public void updateGame(Game g)
{
foreach (Game ga in games)
{
if (ga.Id == g.Id)
{
ga.home = g.home;
ga.away = g.away;
}
}
updateBets();
updateBalances();
}
private void updateBets()
{
foreach (Bet b in bets)
{
Game g = games.Find(e => b.game.Id == e.Id);
b.game = g;
if (g.away.scoreSet && g.home.scoreSet) { b.finished = true; }
}
}
private void updateBalances()
{
foreach (Person p in persons)
{
foreach (Bet b in bets)
{
if (b.Equals(p) && b.finished) p.balance += b.getProfit();
}
}
}
public void updatePerson(Person p)
{
persons[persons.FindIndex(e => e.Id == p.Id)] = p;
}
}
}

View File

@@ -0,0 +1,26 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Logic")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("${AuthorCopyright}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@@ -113,37 +113,14 @@ namespace LogicLayer
keuzes.Add(new Keuze(128, 1, 0.15, Gokken.Thuisploeg));
}
public List<string> GetGebruikers()
public List<Persoon> GetGebruikers()
{
List<string> lijst = new List<string>();
if (personen != null) {
foreach(Persoon p in personen)
{
lijst.Add(p.persoon_ID+":"+p.naam + " " + p.voorNaam);
}
}
else
{
lijst.Add("None");
}
return lijst;
return personen;
}
public List<string> GetWedstrijden()
public List<Wedstrijden> GetWedstrijden()
{
List<string> temp = new List<string>();
if (personen != null)
{
foreach (Wedstrijden w in wedstrijden)
{
temp.Add( w.thuisPloeg + " - " + w.uitPloeg);
}
}
else
{
temp.Add("None");
}
return temp;
return wedstrijden;
}
public List<string> GetGeldVerdubbeling(int ID)

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

View File

@@ -34,6 +34,11 @@ namespace LogicLayer
throw new Exception("Foutieve ingave: " + ex);
}
}
public override string ToString()
{
return base.ToString();
}
}
}

View File

@@ -11,28 +11,122 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogicLayer", "LogicLayer\Lo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "Console\ConsoleApp.csproj", "{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "old", "old", "{BF8F2852-F325-4C72-AFF6-E0C40808625B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Data", "Data\Data.csproj", "{46C1FC26-4A1F-43E4-8682-853010AB38AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logic", "Logic\Logic.csproj", "{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gui", "Gui\Gui.csproj", "{62B345B0-420C-4926-9E6E-9B532AFD3713}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Globals", "Globals\Globals.csproj", "{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|Any CPU.Build.0 = Release|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|iPhone.Build.0 = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|iPhone.ActiveCfg = Release|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|iPhone.Build.0 = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|Any CPU.Build.0 = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|iPhone.Build.0 = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|iPhone.ActiveCfg = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|iPhone.Build.0 = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|Any CPU.Build.0 = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|iPhone.Build.0 = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|iPhone.ActiveCfg = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|iPhone.Build.0 = Release|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|Any CPU.Build.0 = Release|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|iPhone.Build.0 = Debug|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|iPhone.ActiveCfg = Release|Any CPU
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|iPhone.Build.0 = Release|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Release|Any CPU.Build.0 = Release|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Debug|iPhone.Build.0 = Debug|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Release|iPhone.ActiveCfg = Release|Any CPU
{46C1FC26-4A1F-43E4-8682-853010AB38AC}.Release|iPhone.Build.0 = Release|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Release|Any CPU.Build.0 = Release|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Debug|iPhone.Build.0 = Debug|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Release|iPhone.ActiveCfg = Release|Any CPU
{82F1AF49-F9FA-42A1-BD3B-A37C36E340AD}.Release|iPhone.Build.0 = Release|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Release|Any CPU.Build.0 = Release|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Debug|iPhone.Build.0 = Debug|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Release|iPhone.ActiveCfg = Release|Any CPU
{62B345B0-420C-4926-9E6E-9B532AFD3713}.Release|iPhone.Build.0 = Release|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Release|Any CPU.Build.0 = Release|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Debug|iPhone.Build.0 = Debug|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Release|iPhone.ActiveCfg = Release|Any CPU
{3643BC50-8412-4C17-99E0-9D4BF7EDEB78}.Release|iPhone.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -40,4 +134,10 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {13B0BD72-57FE-4A9D-86CA-848D0C9EE5EB}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948} = {BF8F2852-F325-4C72-AFF6-E0C40808625B}
{CA62D8EA-2739-4C85-81B4-FBA040592DAE} = {BF8F2852-F325-4C72-AFF6-E0C40808625B}
{517C3448-BD87-4D62-9316-6BABBC9A9CFC} = {BF8F2852-F325-4C72-AFF6-E0C40808625B}
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9} = {BF8F2852-F325-4C72-AFF6-E0C40808625B}
EndGlobalSection
EndGlobal

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

View File

@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:15206",
"sslPort": 44303
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"test": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}