private void PleaseWaitOnUpdateTickets()
        {
            ErrorLabel = string.Empty;
            if (GridHeight > 0 && RowHeight > 0)
            {
                Pagesize = (int)(GridHeight / RowHeight);
            }
            else
            {
                Pagesize = 100;
            }


            UserTicket[] tickets   = new UserTicket[0];
            long         total     = 1;
            string       tempTotal = "1";

            try
            {
                tickets = WsdlRepository.GetUserTickets(ChangeTracker.CurrentUser.AccountId.ToString(), (ticketCategory)SelectedType, new AccountTicketSorting()
                {
                    field = AccountTicketSortingFields.DateCreated, value = AccountTicketSortingValues.Desc
                }, (int)((TicketsStartPage - 1) * Pagesize), (int)Pagesize, out tempTotal);
            }
            catch (System.ServiceModel.FaultException <HubServiceException> exception)
            {
                if (exception.Detail.code == 131)
                {
                    tickets    = new UserTicket[0];
                    ErrorLabel = TranslationProvider.Translate(MultistringTags.TERMINAL_NO_TICKET_FOUND).ToString();
                }
                else
                {
                    ShowError(exception.Detail.message);
                }
            }
            total = Convert.ToInt64(tempTotal);
            if (tickets != null)
            {
                ShowTickets(tickets);
            }

            double pagesCount = total / (double)Pagesize;

            if (pagesCount < 1)
            {
                pagesCount = 1;
            }
            if (pagesCount % 1 > 0)
            {
                pagesCount++;
            }
            AllPages = (int)pagesCount;
        }