Exemplo n.º 1
0
    public void DeleteImgComment(int ImgCommentID)
    {
        SQLConnectionClass oConnection = new SQLConnectionClass();
        SQLCommandClass    oCommand    = new SQLCommandClass();

        //      string sqlIns = "INSERT INTO table (name, information, other) VALUES (@name, @information, @other)";

        string queryString = "DELETE FROM ImageComment WHERE ImgCommentID=@ImgCommentID";

        oCommand.PrepareDeleteQuery(queryString, oConnection.connection);
        oCommand.AddDeleteParam("@ImgCommentID", ImgCommentID);

        oCommand.ExecuteDeleteQuery();

        //Command.ExecuteNonQuery();

        /* To Future:
         * Delete smiles, stickers, images
         */

        oConnection.closeConnection();
    }
Exemplo n.º 2
0
    /// <summary>
    /// Deletes value with ID from table
    /// </summary>
    /// <param name="IDColumnName"></param>
    /// <param name="ID"></param>
    /// <param name="TableName"></param>
    public void DeleteValueFromTable(string IDColumnName, int ID, string TableName)
    {
        SQLConnectionClass oConnection = new SQLConnectionClass();
        SQLCommandClass    oCommand    = new SQLCommandClass();

        //      string sqlIns = "INSERT INTO table (name, information, other) VALUES (@name, @information, @other)";

        string queryString = "DELETE FROM " + TableName + "WHERE " + IDColumnName + "=@ID";

        oCommand.PrepareDeleteQuery(queryString, oConnection.connection);
        oCommand.AddDeleteParam("@ID", ID);

        oCommand.ExecuteDeleteQuery();

        //Command.ExecuteNonQuery();

        /* To Future:
         * Delete smiles, stickers, images
         */

        oConnection.closeConnection();
    }
Exemplo n.º 3
0
    public void DeleteLike(string GroupName /*Images or other*/, int groupID /*ImageID or other*/, int PeopleID)
    {
        SQLConnectionClass oConnection = new SQLConnectionClass();
        SQLCommandClass    oCommand    = new SQLCommandClass();

        //      string sqlIns = "INSERT INTO table (name, information, other) VALUES (@name, @information, @other)";

        string queryString = "DELETE FROM Like WHERE  (GroupTableName=@GroupName) and (GroupID=@GroupID) and (PeopleID=@PeopleID)";

        oCommand.PrepareDeleteQuery(queryString, oConnection.connection);
        oCommand.AddDeleteParam("@GroupName", GroupName);
        oCommand.AddDeleteParam("@GroupID", groupID);
        oCommand.AddDeleteParam("@PeopleID", PeopleID);

        oCommand.ExecuteDeleteQuery();

        //Command.ExecuteNonQuery();

        /* To Future:
         * Delete smiles, stickers, images
         */

        oConnection.closeConnection();
    }