From df39b0392c34c4c09bdeb0fc0c17a48aed064a54 Mon Sep 17 00:00:00 2001 From: Beppe Date: Thu, 4 Jul 2019 01:05:11 +0200 Subject: [PATCH] yup --- Online Gokkantoor/Console/ConsoleApp.csproj | 2 +- Online Gokkantoor/Data/Data.csproj | 49 +++++ .../Data/Properties/AssemblyInfo.cs | 26 +++ Online Gokkantoor/Data/data.cs | 130 +++++++++++++ Online Gokkantoor/Data/packages.config | 4 + Online Gokkantoor/DataLaag/DataLaag.csproj | 2 +- Online Gokkantoor/Globals/Classes/Bet.cs | 57 ++++++ Online Gokkantoor/Globals/Classes/Game.cs | 89 +++++++++ Online Gokkantoor/Globals/Classes/Person.cs | 40 ++++ Online Gokkantoor/Globals/Classes/Ploeg.cs | 47 +++++ Online Gokkantoor/Globals/Globals.csproj | 52 ++++++ Online Gokkantoor/Globals/Interfaces/IBet.cs | 18 ++ Online Gokkantoor/Globals/Interfaces/IData.cs | 18 ++ Online Gokkantoor/Globals/Interfaces/IGame.cs | 15 ++ .../Globals/Interfaces/ILogic.cs | 25 +++ .../Globals/Interfaces/IPerson.cs | 14 ++ .../Globals/Interfaces/IPloeg.cs | 11 ++ Online Gokkantoor/Globals/MyClass.cs | 10 + .../Globals/Properties/AssemblyInfo.cs | 26 +++ Online Gokkantoor/Globals/main.cs | 9 + Online Gokkantoor/Gui/Admin.aspx | 17 ++ Online Gokkantoor/Gui/Admin.aspx.cs | 57 ++++++ Online Gokkantoor/Gui/Admin.aspx.designer.cs | 28 +++ Online Gokkantoor/Gui/Data/bets.json | 1 + Online Gokkantoor/Gui/Data/games.json | 1 + Online Gokkantoor/Gui/Data/persons.json | 1 + Online Gokkantoor/Gui/Data/ploegen.json | 1 + Online Gokkantoor/Gui/Default.aspx | 14 ++ Online Gokkantoor/Gui/Default.aspx.cs | 19 ++ .../Gui/Default.aspx.designer.cs | 22 +++ Online Gokkantoor/Gui/Global.asax | 1 + Online Gokkantoor/Gui/Global.asax.cs | 16 ++ Online Gokkantoor/Gui/Gui.csproj | 140 ++++++++++++++ Online Gokkantoor/Gui/Login.aspx | 14 ++ Online Gokkantoor/Gui/Login.aspx.cs | 37 ++++ Online Gokkantoor/Gui/Login.aspx.designer.cs | 22 +++ Online Gokkantoor/Gui/Web.config | 16 ++ Online Gokkantoor/Gui/addBalance.aspx | 15 ++ Online Gokkantoor/Gui/addBalance.aspx.cs | 27 +++ .../Gui/addBalance.aspx.designer.cs | 24 +++ Online Gokkantoor/Gui/addBet.aspx | 21 +++ Online Gokkantoor/Gui/addBet.aspx.cs | 69 +++++++ Online Gokkantoor/Gui/addBet.aspx.designer.cs | 32 ++++ Online Gokkantoor/Gui/addMatch.aspx | 34 ++++ Online Gokkantoor/Gui/addMatch.aspx.cs | 80 ++++++++ .../Gui/addMatch.aspx.designer.cs | 38 ++++ Online Gokkantoor/Gui/addPloeg.aspx | 16 ++ Online Gokkantoor/Gui/addPloeg.aspx.cs | 35 ++++ .../Gui/addPloeg.aspx.designer.cs | 26 +++ Online Gokkantoor/Gui/addUser.aspx | 25 +++ Online Gokkantoor/Gui/addUser.aspx.cs | 57 ++++++ .../Gui/addUser.aspx.designer.cs | 34 ++++ Online Gokkantoor/Gui/mainForm.aspx | 22 +++ Online Gokkantoor/Gui/mainForm.aspx.cs | 33 ++++ .../Gui/mainForm.aspx.designer.cs | 36 ++++ Online Gokkantoor/Gui/updateGame.aspx | 17 ++ Online Gokkantoor/Gui/updateGame.aspx.cs | 41 ++++ .../Gui/updateGame.aspx.designer.cs | 30 +++ Online Gokkantoor/Logic/Logic.csproj | 47 +++++ Online Gokkantoor/Logic/LogicLayer.cs | 175 ++++++++++++++++++ .../Logic/Properties/AssemblyInfo.cs | 26 +++ Online Gokkantoor/LogicLayer/General.cs | 31 +--- .../LogicLayer/LogicLayer.csproj | 2 +- Online Gokkantoor/LogicLayer/Persoon.cs | 5 + Online Gokkantoor/Online Gokkantoor.sln | 100 ++++++++++ .../Online Gokkantoor_GUI.csproj | 2 +- .../test/Properties/launchSettings.json | 27 +++ 67 files changed, 2147 insertions(+), 31 deletions(-) create mode 100644 Online Gokkantoor/Data/Data.csproj create mode 100644 Online Gokkantoor/Data/Properties/AssemblyInfo.cs create mode 100644 Online Gokkantoor/Data/data.cs create mode 100644 Online Gokkantoor/Data/packages.config create mode 100644 Online Gokkantoor/Globals/Classes/Bet.cs create mode 100644 Online Gokkantoor/Globals/Classes/Game.cs create mode 100644 Online Gokkantoor/Globals/Classes/Person.cs create mode 100644 Online Gokkantoor/Globals/Classes/Ploeg.cs create mode 100644 Online Gokkantoor/Globals/Globals.csproj create mode 100644 Online Gokkantoor/Globals/Interfaces/IBet.cs create mode 100644 Online Gokkantoor/Globals/Interfaces/IData.cs create mode 100644 Online Gokkantoor/Globals/Interfaces/IGame.cs create mode 100644 Online Gokkantoor/Globals/Interfaces/ILogic.cs create mode 100644 Online Gokkantoor/Globals/Interfaces/IPerson.cs create mode 100644 Online Gokkantoor/Globals/Interfaces/IPloeg.cs create mode 100644 Online Gokkantoor/Globals/MyClass.cs create mode 100644 Online Gokkantoor/Globals/Properties/AssemblyInfo.cs create mode 100644 Online Gokkantoor/Globals/main.cs create mode 100644 Online Gokkantoor/Gui/Admin.aspx create mode 100644 Online Gokkantoor/Gui/Admin.aspx.cs create mode 100644 Online Gokkantoor/Gui/Admin.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/Data/bets.json create mode 100644 Online Gokkantoor/Gui/Data/games.json create mode 100644 Online Gokkantoor/Gui/Data/persons.json create mode 100644 Online Gokkantoor/Gui/Data/ploegen.json create mode 100644 Online Gokkantoor/Gui/Default.aspx create mode 100644 Online Gokkantoor/Gui/Default.aspx.cs create mode 100644 Online Gokkantoor/Gui/Default.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/Global.asax create mode 100644 Online Gokkantoor/Gui/Global.asax.cs create mode 100644 Online Gokkantoor/Gui/Gui.csproj create mode 100644 Online Gokkantoor/Gui/Login.aspx create mode 100644 Online Gokkantoor/Gui/Login.aspx.cs create mode 100644 Online Gokkantoor/Gui/Login.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/Web.config create mode 100644 Online Gokkantoor/Gui/addBalance.aspx create mode 100644 Online Gokkantoor/Gui/addBalance.aspx.cs create mode 100644 Online Gokkantoor/Gui/addBalance.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/addBet.aspx create mode 100644 Online Gokkantoor/Gui/addBet.aspx.cs create mode 100644 Online Gokkantoor/Gui/addBet.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/addMatch.aspx create mode 100644 Online Gokkantoor/Gui/addMatch.aspx.cs create mode 100644 Online Gokkantoor/Gui/addMatch.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/addPloeg.aspx create mode 100644 Online Gokkantoor/Gui/addPloeg.aspx.cs create mode 100644 Online Gokkantoor/Gui/addPloeg.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/addUser.aspx create mode 100644 Online Gokkantoor/Gui/addUser.aspx.cs create mode 100644 Online Gokkantoor/Gui/addUser.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/mainForm.aspx create mode 100644 Online Gokkantoor/Gui/mainForm.aspx.cs create mode 100644 Online Gokkantoor/Gui/mainForm.aspx.designer.cs create mode 100644 Online Gokkantoor/Gui/updateGame.aspx create mode 100644 Online Gokkantoor/Gui/updateGame.aspx.cs create mode 100644 Online Gokkantoor/Gui/updateGame.aspx.designer.cs create mode 100644 Online Gokkantoor/Logic/Logic.csproj create mode 100644 Online Gokkantoor/Logic/LogicLayer.cs create mode 100644 Online Gokkantoor/Logic/Properties/AssemblyInfo.cs create mode 100644 Online Gokkantoor/test/Properties/launchSettings.json diff --git a/Online Gokkantoor/Console/ConsoleApp.csproj b/Online Gokkantoor/Console/ConsoleApp.csproj index 55a4235..3e94250 100644 --- a/Online Gokkantoor/Console/ConsoleApp.csproj +++ b/Online Gokkantoor/Console/ConsoleApp.csproj @@ -1,5 +1,5 @@  - + Debug diff --git a/Online Gokkantoor/Data/Data.csproj b/Online Gokkantoor/Data/Data.csproj new file mode 100644 index 0000000..2e169ac --- /dev/null +++ b/Online Gokkantoor/Data/Data.csproj @@ -0,0 +1,49 @@ + + + + Debug + AnyCPU + {46C1FC26-4A1F-43E4-8682-853010AB38AC} + Library + Data + Data + v4.7 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + {3643BC50-8412-4C17-99E0-9D4BF7EDEB78} + Globals + + + + \ No newline at end of file diff --git a/Online Gokkantoor/Data/Properties/AssemblyInfo.cs b/Online Gokkantoor/Data/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..472862a --- /dev/null +++ b/Online Gokkantoor/Data/Properties/AssemblyInfo.cs @@ -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("")] diff --git a/Online Gokkantoor/Data/data.cs b/Online Gokkantoor/Data/data.cs new file mode 100644 index 0000000..9d3fbc8 --- /dev/null +++ b/Online Gokkantoor/Data/data.cs @@ -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 getBets() + { + List list = new List(); + try + { + using (StreamReader file = File.OpenText(@"Data/bets.json")) + { + + JsonSerializer serializer = new JsonSerializer(); + list = (List)serializer.Deserialize(file, typeof(List)); + + } + } catch (Exception e) + { + + } + + return list; + } + + public List getGames() + { + List list = new List(); + + try + { + using (StreamReader file = File.OpenText(@"Data/games.json")) + { + JsonSerializer serializer = new JsonSerializer(); + list = (List)serializer.Deserialize(file, typeof(List)); + + } + } catch (Exception e) + { + + } + return list; + } + + public List getPersons() + { + + List list = new List(); + try { + using (StreamReader file = File.OpenText(@"Data/persons.json")) + { + JsonSerializer serializer = new JsonSerializer(); + list = (List)serializer.Deserialize(file, typeof(List)); + + } + } catch (Exception e) + { + + } + return list; + } + + public List getPloegen() + { + List list = new List(); + try + { + using (StreamReader file = File.OpenText(@"Data/ploegen.json")) + { + JsonSerializer serializer = new JsonSerializer(); + list = (List)serializer.Deserialize(file, typeof(List)); + + } + } catch (Exception e) + { + + } + return list; + } + + public void saveBets(List b) + { + using (StreamWriter file = File.CreateText(@"Data/bets.json")) + { + JsonSerializer serializer = new JsonSerializer(); + serializer.Serialize(file, b); + } + } + + public void saveGames(List g) + { + using (StreamWriter file = File.CreateText(@"Data/games.json")) + { + JsonSerializer serializer = new JsonSerializer(); + serializer.Serialize(file, g); + } + } + + public void savePersons(List p) + { + using (StreamWriter file = File.CreateText(@"Data/persons.json")) + { + JsonSerializer serializer = new JsonSerializer(); + serializer.Serialize(file, p); + } + } + + public void savePloegen(List p) + { + using (StreamWriter file = File.CreateText(@"Data/ploegen.json")) + { + JsonSerializer serializer = new JsonSerializer(); + serializer.Serialize(file, p); + } + } + } +} diff --git a/Online Gokkantoor/Data/packages.config b/Online Gokkantoor/Data/packages.config new file mode 100644 index 0000000..39d1cce --- /dev/null +++ b/Online Gokkantoor/Data/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Online Gokkantoor/DataLaag/DataLaag.csproj b/Online Gokkantoor/DataLaag/DataLaag.csproj index 1dc634b..d24d8e3 100644 --- a/Online Gokkantoor/DataLaag/DataLaag.csproj +++ b/Online Gokkantoor/DataLaag/DataLaag.csproj @@ -1,5 +1,5 @@  - + Debug diff --git a/Online Gokkantoor/Globals/Classes/Bet.cs b/Online Gokkantoor/Globals/Classes/Bet.cs new file mode 100644 index 0000000..d273ac5 --- /dev/null +++ b/Online Gokkantoor/Globals/Classes/Bet.cs @@ -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(); + } + } +} diff --git a/Online Gokkantoor/Globals/Classes/Game.cs b/Online Gokkantoor/Globals/Classes/Game.cs new file mode 100644 index 0000000..297c118 --- /dev/null +++ b/Online Gokkantoor/Globals/Classes/Game.cs @@ -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(); + } + } +} diff --git a/Online Gokkantoor/Globals/Classes/Person.cs b/Online Gokkantoor/Globals/Classes/Person.cs new file mode 100644 index 0000000..6badab0 --- /dev/null +++ b/Online Gokkantoor/Globals/Classes/Person.cs @@ -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; + } + } +} diff --git a/Online Gokkantoor/Globals/Classes/Ploeg.cs b/Online Gokkantoor/Globals/Classes/Ploeg.cs new file mode 100644 index 0000000..b0d5b2e --- /dev/null +++ b/Online Gokkantoor/Globals/Classes/Ploeg.cs @@ -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; + } + + } +} diff --git a/Online Gokkantoor/Globals/Globals.csproj b/Online Gokkantoor/Globals/Globals.csproj new file mode 100644 index 0000000..fc6b756 --- /dev/null +++ b/Online Gokkantoor/Globals/Globals.csproj @@ -0,0 +1,52 @@ + + + + Debug + AnyCPU + {3643BC50-8412-4C17-99E0-9D4BF7EDEB78} + Library + Globals + Globals + v4.7 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Online Gokkantoor/Globals/Interfaces/IBet.cs b/Online Gokkantoor/Globals/Interfaces/IBet.cs new file mode 100644 index 0000000..4f65373 --- /dev/null +++ b/Online Gokkantoor/Globals/Interfaces/IBet.cs @@ -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(); + } +} diff --git a/Online Gokkantoor/Globals/Interfaces/IData.cs b/Online Gokkantoor/Globals/Interfaces/IData.cs new file mode 100644 index 0000000..0df4ba5 --- /dev/null +++ b/Online Gokkantoor/Globals/Interfaces/IData.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using Globals.classes; + +namespace Globals.Interfaces +{ + public interface IData + { + List getPersons(); + List getGames(); + List getPloegen(); + List getBets(); + void saveBets(List b); + void saveGames(List g); + void savePloegen(List p); + void savePersons(List p); + } +} diff --git a/Online Gokkantoor/Globals/Interfaces/IGame.cs b/Online Gokkantoor/Globals/Interfaces/IGame.cs new file mode 100644 index 0000000..7b887df --- /dev/null +++ b/Online Gokkantoor/Globals/Interfaces/IGame.cs @@ -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(); + } +} diff --git a/Online Gokkantoor/Globals/Interfaces/ILogic.cs b/Online Gokkantoor/Globals/Interfaces/ILogic.cs new file mode 100644 index 0000000..38d44b7 --- /dev/null +++ b/Online Gokkantoor/Globals/Interfaces/ILogic.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using Globals.classes; + +namespace Globals.Interfaces +{ + public interface ILogic + { + List persons { get; set; } + List bets { get; set; } + List ploegen { get; set; } + List 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); + } +} diff --git a/Online Gokkantoor/Globals/Interfaces/IPerson.cs b/Online Gokkantoor/Globals/Interfaces/IPerson.cs new file mode 100644 index 0000000..1ab6e80 --- /dev/null +++ b/Online Gokkantoor/Globals/Interfaces/IPerson.cs @@ -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; } + + } +} diff --git a/Online Gokkantoor/Globals/Interfaces/IPloeg.cs b/Online Gokkantoor/Globals/Interfaces/IPloeg.cs new file mode 100644 index 0000000..7ffc8be --- /dev/null +++ b/Online Gokkantoor/Globals/Interfaces/IPloeg.cs @@ -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; } + } +} diff --git a/Online Gokkantoor/Globals/MyClass.cs b/Online Gokkantoor/Globals/MyClass.cs new file mode 100644 index 0000000..0aeb7b8 --- /dev/null +++ b/Online Gokkantoor/Globals/MyClass.cs @@ -0,0 +1,10 @@ +using System; +namespace Globals +{ + public class MyClass + { + public MyClass() + { + } + } +} diff --git a/Online Gokkantoor/Globals/Properties/AssemblyInfo.cs b/Online Gokkantoor/Globals/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4b086e4 --- /dev/null +++ b/Online Gokkantoor/Globals/Properties/AssemblyInfo.cs @@ -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("")] diff --git a/Online Gokkantoor/Globals/main.cs b/Online Gokkantoor/Globals/main.cs new file mode 100644 index 0000000..b2444b8 --- /dev/null +++ b/Online Gokkantoor/Globals/main.cs @@ -0,0 +1,9 @@ + +using System; +namespace Globals +{ + public class main + { + public enum state { draw, home, away }; + } +} diff --git a/Online Gokkantoor/Gui/Admin.aspx b/Online Gokkantoor/Gui/Admin.aspx new file mode 100644 index 0000000..3e6dd9d --- /dev/null +++ b/Online Gokkantoor/Gui/Admin.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" Inherits="Gui.Admin" %> + + + + Admin + + +
+ + + +

