mirror of
https://github.com/bvanroll/cs-oo-project.git
synced 2025-08-29 20:12:40 +00:00
euh
This commit is contained in:
@@ -12,6 +12,8 @@ namespace Gui
|
||||
public partial class addMatch : System.Web.UI.Page
|
||||
{
|
||||
LogicLayer logic;
|
||||
static List<Ploeg> p;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -19,24 +21,25 @@ namespace Gui
|
||||
{
|
||||
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;
|
||||
p = logic.ploegen;
|
||||
ploeg1.DataSource = p;
|
||||
ploeg2.DataSource = p;
|
||||
ploeg1.DataBind();
|
||||
ploeg2.DataSource = logic.ploegen;
|
||||
ploeg2.DataBind();
|
||||
jaar.DataBind();
|
||||
maand.DataBind();
|
||||
dag.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];
|
||||
|
||||
logic = (LogicLayer)System.Web.HttpContext.Current.Application["logic"];
|
||||
Ploeg home = logic.getPloegByString(ploeg1.SelectedValue);
|
||||
Ploeg away = logic.getPloegByString(ploeg2.SelectedValue);
|
||||
int d, m, y = 0;
|
||||
if (home == away)
|
||||
{
|
||||
@@ -62,9 +65,6 @@ namespace Gui
|
||||
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);
|
||||
|
Reference in New Issue
Block a user