protected void btnSaveNewTicket_Click(object sender, EventArgs e)
    {
        int iMemberID;
        if (!int.TryParse(txtGetMemberByID.Text, out iMemberID))
        {
            litResults.Text = "Invalid Member ID";
            return;
        }

        PASTicket oTicket = new PASTicket(iMemberID);
        XmlDocument xml = oTicket.SaveNew("TEST TICKET ONLY PLEASE IGNORE  " + txtNewTicketSubjectTag.Text, "This is a test ticket only. Please ignore.");

        if (xml != null)
            litResults.Text = HttpUtility.HtmlEncode(xml.OuterXml);
        else
            litResults.Text = "error saving new ticket";
    }
Exemplo n.º 2
0
        /// <summary>
        /// Note that this method can cause multiple requests to the PAS server. Use the
        /// alternate method GetMemberTicketsXML if you don't need PASTicket objects.
        /// </summary>
        public List<PASTicket> GetMemberTickets()
        {
            XmlDocument xml = _oConn.SendRequest("/publisher_members/" + _iMemberID + "/tickets.xml", "GET", null, null);

            List<PASTicket> lst = new List<PASTicket>();
            foreach (XmlNode xn in xml.SelectNodes("//ticket"))
            {
                PASTicket oT = new PASTicket(_iMemberID.Value, xn["id"].InnerText);
                lst.Add(oT);
            }

            return lst;
        }