games:

+ + + + + diff --git a/Online Gokkantoor/Gui/Admin.aspx.cs b/Online Gokkantoor/Gui/Admin.aspx.cs new file mode 100644 index 0000000..579f825 --- /dev/null +++ b/Online Gokkantoor/Gui/Admin.aspx.cs @@ -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 boundList2 = (IList)listGames.DataSource; + HttpContext.Current.Application["currGame"] = boundList2[listGames.SelectedIndex]; + Server.Transfer("updateGame.aspx"); + } + + + } +} diff --git a/Online Gokkantoor/Gui/Admin.aspx.designer.cs b/Online Gokkantoor/Gui/Admin.aspx.designer.cs new file mode 100644 index 0000000..abecb32 --- /dev/null +++ b/Online Gokkantoor/Gui/Admin.aspx.designer.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/Data/bets.json b/Online Gokkantoor/Gui/Data/bets.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/Online Gokkantoor/Gui/Data/bets.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/Online Gokkantoor/Gui/Data/games.json b/Online Gokkantoor/Gui/Data/games.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/Online Gokkantoor/Gui/Data/games.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/Online Gokkantoor/Gui/Data/persons.json b/Online Gokkantoor/Gui/Data/persons.json new file mode 100644 index 0000000..b07f876 --- /dev/null +++ b/Online Gokkantoor/Gui/Data/persons.json @@ -0,0 +1 @@ +[{"Id":0,"name":"beppe","lastname":"vanrolleghem","adress":"123 straat","gsm":"1929192919","balance":0.0}] \ No newline at end of file diff --git a/Online Gokkantoor/Gui/Data/ploegen.json b/Online Gokkantoor/Gui/Data/ploegen.json new file mode 100644 index 0000000..a7c555b --- /dev/null +++ b/Online Gokkantoor/Gui/Data/ploegen.json @@ -0,0 +1 @@ +[{"Id":0,"naam":"bepkes","score":-2147483648,"scoreSet":false},{"Id":1,"naam":"selmakes","score":-2147483648,"scoreSet":false}] \ No newline at end of file diff --git a/Online Gokkantoor/Gui/Default.aspx b/Online Gokkantoor/Gui/Default.aspx new file mode 100644 index 0000000..ec32c5e --- /dev/null +++ b/Online Gokkantoor/Gui/Default.aspx @@ -0,0 +1,14 @@ +<%@ Page Language="C#" Inherits="Gui.Default" %> + + + + Default + + +

