Exemplo n.º 1
0
        private void LoadData()
        {
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            //TextBox txtOrgCode = Utility.FindChildControl<TextBox>(controlsToolkitTUV, "txtOrgCode");
            //TextBox txtLicenseName = Utility.FindChildControl<TextBox>(controlsToolkitTUV, "txtLicenseName");
            if (!string.IsNullOrEmpty(txtOrgCode.Text.Trim()))
            {
                filter += "T_OA_ORGANIZATION.ORGCODE ==@" + paras.Count().ToString();
                paras.Add(txtOrgCode.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtLicenseName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "LICENSENAME ==@" + paras.Count().ToString();
                paras.Add(txtLicenseName.Text);
            }
            if (!string.IsNullOrEmpty(filter))
            {
                filter += " and ";
            }
            filter += "ISVALID==@" + paras.Count().ToString();
            paras.Add("1");
            loadbar.Start();
            client.GetLicenseListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, Common.CurrentLoginUserInfo.EmployeeID);
        }