Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason Burton 13 posts 33 karma points
    Jun 06, 2011 @ 23:35
    Jason Burton
    0

    Multiple Actions

    Having issues with trying to find information on making multiple Context Menus with "delete" and "create". Right now I've created a Tasks class; that implements the ITaskReturnUrl;


    public bool Delete()
    {

    umbraco.BusinessLogic.Application.SqlHelper.ExecuteNonQuery("delete from [Persons] WHERE PersonID = @id", umbraco.BusinessLogic.Application.SqlHelper.CreateParameter("@id", ParentID));

    return true;
    }

    public bool Save()
    {

    //executed during create...
    int IdReturned = umbraco.BusinessLogic.Application.SqlHelper.ExecuteScalar<int>
    ("INSERT INTO [Persons] ([PersonName] ,[PersonID]) VALUES (@title, 1) Select @@Identity", umbraco.BusinessLogic.Application.SqlHelper.CreateParameter("@title", Alias));

    _returnUrl = "plugins/edit.aspx?id=" + IdReturned;
    return true;
    }

    How can I call one for multiple tree roots ?

    ie. Events Create/Delete, Locations Create/Delete

Please Sign in or register to post replies

Write your reply to:

Draft