Пример #1
0
        private async void UpdateTable1()
        {
            btnSearch.Enabled = false;
            var p = new Dictionary <string, object>();

            p["start-time"] = startDate.Value.TruncToStart();
            p["end-time"]   = endDate.Value.TruncToEnd();
            p["key"]        = tbKey.Text.Trim();

            var r = await PrjBorOrgs.GetOrgs(p);

            if (r.IsOk)
            {
                this.myGridViewBinding1.BindTo(r);
            }
            else
            {
                Commons.ShowResultErrorBox(this, r);
            }
            btnSearch.Enabled = true;
        }
Пример #2
0
        private async void UpdateData()
        {
            btnSearch.Enabled = false;
            listView1.Items.Clear();
            var p = new Dictionary <string, object>();

            p["key"] = tbKey.Text.Trim();
            var r = await PrjBorOrgs.GetOrgs(p);

            if (r.IsOk)
            {
                var dl = JArray.Parse(r.AsString).ToList();
                foreach (var d in dl)
                {
                    var lvi = new ListViewItem();
                    lvi.Text = d["bpmoId"].ToStdString();
                    if (SelMgrId.ToString() == lvi.Text)
                    {
                        lvi.Checked = true;
                    }
                    lvi.SubItems.Add(d["orgName"].ToStdString());
                    lvi.SubItems.Add(d["legalPersonName"].ToStdString());
                    lvi.SubItems.Add(d["address"].ToStdString());
                    lvi.SubItems.Add(d["registeredShowFund"].ToStdString());
                    listView1.Items.Add(lvi);
                }
                m_maxRow = listView1.Items.Count;
            }
            else
            {
                Commons.ShowResultErrorBox(this, r);
            }
            if (listView1.CheckedItems.Count == 0)
            {
                SelMgrId = -1;
            }
            btnSearch.Enabled = true;
        }