private void LoadData() { loadbar.Start(); int pageCount = 0; string filter = ""; string strState = ""; System.Collections.ObjectModel.ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); if (Checkstate != Convert.ToInt32(CheckStates.All).ToString()) { strState = Checkstate; } //ComboBox cbxCompanyName = Utility.FindChildControl<ComboBox>(expander, "cbxCompanyName"); AutoCompleteComboBox acbCompanyName = Utility.FindChildControl <AutoCompleteComboBox>(expander, "acbCompanyName"); TextBox txtEmpName = Utility.FindChildControl <TextBox>(expander, "txtEmpName"); if (acbCompanyName != null) { if (acbCompanyName.SelectedItem != null) { T_HR_COMPANY ent = acbCompanyName.SelectedItem as T_HR_COMPANY; if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "T_HR_COMPANY.CNAME==@" + paras.Count().ToString(); paras.Add(ent.CNAME); } } if (txtEmpName != null) { if (!string.IsNullOrEmpty(txtEmpName.Text)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } // filter += "T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME.Contains(@" + paras.Count().ToString()+")"; filter += " @" + paras.Count().ToString() + ".Contains(T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME)"; paras.Add(txtEmpName.Text.Trim()); } } client.DepartmentPagingAsync(dataPager.PageIndex, dataPager.PageSize, "SORTINDEX", filter, paras, pageCount, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID, strState); }