Commit 7c6ce7a4 authored by Alexander Scharfenberg's avatar Alexander Scharfenberg
Browse files

working again!!

parent 0a08ad3f
......@@ -19,7 +19,7 @@ namespace Raumverwaltung_HMWK
bool found = false;
for (int i = 0; i < locations.Count; i++)
{
if (LocationInput.Text.Equals(locations[i].Name))
if (LocationInput.Text.Equals(locations[i].BName))
{
found = true;
}
......
......@@ -5,7 +5,7 @@ namespace Raumverwaltung_HMWK
public class Building
{
private int bId;
private string name;
private string bname;
private List<Floor> floors = new List<Floor>();
......@@ -16,17 +16,17 @@ namespace Raumverwaltung_HMWK
public Building(string name)
{
this.name = name;
this.bname = name;
}
public int BId
{
get { return bId; }
set { bId = value; }
}
public string Name
public string BName
{
get { return name; }
set { name = value; }
get { return bname; }
set { bname = value; }
}
public List<Floor> Floors
{
......@@ -36,7 +36,7 @@ namespace Raumverwaltung_HMWK
public override string ToString()
{
return name;
return bname;
}
}
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ namespace Raumverwaltung_HMWK
{
for (int i = 0; i < buildings.Count; i++)
{
Standortauswahl.Items.Add(buildings[i].Name);
Standortauswahl.Items.Add(buildings[i].BName);
}
}
......@@ -31,7 +31,7 @@ namespace Raumverwaltung_HMWK
{
for (int i = 0; i < buildings.Count; i++)
{
if (buildings[i].Name.Equals(name))
if (buildings[i].BName.Equals(name))
{
List<Floor> floors = buildings[i].Floors;
for (int j = 0; j < floors.Count; j++)
......
......@@ -26,7 +26,7 @@ namespace Raumverwaltung_HMWK
var flooroutput = cnn.Query<Floor>("select Id, Name, BuildingId from Floor", new DynamicParameters());
var buildingoutput = cnn.Query<Building>("select BId, Name from Building", new DynamicParameters());
var buildingoutput = cnn.Query<Building>("select BId, BName from Building", new DynamicParameters());
List<Room> rooms = roomoutput.ToList();
List<Floor> floors = flooroutput.ToList();
......@@ -290,7 +290,7 @@ namespace Raumverwaltung_HMWK
{
using (IDbConnection cnn = new SQLiteConnection(new SQLiteConnection(LoadConnectionString())))
{
string sql = "Select BId, Name from Building";
string sql = "Select BId, BName from Building";
var output = cnn.Query<Building>(sql);
return output.ToList();
......@@ -301,7 +301,7 @@ namespace Raumverwaltung_HMWK
{
using (IDbConnection cnn = new SQLiteConnection(new SQLiteConnection(LoadConnectionString())))
{
string sql = "Insert into Building (Name) values (@Name)";
string sql = "Insert into Building (BName) values (@Name)";
var dynamicParameters = new DynamicParameters();
dynamicParameters.Add("Name", name);
cnn.Execute(sql, dynamicParameters);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment