Пример #1
0
        public ServerPointAccountsHelper GetServerPointAccounts(string user)
        {
            ServerPointAccountsHelper account = null;

            try
            {
                using (var reader = _Connection.QueryReader("SELECT * FROM serverpointaccounts WHERE name = @0", user))
                {
                    if (reader.Read())
                    {
                        account = new ServerPointAccountsHelper()
                        {
                            ID     = reader.Get <int>("ID"),
                            Name   = reader.Get <string>("name"),
                            Amount = reader.Get <int>("amount")
                        };
                    }
                }
            }
            catch (Exception ex)
            {
                ExtendedLog.Current.Log(ex.ToString());
            }

            return(account);
        }
Пример #2
0
        public ServerPointAccountsHelper GetServerPointAccounts(string user)
        {
            ServerPointAccountsHelper account = null;

            try
            {
                using (var reader = _Connection.QueryReader("SELECT * FROM serverpointaccounts WHERE name = @0", user))
                {
                    if (reader.Read())
                    {
                        account = new ServerPointAccountsHelper()
                        {
                            ID = reader.Get<int>("ID"),
                            Name = reader.Get<string>("name"),
                            Amount = reader.Get<int>("amount")
                        };
                    }
                }
            }
            catch (Exception ex)
            {
                ExtendedLog.Current.Log(ex.ToString());
            }

            return account;
        }