Exemplo n.º 1
0
        /// <summary>
        /// Get list of Groups
        /// </summary>
        /// <returns></returns>
        public static DataTable LoadGroupOptions()
        {
            SQLDatabaseReporting sql = new SQLDatabaseReporting();
            DataTable            dt  = sql.QueryDataTable("SELECT * FROM [tblCOM_Groups] WHERE ClientID = @ClientId", new SqlParameter("@ClientId", Config.clientId));

            if (!sql.HasError)
            {
                return(dt);
            }
            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Checks the email is already in use
        /// </summary>
        /// <param name="password"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public static bool IsExistingEmail(string email, out string message)
        {
            SQLDatabaseReporting sql     = new SQLDatabaseReporting();
            DataTable            dtEmail = sql.QueryDataTable("SELECT UserID FROM [tblCOM_Users] WHERE Email = @Email",
                                                              new SQLParamList().Add("@Email", email));

            if (sql.HasError)
            {
                message = UserResource.Error_DBEmailValidationError;
                return(false);
            }
            else if (dtEmail.Rows.Count > 0)
            {
                message = UserResource.Error_EmailInUse;

                return(false);
            }
            else
            {
                message = UserResource.Success_Email;
                return(true);
            }
        }