public DHOGDataBaseViewModel() { dhogDataBase = new DHOGDataBase(); InitialDate = null; scenario = 1; Demo = "Licencia en DEMO"; }
public static void GetDBInformation(DHOGDataBase dhogCase) { try { string query = string.Format("SELECT Descripcion, VersionDHOG " + "FROM {0} WHERE Id = 1", table); using (OleDbCommand command = new OleDbCommand(query, DataBaseManager.DbConnection)) { DataBaseManager.DbConnection.Open(); try { OleDbDataReader reader = command.ExecuteReader(); if (reader.Read()) { dhogCase.Description = reader.GetString(0); dhogCase.Version = Convert.ToDouble(reader.GetValue(1)); } } catch (Exception Ex) { dhogCase.Version = 0; DataBaseManager.DbConnection.Close(); } DataBaseManager.DbConnection.Close(); } } catch (Exception Ex) { DataBaseManager.DbConnection.Close(); throw; } }