public UserInfo FetchUserInfo(string userID) { UserInfo userInfo = null; MySQLSuperManager dbm = GetLockedConnection(); try { userInfo = dbm.Manager.fetchUserInfo(userID); return(userInfo); } #pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet catch (MySql.Data.MySqlClient.MySqlException e) { #pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet dbm.Manager.Reconnect(); userInfo = dbm.Manager.fetchUserInfo(userID); return(userInfo); } catch (Exception e) { m_log.Error(e.ToString()); return(null); } finally { dbm.Release(); } }
public bool setTotalSale(TransactionData transaction) { if (transaction.Receiver == transaction.Sender) { return(false); } if (transaction.Sender == UUID.Zero.ToString()) { return(false); } MySQLSuperManager dbm = GetLockedConnection(); int time = (int)((DateTime.UtcNow.Ticks - TicksToEpoch) / 10000000); try { return(dbm.Manager.setTotalSale(transaction.Receiver, transaction.ObjectUUID, transaction.Type, 1, transaction.Amount, time)); } #pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet catch (MySql.Data.MySqlClient.MySqlException e) { #pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet dbm.Manager.Reconnect(); return(dbm.Manager.setTotalSale(transaction.Receiver, transaction.ObjectUUID, transaction.Type, 1, transaction.Amount, time)); } catch (Exception e) { m_log.Error(e.ToString()); return(false); } finally { dbm.Release(); } }