private void LoadData() { loadbar.Start(); int pageCount = 0; string filter = ""; System.Collections.ObjectModel.ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); TextBox txtPostCode = Utility.FindChildControl <TextBox>(expander, "txtPostCode"); if (txtPostCode != null) { if (!string.IsNullOrEmpty(txtPostCode.Text)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } //filter += "POSTCODE==@" + paras.Count().ToString(); filter += " @" + paras.Count().ToString() + ".Contains(POSTCODE)"; paras.Add(txtPostCode.Text.Trim()); } } TextBox txtPostName = Utility.FindChildControl <TextBox>(expander, "txtPostName"); if (txtPostName != null) { if (!string.IsNullOrEmpty(txtPostName.Text)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += " @" + paras.Count().ToString() + ".Contains(POSTNAME)"; paras.Add(txtPostName.Text.Trim()); } } //ComboBox cbxDepName = Utility.FindChildControl<ComboBox>(expander, "cbxDepName"); AutoCompleteComboBox acbDepName = Utility.FindChildControl <AutoCompleteComboBox>(expander, "acbDepName"); if (acbDepName != null) { if (acbDepName.SelectedItem != null) { T_HR_DEPARTMENTDICTIONARY ent = acbDepName.SelectedItem as T_HR_DEPARTMENTDICTIONARY; if (!string.IsNullOrEmpty(ent.DEPARTMENTDICTIONARYID)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "T_HR_DEPARTMENTDICTIONARY.DEPARTMENTDICTIONARYID==@" + paras.Count().ToString(); paras.Add(ent.DEPARTMENTDICTIONARYID); } } } client.PostDictionaryPagingAsync(dataPager.PageIndex, dataPager.PageSize, "POSTCODE", filter, paras, pageCount, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID, Checkstate); }