コード例 #1
0
    protected void btnSaveLinkedShows_Click(object sender, EventArgs e)
    {
        MembershipUser userInfo = Membership.GetUser();
        Guid user_ID = (Guid)userInfo.ProviderUserKey;
        Guid parent_Show_ID = new Guid(Parent_Show_ID);
        Guid child_Show_ID = new Guid(Child_Show_ID);
        Guid? linked_Show_ID;
        LinkedShows linkedShow = new LinkedShows();
        linkedShow.Parent_Show_ID = parent_Show_ID;
        linkedShow.Child_Show_ID = child_Show_ID;
        linked_Show_ID = linkedShow.Insert_Linked_Shows(user_ID);

        if (linked_Show_ID != null)
        {
            Linked_Show_ID = linked_Show_ID.ToString();
            Common.Linked_Show_ID = Linked_Show_ID;
            divSaveLinkedShows.Visible = false;
            MessageLabel.Text = "Shows linked successfully.";
        }
        else
            MessageLabel.Text = "Show linking failed!";
    }