public static Int32 GetCurrentVersion(Char versionType, String connection) { MySqlParameter[] param = null; param[0] = new MySqlParameter("_versionDesc", versionType); DbAccessLayer.MySqlDbAccess db = new MySqlDbAccess(connection, ConnectionStringSourceType.MySetting); Int32 version = (Int32)db.GetScalarFromProcedure("stpDad_updateSelCurrentVersion", param); if (db.HasError) { throw db.ErrorException; } return(version); }
public static bool IsNewVersionAccesible(UpdateType versionType, int curversion, String connection) { MySqlParameter[] param = new MySqlParameter[2]; param[0] = new MySqlParameter("_updVersion", curversion); param[1] = new MySqlParameter("_updDescription", versionType.ToString()); DbAccessLayer.MySqlDbAccess db = new MySqlDbAccess(connection, ConnectionStringSourceType.MySetting); long version = (long)db.GetScalarFromProcedure("stpDad_updateUtiIsExistNewVer", param); if (db.HasError) { throw db.ErrorException; } if (version > 0) { return(true); } return(false); }