Пример #1
0
        void LoadData()
        {
            loadbar.Start();
            int    pageCount = 0;
            string filter    = "";

            System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>();
            TextBox txtEmpName = Utility.FindChildControl <TextBox>(expander, "txtEmpName");

            if (txtEmpName != null)
            {
                if (!string.IsNullOrEmpty(txtEmpName.Text.Trim()))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " @" + paras.Count().ToString() + ".Contains(EMPLOYEECNAME)";
                    paras.Add(txtEmpName.Text.Trim());
                }
            }
            string sType = "", sValue = "";

            sType  = treeOrganization.sType;
            sValue = treeOrganization.sValue;

            client.GetContactsListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "EMPLOYEECNAME",
                                              filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
        }