private async void UpdateTable1() { if (m_selUName == CrmCommons.ALL_VALUE && string.IsNullOrWhiteSpace(tbKey.Text)) { Commons.ShowInfoBox(this, "请输入关键字"); return; } btnSearch.Enabled = false; var prLevel = cbbPrLevels.ComboBox.GetSelectedValue(); var age = cbbAge.ComboBox.GetSelectedValue(); var gender = cbbGenders.ComboBox.GetSelectedValue(); var status = cbbAccStatus.ComboBox.GetSelectedValue(); var p = new Dictionary <string, object>(); p["u-name"] = m_selUName; p["assign-time1"] = startDate.Value.TruncToStart(); p["assign-time2"] = endDate.Value.TruncToEnd(); p["search-key"] = tbKey.Text.Trim(); p["origin-type"] = cbbCustomerSource.Text.Trim(); if (prLevel != Commons.AllValue) { p["pr-level"] = prLevel; } if (age != Commons.AllValue) { p["age"] = age; } if (gender != Commons.AllValue) { p["gender"] = gender; } if (status != Commons.AllValue) { p["status"] = status; } var r = await CrmInvestor.MyInvestors(p); if (r.IsOk) { this.myGridViewBinding1.BindTo(r); } else { Commons.ShowResultErrorBox(this, r); } btnSearch.Enabled = true; }