Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        /// <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());
        }
Beispiel #4
0
        /// <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());
        }
Beispiel #5
0
        /// <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));
        }