示例#1
0
        private void loadNoticeList(string contents)
        {
            JsonObject jContents    = JsonObject.Parse(contents);
            JsonArray  jaNoticeList = jContents.GetNamedArray("result");

            ObservableCollection <NoticeListItem> tempListItems = new ObservableCollection <NoticeListItem>();
            string id, noticeName, noticeDate, companyName, companyId, companyNo;

            for (int i = 0; i < jaNoticeList.Count; i++)
            {
                JsonObject jo = jaNoticeList[i].GetObject();
                id          = jo.GetNamedString("ID");
                noticeName  = jo.GetNamedString("CNAME");
                noticeDate  = jo.GetNamedString("CDATE");
                companyName = jo.GetNamedString("CORP_NAME");
                companyId   = jo.GetNamedValue("CORP_ID").ToString();
                companyNo   = jo.GetNamedString("REG_NO");

                NoticeListItem acli = new NoticeListItem(id, noticeName, noticeDate, companyName, companyId, companyNo);
                tempListItems.Add(acli);
            }

            //sortAbnormalCompanyList();
            foreach (var item in new ObservableCollection <NoticeListItem>(tempListItems.OrderByDescending(item => item.NoticeDate)))
            {
                noticeListItems.Add(item);
            }
        }
示例#2
0
        private void noticeItemGrid_RightTapped(object sender, RightTappedRoutedEventArgs e)
        {
            NoticeListItem nli = (sender as Grid).DataContext as NoticeListItem;

            scciForClipboard = new SearchedCompanyClipboardItem(nli.CompanyName, nli.NoticeName, nli.NoticeDate, "", "");

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