public static UserTicketModel[] GetUserTickets(TicketModel ticket) { //query = $"SELECT Users.userid FROM Users WITH (NOLOCK)" + // $"JOIN UserTickets WITH (NOLOCK) on UserTickets.userid = Users.UserID" + // $" WHERE UserTickets.TicketID = {ticket.TicketID} AND (Users.MarkDeleted = 0)"; int[] contactIDs = IDReader.Read(TicketChild.Contacts, ticket); UserTicketModel[] contacts = new UserTicketModel[contactIDs.Length]; for (int i = 0; i < contactIDs.Length; ++i) { contacts[i] = new UserTicketModel(ticket, new UserModel(ticket.Connection, contactIDs[i]), false); } return(contacts); }
public UserTicketModel[] UserTickets() { return(UserTicketModel.GetUserTickets(this)); }