protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            try
            {
                MainPage.title.Value = "TICKET";
                t = e.Parameter as Ticket;
                grdTicket.DataContext = t;
                if (t.IsMentor)
                {
                    btnDelete.Visibility = Visibility.Collapsed;
                    btnReissue.Visibility = Visibility.Collapsed;
                    if (t.Status == "Accepted")
                        btnAcceptTicket.Visibility = Visibility.Collapsed;
                }
                else
                {
                    btnAcceptTicket.Visibility = Visibility.Collapsed;
                }
                if (t.Status == "Expired")
                {
                    btnDelete.Visibility = Visibility.Collapsed;
                }
                else if(t.Status=="Open")
                {
                    btnReissue.Visibility = Visibility.Collapsed;
                }

            }
            catch (Exception ex)
            {
                DebuggingHelper.ShowError("Error in HelpDesk, OnNavigatedTo: " + ex.Message);
            }
        }
        public async Task<List<Ticket>> parseTickets(ParseQuery<ParseObject> query)
        {
            List<Ticket> tickets = new List<Ticket>();
            Ticket t;
            foreach (ParseObject obj in await query.FindAsync())
            {
                t = new Ticket();
                t.Created = obj.CreatedAt.Value.ToLocalTime();
                string val;
                obj.TryGetValue<string>("subject", out val);
                t.Title = val;
                obj.TryGetValue<string>("location", out val);
                t.Location = val;
                obj.TryGetValue<string>("description", out val);
                t.Description = val;
                obj.TryGetValue<string>("status", out val);
                t.Status = val;
                obj.TryGetValue<string>("subCategory", out val);
                t.SubCategory = val;
                tickets.Add(t);
                t.ObjectId = obj.ObjectId;
            }

            
            return tickets;
        }