lorem ipsum

+
+ + + + + diff --git a/Online Gokkantoor/Gui/Default.aspx.cs b/Online Gokkantoor/Gui/Default.aspx.cs new file mode 100644 index 0000000..c9fd933 --- /dev/null +++ b/Online Gokkantoor/Gui/Default.aspx.cs @@ -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"); + } + } +} diff --git a/Online Gokkantoor/Gui/Default.aspx.designer.cs b/Online Gokkantoor/Gui/Default.aspx.designer.cs new file mode 100644 index 0000000..d4f8172 --- /dev/null +++ b/Online Gokkantoor/Gui/Default.aspx.designer.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/Global.asax b/Online Gokkantoor/Gui/Global.asax new file mode 100644 index 0000000..3eb9337 --- /dev/null +++ b/Online Gokkantoor/Gui/Global.asax @@ -0,0 +1 @@ +<%@ Application Inherits="Gui.Global" %> diff --git a/Online Gokkantoor/Gui/Global.asax.cs b/Online Gokkantoor/Gui/Global.asax.cs new file mode 100644 index 0000000..f374e9c --- /dev/null +++ b/Online Gokkantoor/Gui/Global.asax.cs @@ -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; + } + + + } +} diff --git a/Online Gokkantoor/Gui/Gui.csproj b/Online Gokkantoor/Gui/Gui.csproj new file mode 100644 index 0000000..05f6a91 --- /dev/null +++ b/Online Gokkantoor/Gui/Gui.csproj @@ -0,0 +1,140 @@ + + + + Debug + AnyCPU + {62B345B0-420C-4926-9E6E-9B532AFD3713} + {349C5851-65DF-11DA-9384-00065B846F21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + Gui + Gui + v4.7 + + + true + full + false + bin + DEBUG; + prompt + 4 + + + true + bin + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + Global.asax + + + Default.aspx + + + Default.aspx + + + Login.aspx + + + Login.aspx + + + mainForm.aspx + + + mainForm.aspx + + + Admin.aspx + + + Admin.aspx + + + addUser.aspx + + + addUser.aspx + + + addBet.aspx + + + addBet.aspx + + + addMatch.aspx + + + addMatch.aspx + + + addPloeg.aspx + + + addPloeg.aspx + + + addBalance.aspx + + + addBalance.aspx + + + updateGame.aspx + + + updateGame.aspx + + + + + {82F1AF49-F9FA-42A1-BD3B-A37C36E340AD} + Logic + + + {3643BC50-8412-4C17-99E0-9D4BF7EDEB78} + Globals + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Online Gokkantoor/Gui/Login.aspx b/Online Gokkantoor/Gui/Login.aspx new file mode 100644 index 0000000..61b1fbe --- /dev/null +++ b/Online Gokkantoor/Gui/Login.aspx @@ -0,0 +1,14 @@ +<%@ Page Language="C#" Inherits="Gui.Login" %> + + + + Login + + +

