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

            //if (checkState != ((int)CheckStates.Approving).ToString())
            //{
            //    filter += "archivesLending.OWNERID==@" + paras.Count().ToString();
            //}
            //paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            if (!string.IsNullOrEmpty(txtSearchType.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "T_OA_ARCHIVES.RECORDTYPE ^@" + paras.Count().ToString();
                paras.Add(txtSearchType.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtSearchTitle.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "T_OA_ARCHIVES.ARCHIVESTITLE ^@" + paras.Count().ToString();
                paras.Add(txtSearchTitle.Text.Trim());
            }
            SMT.SaaS.OA.UI.SmtOADocumentAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOADocumentAdminService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            //GetLoginUserInfo(loginUserInfo);
            loadbar.Start();
            client.GetLendingListByUserIdAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
        }