Пример #1
0
        public static string GetZapierTickets(RestCommand command, int limitNumber)
        {
            string xml = "";

            TicketsView   tickets = new TicketsView(command.LoginUser);
            XmlTextWriter writer  = Tickets.BeginXmlWrite("Tickets");

            tickets.LoadByOrganizationIDOrderByNumberDESC(command.Organization.OrganizationID, limitNumber);
            foreach (DataRow row in tickets.Table.Rows)
            {
                tickets.WriteXml(writer, row, "Ticket", true, command.Filters);
            }

            xml = Tickets.EndXmlWrite(writer);

            //return tickets.GetXml("Tickets", "Ticket", command.Filters["TicketTypeID"] != null, command.Filters);
            return(xml);
        }