Ejemplo n.º 1
0
        private void LoadData()
        {
            loadbar.Start();                                                                                          //打开转动动画
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值
            T_SYS_DICTIONARY StrContractLevel   = cbContractLevel.SelectedItem as T_SYS_DICTIONARY;                   //合同级别

            if (!string.IsNullOrEmpty(txtTemplateID.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "contractTemplate.CONTRACTTITLE ^@" + paras.Count().ToString();//模板标题
                paras.Add(txtTemplateID.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtTemplateName.Text.Trim()))//模板名称
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "contractTemplate.CONTRACTTEMPLATENAME ^@" + paras.Count().ToString();
                paras.Add(txtTemplateName.Text.Trim());
            }
            if (this.cbContractLevel.SelectedIndex > 0) //级别
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "contractTemplate.CONTRACTLEVEL ^@" + paras.Count().ToString();
                paras.Add(StrContractLevel.DICTIONARYVALUE.ToString());
            }
            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;
            ContractManagement.GetContractTemplateInfoAsync(dpGrid.PageIndex, dpGrid.PageSize, "contractTemplate.CREATEDATE", filter, paras, pageCount, loginUserInfo);
        }