HI

+
+ + + + + diff --git a/Online Gokkantoor/Gui/Login.aspx.cs b/Online Gokkantoor/Gui/Login.aspx.cs new file mode 100644 index 0000000..64d83aa --- /dev/null +++ b/Online Gokkantoor/Gui/Login.aspx.cs @@ -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"); + + } + } +} diff --git a/Online Gokkantoor/Gui/Login.aspx.designer.cs b/Online Gokkantoor/Gui/Login.aspx.designer.cs new file mode 100644 index 0000000..843c73e --- /dev/null +++ b/Online Gokkantoor/Gui/Login.aspx.designer.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/Web.config b/Online Gokkantoor/Gui/Web.config new file mode 100644 index 0000000..c6e846d --- /dev/null +++ b/Online Gokkantoor/Gui/Web.config @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Online Gokkantoor/Gui/addBalance.aspx b/Online Gokkantoor/Gui/addBalance.aspx new file mode 100644 index 0000000..8c6de12 --- /dev/null +++ b/Online Gokkantoor/Gui/addBalance.aspx @@ -0,0 +1,15 @@ +<%@ Page Language="C#" Inherits="Gui.addBalance" %> + + + + addBalance + + +
+ + + + + + + diff --git a/Online Gokkantoor/Gui/addBalance.aspx.cs b/Online Gokkantoor/Gui/addBalance.aspx.cs new file mode 100644 index 0000000..acbdf26 --- /dev/null +++ b/Online Gokkantoor/Gui/addBalance.aspx.cs @@ -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; + } + } + } +} diff --git a/Online Gokkantoor/Gui/addBalance.aspx.designer.cs b/Online Gokkantoor/Gui/addBalance.aspx.designer.cs new file mode 100644 index 0000000..fa79fc6 --- /dev/null +++ b/Online Gokkantoor/Gui/addBalance.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/addBet.aspx b/Online Gokkantoor/Gui/addBet.aspx new file mode 100644 index 0000000..d28137e --- /dev/null +++ b/Online Gokkantoor/Gui/addBet.aspx @@ -0,0 +1,21 @@ +<%@ Page Language="C#" Inherits="Gui.addBet" %> + + + + addBet + + +
+ +

