This commit is contained in:
BlubbFish 2013-07-14 21:25:12 +00:00
parent e76ec822db
commit 3603c9460e
2 changed files with 14 additions and 3 deletions

View File

@ -10,6 +10,10 @@ namespace Matomat.Input
{ {
public string getCodeID(string text) public string getCodeID(string text)
{ {
if (Console.KeyAvailable)
{
ConsoleKeyInfo k = Console.ReadKey(true);
}
Factory.getLCD().print(text); Factory.getLCD().print(text);
string str = ""; string str = "";
while (true) while (true)

View File

@ -60,11 +60,18 @@ namespace Matomat.Model
object[] row = Factory.getDBO().getResult(); object[] row = Factory.getDBO().getResult();
if (row == null) if (row == null)
{ {
Console.WriteLine(Factory.getDBO().getError()); //Console.WriteLine(Factory.getDBO().getError());
return 0.0; return 0;
} }
try
{
return (double.Parse(row[0].ToString())) / 100; return (double.Parse(row[0].ToString())) / 100;
} }
catch (Exception)
{
return 0;
}
}
public bool GetAdmin() public bool GetAdmin()
{ {