Example #1
0
        /// <summary>
        /// Gets the DB users.
        /// </summary>
        /// <returns></returns>
        public IAzManDBUser[] GetDBUsers()
        {
            var dtDBUsers = this.db.GetDBUsersEx(this.name, null, null, null);

            IAzManDBUser[] result = new IAzManDBUser[dtDBUsers.Rows.Count];
            int            i      = 0;

            foreach (DataRow row in dtDBUsers.Rows)
            {
                result[i++] = new SqlAzManDBUser(row);
            }
            return(result);
        }
Example #2
0
        /// <summary>
        /// Finds the DB user.
        /// </summary>
        /// <param name="userName">The custom sid.</param>
        /// <returns></returns>
        public IAzManDBUser GetDBUser(string userName)
        {
            var          dtDBUsers = this.db.GetDBUsersEx(this.name, null, null, userName);
            IAzManDBUser result;

            if (dtDBUsers.Rows.Count == 0)
            {
                throw SqlAzManException.DBUserNotFoundException(userName, null);
            }
            else
            {
                result = new SqlAzManDBUser(dtDBUsers.Rows[0]);
            }
            return(result);
        }
Example #3
0
        /// <summary>
        /// Finds the DB user.
        /// </summary>
        /// <param name="customSid">The custom sid.</param>
        /// <returns></returns>
        public IAzManDBUser GetDBUser(IAzManSid customSid)
        {
            var          dtDBUsers = this.db.GetDBUsersEx(this.name, null, customSid.BinaryValue, null);
            IAzManDBUser result;

            if (dtDBUsers.Rows.Count == 0)
            {
                throw SqlAzManException.DBUserNotFoundException(customSid.StringValue, null);
            }
            else
            {
                result = new SqlAzManDBUser(dtDBUsers.Rows[0]);
            }
            return(result);
        }
 /// <summary>
 /// Gets the DB users.
 /// </summary>
 /// <returns></returns>
 public IAzManDBUser[] GetDBUsers()
 {
     var dtDBUsers = this.db.GetDBUsersEx(this.store.Name, this.name, null, null);
     IAzManDBUser[] result = new IAzManDBUser[dtDBUsers.Rows.Count];
     int i = 0;
     foreach (DataRow row in dtDBUsers.Rows)
     {
         result[i++] = new SqlAzManDBUser(row);
     }
     return result;
 }
 /// <summary>
 /// Finds the DB user.
 /// </summary>
 /// <param name="userName">The custom sid.</param>
 /// <returns></returns>
 public IAzManDBUser GetDBUser(string userName)
 {
     var dtDBUsers = this.db.GetDBUsersEx(this.store.Name, this.name, null, userName);
     IAzManDBUser result;
     if (dtDBUsers.Rows.Count == 0)
     {
         throw SqlAzManException.DBUserNotFoundException(userName, null);
     }
     else
     {
         result = new SqlAzManDBUser(dtDBUsers.Rows[0]);
     }
     return result;
 }
 /// <summary>
 /// Finds the DB user.
 /// </summary>
 /// <param name="customSid">The custom sid.</param>
 /// <returns></returns>
 public IAzManDBUser GetDBUser(IAzManSid customSid)
 {
     var dtDBUsers = this.db.GetDBUsers(this.store.Name, this.name, customSid.BinaryValue, null);
     IAzManDBUser result;
     if (dtDBUsers.Count() == 0)
     {
         throw SqlAzManException.DBUserNotFoundException(customSid.StringValue, null);
     }
     else
     {
         result = new SqlAzManDBUser(new SqlAzManSID(dtDBUsers.First().DBUserSid.ToArray(), true), dtDBUsers.First().DBUserName);
     }
     return result;
 }
 /// <summary>
 /// Gets the DB users.
 /// </summary>
 /// <returns></returns>
 public IAzManDBUser[] GetDBUsers()
 {
     var dtDBUsers = this.db.GetDBUsersEx(null, null, null, null);
     IAzManDBUser[] result = new IAzManDBUser[dtDBUsers.Rows.Count];
     for (int i = 0; i < dtDBUsers.Rows.Count; i++)
     {
         result[i] = new SqlAzManDBUser(dtDBUsers.Rows[i]);
     }
     return result;
 }