Amount

+ +

on

+ +

BetType

+ + + + + + + diff --git a/Online Gokkantoor/Gui/addBet.aspx.cs b/Online Gokkantoor/Gui/addBet.aspx.cs new file mode 100644 index 0000000..d5282f0 --- /dev/null +++ b/Online Gokkantoor/Gui/addBet.aspx.cs @@ -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.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 boundList2 = (IList)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"); + } + } + + +} diff --git a/Online Gokkantoor/Gui/addBet.aspx.designer.cs b/Online Gokkantoor/Gui/addBet.aspx.designer.cs new file mode 100644 index 0000000..607232f --- /dev/null +++ b/Online Gokkantoor/Gui/addBet.aspx.designer.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/addMatch.aspx b/Online Gokkantoor/Gui/addMatch.aspx new file mode 100644 index 0000000..5966c9b --- /dev/null +++ b/Online Gokkantoor/Gui/addMatch.aspx @@ -0,0 +1,34 @@ +<%@ Page Language="C#" Inherits="Gui.addMatch" %> + + + + addMatch + + +
+

leave score blank for non scores

+

Ploeg1

+ +

score

+ +

Ploeg2

+ +

score

+ + +

dag

+ +

maand

+ + +

year

+ +

status:

+ + + + + + + + diff --git a/Online Gokkantoor/Gui/addMatch.aspx.cs b/Online Gokkantoor/Gui/addMatch.aspx.cs new file mode 100644 index 0000000..efcd426 --- /dev/null +++ b/Online Gokkantoor/Gui/addMatch.aspx.cs @@ -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(); + dag.DataBind(); + maand.DataSource= Enumerable.Range(1, 12).ToArray(); + maand.DataBind(); + jaar.DataSource = Enumerable.Range(2015, 10).ToArray(); + jaar.DataBind(); + ploeg1.DataSource = logic.ploegen; + ploeg1.DataBind(); + ploeg2.DataSource = logic.ploegen; + ploeg2.DataBind(); + } + } + + public void matchadd_Click(object sender, EventArgs e) + { + IList p1l = (IList)ploeg1.DataSource; + IList p2l = (IList)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"); + } + } +} diff --git a/Online Gokkantoor/Gui/addMatch.aspx.designer.cs b/Online Gokkantoor/Gui/addMatch.aspx.designer.cs new file mode 100644 index 0000000..f815f00 --- /dev/null +++ b/Online Gokkantoor/Gui/addMatch.aspx.designer.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/addPloeg.aspx b/Online Gokkantoor/Gui/addPloeg.aspx new file mode 100644 index 0000000..55a7547 --- /dev/null +++ b/Online Gokkantoor/Gui/addPloeg.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" Inherits="Gui.addPloeg" %> + + + + addPloeg + + +
+

naam

+ + + + + + + diff --git a/Online Gokkantoor/Gui/addPloeg.aspx.cs b/Online Gokkantoor/Gui/addPloeg.aspx.cs new file mode 100644 index 0000000..6429a3d --- /dev/null +++ b/Online Gokkantoor/Gui/addPloeg.aspx.cs @@ -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"); + } + } +} diff --git a/Online Gokkantoor/Gui/addPloeg.aspx.designer.cs b/Online Gokkantoor/Gui/addPloeg.aspx.designer.cs new file mode 100644 index 0000000..335190d --- /dev/null +++ b/Online Gokkantoor/Gui/addPloeg.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/addUser.aspx b/Online Gokkantoor/Gui/addUser.aspx new file mode 100644 index 0000000..62e497e --- /dev/null +++ b/Online Gokkantoor/Gui/addUser.aspx @@ -0,0 +1,25 @@ +<%@ Page Language="C#" Inherits="Gui.addUser" %> + + + + addUser + + +
+

Naam

+ +

Achternaam

+ +

addr

+ +

gsm

+ +

balans

+ + + +

+ + + + diff --git a/Online Gokkantoor/Gui/addUser.aspx.cs b/Online Gokkantoor/Gui/addUser.aspx.cs new file mode 100644 index 0000000..c91cf3a --- /dev/null +++ b/Online Gokkantoor/Gui/addUser.aspx.cs @@ -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"); + } + } +} diff --git a/Online Gokkantoor/Gui/addUser.aspx.designer.cs b/Online Gokkantoor/Gui/addUser.aspx.designer.cs new file mode 100644 index 0000000..63109cb --- /dev/null +++ b/Online Gokkantoor/Gui/addUser.aspx.designer.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/mainForm.aspx b/Online Gokkantoor/Gui/mainForm.aspx new file mode 100644 index 0000000..a19be66 --- /dev/null +++ b/Online Gokkantoor/Gui/mainForm.aspx @@ -0,0 +1,22 @@ +<%@ Page Language="C#" Inherits="Gui.mainForm" %> + + + + mainForm + + +
+ + + + + + + + +

your current bets:

+ + + + + diff --git a/Online Gokkantoor/Gui/mainForm.aspx.cs b/Online Gokkantoor/Gui/mainForm.aspx.cs new file mode 100644 index 0000000..9cfb981 --- /dev/null +++ b/Online Gokkantoor/Gui/mainForm.aspx.cs @@ -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) + { + + } + } +} diff --git a/Online Gokkantoor/Gui/mainForm.aspx.designer.cs b/Online Gokkantoor/Gui/mainForm.aspx.designer.cs new file mode 100644 index 0000000..9e8e765 --- /dev/null +++ b/Online Gokkantoor/Gui/mainForm.aspx.designer.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Gui/updateGame.aspx b/Online Gokkantoor/Gui/updateGame.aspx new file mode 100644 index 0000000..d5a938d --- /dev/null +++ b/Online Gokkantoor/Gui/updateGame.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" Inherits="Gui.updateGame" %> + + + + updateGame + + +
+ + + + + + + + + diff --git a/Online Gokkantoor/Gui/updateGame.aspx.cs b/Online Gokkantoor/Gui/updateGame.aspx.cs new file mode 100644 index 0000000..0598565 --- /dev/null +++ b/Online Gokkantoor/Gui/updateGame.aspx.cs @@ -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) + { + + } + } + } +} diff --git a/Online Gokkantoor/Gui/updateGame.aspx.designer.cs b/Online Gokkantoor/Gui/updateGame.aspx.designer.cs new file mode 100644 index 0000000..f6decc0 --- /dev/null +++ b/Online Gokkantoor/Gui/updateGame.aspx.designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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; + } +} diff --git a/Online Gokkantoor/Logic/Logic.csproj b/Online Gokkantoor/Logic/Logic.csproj new file mode 100644 index 0000000..c75f8a2 --- /dev/null +++ b/Online Gokkantoor/Logic/Logic.csproj @@ -0,0 +1,47 @@ + + + + Debug + AnyCPU + {82F1AF49-F9FA-42A1-BD3B-A37C36E340AD} + Library + Logic + Logic + v4.7 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + + + + + {46C1FC26-4A1F-43E4-8682-853010AB38AC} + Data + + + {3643BC50-8412-4C17-99E0-9D4BF7EDEB78} + Globals + + + + \ No newline at end of file diff --git a/Online Gokkantoor/Logic/LogicLayer.cs b/Online Gokkantoor/Logic/LogicLayer.cs new file mode 100644 index 0000000..51620a4 --- /dev/null +++ b/Online Gokkantoor/Logic/LogicLayer.cs @@ -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 p = new Person("beppe", "vanrolleghem", "123straat", "04877777", 5); + fixIds(); + this.persons.Add(p); + } + + public List persons { get ; set; } + public List bets { get; set; } + public List ploegen { get; set; } + public List 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; + } + } +} diff --git a/Online Gokkantoor/Logic/Properties/AssemblyInfo.cs b/Online Gokkantoor/Logic/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c9d1c18 --- /dev/null +++ b/Online Gokkantoor/Logic/Properties/AssemblyInfo.cs @@ -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("")] diff --git a/Online Gokkantoor/LogicLayer/General.cs b/Online Gokkantoor/LogicLayer/General.cs index 5629855..2861484 100644 --- a/Online Gokkantoor/LogicLayer/General.cs +++ b/Online Gokkantoor/LogicLayer/General.cs @@ -113,37 +113,14 @@ namespace LogicLayer keuzes.Add(new Keuze(128, 1, 0.15, Gokken.Thuisploeg)); } - public List GetGebruikers() + public List GetGebruikers() { - List lijst = new List(); - 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 GetWedstrijden() + public List GetWedstrijden() { - List temp = new List(); - if (personen != null) - { - foreach (Wedstrijden w in wedstrijden) - { - temp.Add( w.thuisPloeg + " - " + w.uitPloeg); - } - } - else - { - temp.Add("None"); - } - return temp; + return wedstrijden; } public List GetGeldVerdubbeling(int ID) diff --git a/Online Gokkantoor/LogicLayer/LogicLayer.csproj b/Online Gokkantoor/LogicLayer/LogicLayer.csproj index 438465b..4c17009 100644 --- a/Online Gokkantoor/LogicLayer/LogicLayer.csproj +++ b/Online Gokkantoor/LogicLayer/LogicLayer.csproj @@ -1,5 +1,5 @@  - + Debug diff --git a/Online Gokkantoor/LogicLayer/Persoon.cs b/Online Gokkantoor/LogicLayer/Persoon.cs index a757b93..e7fd61a 100644 --- a/Online Gokkantoor/LogicLayer/Persoon.cs +++ b/Online Gokkantoor/LogicLayer/Persoon.cs @@ -34,6 +34,11 @@ namespace LogicLayer throw new Exception("Foutieve ingave: " + ex); } } + + public override string ToString() + { + return base.ToString(); + } } } diff --git a/Online Gokkantoor/Online Gokkantoor.sln b/Online Gokkantoor/Online Gokkantoor.sln index 9fd7b19..dd463a7 100644 --- a/Online Gokkantoor/Online Gokkantoor.sln +++ b/Online Gokkantoor/Online Gokkantoor.sln @@ -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 diff --git a/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj b/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj index 1736184..6c49b8b 100644 --- a/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj +++ b/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj @@ -1,5 +1,5 @@  - + Debug diff --git a/Online Gokkantoor/test/Properties/launchSettings.json b/Online Gokkantoor/test/Properties/launchSettings.json new file mode 100644 index 0000000..6b84b3b --- /dev/null +++ b/Online Gokkantoor/test/Properties/launchSettings.json @@ -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" + } + } +} \ No newline at end of file