implemented find method
This commit is contained in:
parent
68634123f9
commit
6823d35f81
@ -10,15 +10,20 @@ namespace OOP_Opdracht_CSharp_Alfa_2022.classes
|
|||||||
// Define class members
|
// Define class members
|
||||||
|
|
||||||
private SqlConnection connection;
|
private SqlConnection connection;
|
||||||
private Dictionary<int, String> table_data;
|
private Dictionary<int, string> table_data;
|
||||||
private KeyValuePair<int, String> record;
|
private KeyValuePair<int, string> record;
|
||||||
|
|
||||||
// Define methods
|
// Define methods
|
||||||
|
|
||||||
public KeyValuePair<int, String> find()
|
public KeyValuePair<int, string> find(int id = 1)
|
||||||
{
|
{
|
||||||
|
KeyValuePair<int, string> record = new KeyValuePair<int, string>(0, null);
|
||||||
return new KeyValuePair<int, string>();
|
if (table_data.ContainsKey(id))
|
||||||
|
{
|
||||||
|
record = new KeyValuePair<int, string>(id, table_data.GetValueOrDefault(id));
|
||||||
|
}
|
||||||
|
this.record = record;
|
||||||
|
return record;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Game()
|
public Game()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user