protected void VersaoCarregar(int modelId) { try { ddlVersion.Items.Clear(); ddlVersion.Items.Add(new ListItem("-----", "-1")); ddlVersion.DataSource = VersionBLL.GetVersion(modelId); ddlVersion.DataBind(); } catch (Exception ex) { lblErro.Text = "Erro ao carregar lista de Versões. " + ex.ToString(); } }
public static bool AppIsValidVersion() { Version dbVersion = null; Version appVersion = null; try { dbVersion = VersionBLL.GetDataBaseVersion(); appVersion = VersionUtilities.GetAppVersion(); } catch (Exception ex) { } if (dbVersion == null || appVersion == null) { throw new Exception("El sistema no está correctamente configurado"); } return(dbVersion.VersionMayor == appVersion.VersionMayor && dbVersion.VersionMenor == appVersion.VersionMenor); }
/// <summary> /// Get the database minor version number. This method propagates exceptions. /// </summary> /// <returns>Database minor version number</returns> public static int getDatabaseMinorVersionNumber() { VersionBLL x = new VersionBLL(); return(x.getDatabaseMinorVersion()); }
/// <summary> /// Get the database release version number. This method propagates exceptions. /// </summary> /// <returns>Database release number</returns> public static int getDatabaseReleaseNumber() { VersionBLL x = new VersionBLL(); return(x.getDatabaseReleaseVersion()); }
/// <summary> /// Get a version number component from the ASP.NET configuration file /// </summary> /// <param name="type">The configuration name</param> /// <returns>The version number component</returns> /// <exception cref="ConfigurationErrorsException">If the version component cannot be found</exception> private static int getVersionNumber(string type) { VersionBLL x = new VersionBLL(); return(x.getApplicationVersionComponent(type)); }