Beispiel #1
0
        private void loadAbnormalCompanyList(string contents)
        {
            JsonObject jContents   = JsonObject.Parse(contents);
            JsonArray  jaCompanies = jContents.GetNamedArray("result");

            ObservableCollection <AbnormalCompanyListItem> tempListItems = new ObservableCollection <AbnormalCompanyListItem>();
            string id, regNo, name, abnDate;

            for (int i = 0; i < jaCompanies.Count; i++)
            {
                JsonObject jo = jaCompanies[i].GetObject();
                id      = jo.GetNamedString("ID");
                regNo   = jo.GetNamedString("REGNO");
                name    = jo.GetNamedString("ENTNAME");
                abnDate = jo.GetNamedString("ABNDATE");

                AbnormalCompanyListItem acli = new AbnormalCompanyListItem(id, regNo, name, abnDate);
                tempListItems.Add(acli);
            }

            //sortAbnormalCompanyList();
            foreach (var item in new ObservableCollection <AbnormalCompanyListItem>(tempListItems.OrderByDescending(item => item.Date)))
            {
                abnormalCompanyListItems.Add(item);
            }
        }
Beispiel #2
0
        private void abnormalCompanyItemGrid_RightTapped(object sender, RightTappedRoutedEventArgs e)
        {
            AbnormalCompanyListItem acli = (sender as Grid).DataContext as AbnormalCompanyListItem;

            scciForClipboard = new SearchedCompanyClipboardItem(acli.RegNo, acli.Name, acli.Date, "", "");

            menuFlyout.ShowAt(abnormalCompanyList, e.GetPosition(abnormalCompanyList));
        }