Example #1
0
        private void LoadData()
        {
            loadbar.Start();                                                                                          //打开转动动画
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (!string.IsNullOrEmpty(txtSYSTEMCODE.Text.Trim()))                                                     //系统类型
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "SYSCODE ^@" + paras.Count().ToString();
                paras.Add(txtSYSTEMCODE.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtAGENTMODULE.Text.Trim()))//代理模块
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "MODELCODE ^@" + paras.Count().ToString();
                paras.Add(txtAGENTMODULE.Text.Trim());
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;

            SoaChannel.GetAgentSetListByIdAsync(dpGrid.PageIndex, dpGrid.PageSize, "CREATEDATE", filter, paras, pageCount, loginUserInfo);
        }
Example #2
0
        void LoadMeetingTypeTemplateInfos()
        {
            string filter         = ""; //查询过滤条件
            int    pageCount      = 0;
            string StrMeetingType = "";
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>();   //参数值

            if (IsQueryBtn)
            {
                if (!string.IsNullOrEmpty(txtTemplateName.Text.Trim()))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "TEMPLATENAME ^@" + paras.Count().ToString();
                    paras.Add(txtTemplateName.Text.Trim());
                }
                //if (!string.IsNullOrEmpty(txtContent.Text.Trim()))
                //{
                //    if (!string.IsNullOrEmpty(filter))
                //    {
                //        filter += " and ";
                //    }
                //    filter += "CONTENT ^@" + paras.Count().ToString();
                //    paras.Add(txtContent.Text.Trim());
                //}
                if (cbMeetingType.SelectedItem != null && cbMeetingType.SelectedIndex != 0)
                {
                    StrMeetingType = ((cbMeetingType.SelectedItem) as T_OA_MEETINGTYPE).MEETINGTYPE;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "T_OA_MEETINGTYPE.MEETINGTYPE ==@" + paras.Count().ToString();
                    paras.Add(StrMeetingType);
                }
                IsQueryBtn = false;
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();

            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            MeetingClient.GetTypeTemplateInfosAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo);
        }
Example #3
0
        void LoadMeetingTypeInfos()
        {
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (IsQueryBtn)
            {
                if (!string.IsNullOrEmpty(txtSearchType.Text.Trim()))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "MEETINGTYPE ^@" + paras.Count().ToString();
                    paras.Add(txtSearchType.Text.Trim());
                }
            }
            //if (!string.IsNullOrEmpty(txtSearchMemo.Text.Trim()))
            //{
            //    if (!string.IsNullOrEmpty(filter))
            //    {
            //        filter += " and ";
            //    }
            //    filter += "REMARK ^@" + paras.Count().ToString();
            //    paras.Add(txtSearchMemo.Text.Trim());
            //}
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();

            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            loadbar.Start();
            MeetingClient.GetMeetingTypeInfosAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo);
        }
Example #4
0
        void LoadSendDocInfos()
        {
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            string StrTitle  = "";                                                                                    //标题

            string StrStart     = "";                                                                                 //添加文档的起始时间
            string StrEnd       = "";                                                                                 //添加文档的结束时间
            string StrIsSave    = "";                                                                                 //是否归档
            string StrDistrbute = "";                                                                                 //是否发布
            string StrGrade     = "";                                                                                 //级别
            string StrProritity = "";                                                                                 //缓急
            string StrDocType   = "";                                                                                 //文档类型
            bool   IsNull       = false;                                                                              //用来控制是否有查询条件

            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            //if (checkState != ((int)CheckStates.Approving).ToString())
            //{
            //    if (!string.IsNullOrEmpty(filter))
            //    {
            //        filter += " and ";
            //    }
            //    filter += "OACompanySendDoc.OWNERID==@" + paras.Count().ToString();
            //    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            //}
            if (IsQueryBtn)
            {
                StrTitle = this.txtSendDocTitle.Text.Trim().ToString();
                T_SYS_DICTIONARY GradeObj     = cbxGrade.SelectedItem as T_SYS_DICTIONARY;     //级别
                T_SYS_DICTIONARY ProritityObj = cbxProritity.SelectedItem as T_SYS_DICTIONARY; //缓急
                T_OA_SENDDOCTYPE DocType      = new T_OA_SENDDOCTYPE();
                StrStart = this.dpStart.Text.Trim().ToString();
                StrEnd   = this.dpEnd.Text.Trim().ToString();

                if (this.cbxdoctype.SelectedIndex > 0)
                {
                    StrDocType = this.cbxdoctype.SelectedItem.ToString();
                    DocType    = this.cbxdoctype.SelectedItem as T_OA_SENDDOCTYPE;
                }

                if (this.cbxGrade.SelectedIndex > 0)
                {
                    StrGrade = GradeObj.DICTIONARYNAME.ToString();
                }
                if (this.cbxProritity.SelectedIndex > 0)
                {
                    StrProritity = ProritityObj.DICTIONARYNAME.ToString();
                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.SENDDOCTITLE ^@" + paras.Count().ToString();//标题名称
                    paras.Add(StrTitle);
                }

                if (!string.IsNullOrEmpty(StrProritity))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.PRIORITIES ==@" + paras.Count().ToString();//缓急名称
                    paras.Add(StrProritity);
                }
                if (!string.IsNullOrEmpty(StrDocType))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "doctype.SENDDOCTYPEID ==@" + paras.Count().ToString();//类型名称
                    paras.Add(DocType.SENDDOCTYPEID);
                }

                if (!string.IsNullOrEmpty(StrGrade))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.GRADED ==@" + paras.Count().ToString();//级别名称
                    paras.Add(StrGrade);
                }
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd   = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        return;
                    }
                    else
                    {
                        IsNull = true;
                    }
                }
            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID       = Common.CurrentLoginUserInfo.EmployeeID;
            loginUserInfo.postID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
            loginUserInfo.departmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            loadbar.Start();
            //SendDocClient.GetSendDocInfosListByWorkFlowAsync(dataPager.PageIndex, dataPager.PageSize, "OACompanySendDoc.CREATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
            SendDocClient.GetMYSendDocInfosListAsync(dataPager.PageIndex, dataPager.PageSize, "OACompanySendDoc.CREATEDATE", filter, paras, pageCount, "2", loginUserInfo);
        }
Example #5
0
        void LoadSendDocInfos()
        {
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            string StrTitle = ""; //标题
            
            string StrStart = "";//添加文档的起始时间
            string StrEnd = "";//添加文档的结束时间
            string StrIsSave = "";//是否归档
            string StrDistrbute = "";//是否发布
            string StrGrade = "";//级别
            string StrProritity = "";//缓急
            string StrDocType = "";//文档类型
            bool IsNull = false;  //用来控制是否有查询条件
            
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            //if (checkState != ((int)CheckStates.Approving).ToString())
            //{
            //    if (!string.IsNullOrEmpty(filter))
            //    {
            //        filter += " and ";
            //    }
            //    filter += "OACompanySendDoc.OWNERID==@" + paras.Count().ToString();
            //    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            //}
            if (IsQueryBtn)
            {
                StrTitle = this.txtSendDocTitle.Text.Trim().ToString();
                T_SYS_DICTIONARY GradeObj = cbxGrade.SelectedItem as T_SYS_DICTIONARY;//级别
                T_SYS_DICTIONARY ProritityObj = cbxProritity.SelectedItem as T_SYS_DICTIONARY;//缓急
                T_OA_SENDDOCTYPE DocType = new T_OA_SENDDOCTYPE();
                StrStart = this.dpStart.Text.Trim().ToString();
                StrEnd = this.dpEnd.Text.Trim().ToString();
                
                if (this.cbxdoctype.SelectedIndex >0)
                {
                    StrDocType = this.cbxdoctype.SelectedItem.ToString();
                    DocType = this.cbxdoctype.SelectedItem as T_OA_SENDDOCTYPE;
                    
                }

                if (this.cbxGrade.SelectedIndex>0)
                {
                    StrGrade = GradeObj.DICTIONARYNAME.ToString();
                }
                if (this.cbxProritity.SelectedIndex > 0)
                {
                    StrProritity = ProritityObj.DICTIONARYNAME.ToString();
                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.SENDDOCTITLE ^@" + paras.Count().ToString();//标题名称
                    paras.Add(StrTitle);
                }
                
                if (!string.IsNullOrEmpty(StrProritity))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.PRIORITIES ==@" + paras.Count().ToString();//缓急名称
                    paras.Add(StrProritity);
                }
                if (!string.IsNullOrEmpty(StrDocType))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "doctype.SENDDOCTYPEID ==@" + paras.Count().ToString();//类型名称
                    paras.Add(DocType.SENDDOCTYPEID);
                }

                if (!string.IsNullOrEmpty(StrGrade))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.GRADED ==@" + paras.Count().ToString();//级别名称
                    paras.Add(StrGrade);
                }
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        return;
                    }
                    else
                    {
                        IsNull = true;
                    }
                }
            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loginUserInfo.postID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
            loginUserInfo.departmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            loadbar.Start();            
            //SendDocClient.GetSendDocInfosListByWorkFlowAsync(dataPager.PageIndex, dataPager.PageSize, "OACompanySendDoc.CREATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
            SendDocClient.GetMYSendDocInfosListAsync(dataPager.PageIndex, dataPager.PageSize, "OACompanySendDoc.CREATEDATE", filter, paras, pageCount, "2", loginUserInfo);
            
        }
Example #6
0
        void LoadDocTypeInfos()
        {
            int    pageCount   = 0;
            string filter      = ""; //查询过滤条件
            string StrName     = "";
            string StrRecord   = "";
            string StrStart    = "";
            string StrEnd      = "";
            string StrTypeFlag = ""; //文档类型

            StrStart = dpStart.Text.ToString();
            StrEnd   = dpEnd.Text.ToString();
            DateTime DtStart = new DateTime();
            DateTime DtEnd   = new DateTime();

            StrRecord = this.cbxIsSave.SelectedIndex.ToString();
            StrName   = this.txtDocType.Text.Trim().ToString();
            switch (this.cbxIsSave.SelectedIndex)
            {
            case 0:
                break;

            case 1:
                StrTypeFlag = "1";
                break;

            case 2:
                StrTypeFlag = "0";
                break;
            }
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>();   //参数值

            if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
            {
                //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
            if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
            {
                //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("MEETINGSTARTTIMENOTNULL"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
            if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
            {
                DtStart = System.Convert.ToDateTime(StrStart);
                DtEnd   = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                if (DtStart > DtEnd)
                {
                    //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ERRORSTARTDATEGTENDDATE"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORSTARTDATEGTENDDATE"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);

                    return;
                }
                else
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "CREATEDATE >=@" + paras.Count().ToString();//开始时间
                    paras.Add(DtStart);
                    filter += " and ";
                    filter += "CREATEDATE <=@" + paras.Count().ToString();//结束时间
                    paras.Add(DtEnd);
                }
            }
            //if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
            //{
            //    DtStart = System.Convert.ToDateTime(StrStart);
            //    DtEnd = System.Convert.ToDateTime(StrEnd);
            //    if (DtStart > DtEnd)
            //    {
            //        //MessageBox.Show("开始时间不能大于结束时间");
            //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("MEETINGSTARTTIMENOTNULL"));
            //        return;
            //    }
            //    else
            //    {

            //    }
            //}

            if (!string.IsNullOrEmpty(StrName))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "SENDDOCTYPE ^@" + paras.Count().ToString();//类型名称
                paras.Add(StrName);
            }
            if (!string.IsNullOrEmpty(StrTypeFlag))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "OPTFLAG ==@" + paras.Count().ToString();//类型名称
                paras.Add(StrTypeFlag);
            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            //client.GetLendingListByUserIdAsync(dataPager.PageIndex, dataPager.PageSize, "archivesLending.CREATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
            start = DateTime.Now;
            BumfClient.GetDocTypeInfosListBySearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo);
        }
        void LoadMeetingTypeTemplateInfos()
        {
            string filter = "";    //查询过滤条件
            int pageCount = 0;
            string StrMeetingType = "";
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            if (IsQueryBtn)
            {

                if (!string.IsNullOrEmpty(txtTemplateName.Text.Trim()))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "TEMPLATENAME ^@" + paras.Count().ToString();
                    paras.Add(txtTemplateName.Text.Trim());
                }
                //if (!string.IsNullOrEmpty(txtContent.Text.Trim()))
                //{
                //    if (!string.IsNullOrEmpty(filter))
                //    {
                //        filter += " and ";
                //    }
                //    filter += "CONTENT ^@" + paras.Count().ToString();
                //    paras.Add(txtContent.Text.Trim());
                //}
                if (cbMeetingType.SelectedItem != null && cbMeetingType.SelectedIndex != 0)
                {
                    StrMeetingType = ((cbMeetingType.SelectedItem) as T_OA_MEETINGTYPE).MEETINGTYPE;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "T_OA_MEETINGTYPE.MEETINGTYPE ==@" + paras.Count().ToString();
                    paras.Add(StrMeetingType);
                }
                IsQueryBtn = false;
                
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();

            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            MeetingClient.GetTypeTemplateInfosAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo);   
        }
Example #8
0
        private void LoadData()
        {
            loadbar.Start();//打开转动动画
            int pageCount = 0;
            string filter = ""; //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();//参数值

            if (!string.IsNullOrEmpty(txtSYSTEMCODE.Text.Trim())) //系统类型
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "SYSCODE ^@" + paras.Count().ToString();
                paras.Add(txtSYSTEMCODE.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtAGENTMODULE.Text.Trim()))//代理模块
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "MODELCODE ^@" + paras.Count().ToString();
                paras.Add(txtAGENTMODULE.Text.Trim());
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;

            SoaChannel.GetAgentSetListByIdAsync(dpGrid.PageIndex, dpGrid.PageSize, "CREATEDATE", filter, paras, pageCount, loginUserInfo);
        }
Example #9
0
        void LoadDocTypeTemplateInfos()
        {
            int    pageCount = 0;
            string filter    = "";
            string StrTitle  = "";                                                                                    //标题
            string StrStart  = "";                                                                                    //添加文档的起始时间
            string StrEnd    = "";                                                                                    //添加文档的结束时间

            string StrGrade        = "";                                                                              //级别
            string StrProritity    = "";                                                                              //缓急
            string StrDocType      = "";                                                                              //文档类型
            bool   IsNull          = false;                                                                           //用来控制是否有查询条件
            string StrTemplateName = "";                                                                              //模板名称
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            StrTitle = this.txtSendDocTitle.Text.Trim().ToString();

            StrStart        = this.dpStart.Text.Trim().ToString();
            StrEnd          = this.dpEnd.Text.Trim().ToString();
            StrTemplateName = this.txtTemplateName.Text.Trim().ToString();

            if (IsQueryBtn)
            {
                T_SYS_DICTIONARY GradeObj     = cbxGrade.SelectedItem as T_SYS_DICTIONARY;     //级别
                T_SYS_DICTIONARY ProritityObj = cbxProritity.SelectedItem as T_SYS_DICTIONARY; //缓急
                if (this.cbxGrade.SelectedIndex > 0)
                {
                    StrGrade = GradeObj.DICTIONARYNAME.ToString();
                }
                if (this.cbxProritity.SelectedIndex > 0)
                {
                    StrProritity = ProritityObj.DICTIONARYNAME.ToString();
                }
                if (this.cbxdoctype.SelectedItem.ToString() != "请选择")
                {
                    StrDocType = this.cbxdoctype.SelectedItem.ToString();
                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "SENDDOCTITLE ^@" + paras.Count().ToString();//标题名称
                    paras.Add(StrTitle);
                }

                if (!string.IsNullOrEmpty(StrTemplateName))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "TEMPLATENAME ^@" + paras.Count().ToString();//模板名称
                    paras.Add(StrTemplateName);
                }

                if (!string.IsNullOrEmpty(StrProritity))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "PRIORITIES==@" + paras.Count().ToString();//缓急名称
                    paras.Add(StrProritity);
                }
                if (!string.IsNullOrEmpty(StrDocType))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "SENDDOCTYPE ^@" + paras.Count().ToString();//类型名称
                    paras.Add(StrDocType);
                }

                if (!string.IsNullOrEmpty(StrGrade))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "GRADED==@" + paras.Count().ToString();//级别名称
                    paras.Add(StrGrade);
                }
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {
                    //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd   = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"),
                                                       Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                        return;
                    }
                    else
                    {
                        IsNull = true;
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "CREATEDATE >=@" + paras.Count().ToString();
                        paras.Add(DtStart);
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "CREATEDATE <=@" + paras.Count().ToString();
                        paras.Add(DtEnd);
                    }
                }
                //if (!IsNull)
                //{
                //    Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("REQUIRED","SEARCH"));
                //    return;
                //}
            }


            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            DocTypeTemplateClient.GetDocTypeTemplateInfosListBySearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, "", loginUserInfo);
        }
Example #10
0
        void LoadMeetingInfos()
        {
            string StrTitle      = "";
            string StrType       = "";
            string StrDepartment = "";
            string StrContent    = "";

            string StrStart  = "";
            string StrEnd    = "";
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (checkState == ((int)CheckStates.UnSubmit).ToString())
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "meetinginfo.OWNERID==@" + paras.Count().ToString();
                paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            }



            if (IsQueryBtn)
            {
                StrTitle = txtMeetingTitle.Text.Trim().ToString();
                if (cbMeetingType.SelectedIndex > 0) //if (cbMeetingType.SelectedItem.ToString() != "请选择")
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    StrType = ((cbMeetingType.SelectedItem) as T_OA_MEETINGTYPE).MEETINGTYPE.ToString();
                    filter += "meetingtype.meetingtype ==@" + paras.Count().ToString();
                    paras.Add(StrType);
                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "meetinginfo.MEETINGTITLE ^@" + paras.Count().ToString();
                    paras.Add(StrTitle);
                }


                StrStart = dpStart.Text.ToString();
                StrEnd   = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd   = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        //MessageBox.Show("开始时间不能大于结束时间");
                        Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            if (!string.IsNullOrEmpty(filter))
                            {
                                filter += " and ";
                            }
                            filter += "meetinginfo.CREATEDATE >=@" + paras.Count().ToString();
                            paras.Add(DtStart);
                            if (!string.IsNullOrEmpty(filter))
                            {
                                filter += " and ";
                            }
                            filter += "meetinginfo.CREATEDATE <=@" + paras.Count().ToString();
                            paras.Add(DtEnd);
                        }
                    }
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))//选择了开始时间
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "meetinginfo.CREATEDATE >=@" + paras.Count().ToString();
                    paras.Add(System.Convert.ToDateTime(StrStart));
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))//选择了结束时间
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "meetinginfo.CREATEDATE <=@" + paras.Count().ToString();
                    paras.Add(System.Convert.ToDateTime(StrEnd));
                }
            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            MeetingClient.GetMeetingInfoListByFlowAsync(dataPager.PageIndex, dataPager.PageSize, "meetinginfo.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
        }
        void LoadMeetingRoomAppInfos()
        {
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            string StrRoomName = "";
            string StrDepartment = "";

            string StrStart = "";
            string StrEnd = "";
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            if (IsQueryBtn)
            {

                StrRoomName = this.txtMeetingRoomName.Text.ToString().Trim();
                //StrDepartment = this.PostsObject.Text.ToString().Trim();


                StrStart = DPStart.Text.ToString();
                StrEnd = DPEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();

                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));

                        return;
                    }
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " roomapp.STARTTIME >=@" + paras.Count().ToString();
                    paras.Add(DtStart);
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " roomapp.ENDTIME <=@" + paras.Count().ToString();
                    paras.Add(DtEnd);
                }

                if (checkState == ((int)CheckStates.UnSubmit).ToString())
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "roomapp.OWNERID==@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
                }

                if (!string.IsNullOrEmpty(StrRoomName))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "room.MEETINGROOMNAME ^@" + paras.Count().ToString();
                    paras.Add(StrRoomName);
                }
                //if (!string.IsNullOrEmpty(StrDepartment))
                //{
                //    if (!string.IsNullOrEmpty(filter))
                //    {
                //        filter += " and ";
                //    }
                //    filter += "roomapp.DEPARTNAME ==@" + paras.Count().ToString();
                //    paras.Add(StrDepartment);
                //}


            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;


            loadbar.Start();
            MeetingClient.GetMeetingRoomAppInfosByFlowAsync(dataPager.PageIndex, dataPager.PageSize, "roomapp.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);

        }
Example #12
0
        void LoadPriorityInfos()
        {
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (IsQueryBtn)
            {
                string StrStart = "";
                string StrEnd   = "";
                string StrTitle = "";
                StrTitle = this.txtGrade.Text.Trim().ToString();


                StrStart = dpStart.Text.ToString();
                StrEnd   = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();

                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    //MessageBox.Show("结束时间不能为空");
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("MEETINGSTARTTIMENOTNULL"));
                    //MessageBox.Show("开始时间不能为空");
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd   = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ERRORSTARTDATEGTENDDATE"));

                        //MessageBox.Show("开始时间不能大于结束时间");
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "CREATEDATE >=@" + paras.Count().ToString();//开始时间
                        paras.Add(DtStart);
                        filter += " and ";
                        filter += "CREATEDATE <=@" + paras.Count().ToString();//结束时间
                        paras.Add(DtEnd);
                    }
                }


                if (!string.IsNullOrEmpty(StrTitle))
                {
                    if (filter != "")
                    {
                        filter += " and ";
                    }
                    filter += "PRIORITIES ^@" + paras.Count().ToString();//类型名称
                    paras.Add(StrTitle);
                }
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            BumfClient.GetDocPriorityInfosListBySearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE", filter, paras, pageCount, loginUserInfo);
        }
Example #13
0
        void LoadPriorityInfos()
        { 
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值

            if (IsQueryBtn)
            {
                string StrStart = "";
                string StrEnd = "";
                string StrTitle = "";
                StrTitle = this.txtGrade.Text.Trim().ToString();


                StrStart = dpStart.Text.ToString();
                StrEnd = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();

                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {

                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    //MessageBox.Show("结束时间不能为空");
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {

                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("MEETINGSTARTTIMENOTNULL"));
                    //MessageBox.Show("开始时间不能为空");
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ERRORSTARTDATEGTENDDATE"));

                        //MessageBox.Show("开始时间不能大于结束时间");
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "CREATEDATE >=@" + paras.Count().ToString();//开始时间
                        paras.Add(DtStart);
                        filter += " and ";
                        filter += "CREATEDATE <=@" + paras.Count().ToString();//结束时间
                        paras.Add(DtEnd);
                    }
                }

                
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    if (filter != "")
                    {
                        filter += " and ";
                    }
                    filter += "PRIORITIES ^@" + paras.Count().ToString();//类型名称
                    paras.Add(StrTitle);
                }
                
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();            
            BumfClient.GetDocPriorityInfosListBySearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE", filter, paras, pageCount, loginUserInfo);
            
        }
        void LoadSendDocInfos(string checkState)
        {
            
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            string StrTitle = ""; //标题
            string StrContent = "";//内容
            string StrStart = "";//添加文档的起始时间
            string StrEnd = "";//添加文档的结束时间
            string StrIsSave = "";//是否归档
            string StrDistrbute = "";//是否发布
            string StrGrade = "";//级别
            string StrProritity = "";//缓急
            string StrDocType = "";//文档类型
            bool IsNull = false;  //用来控制是否有查询条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            //if (checkState != ((int)CheckStates.Approving).ToString())
            //{
            //    if (!string.IsNullOrEmpty(filter))
            //    {
            //        filter += " and ";
            //    }
            //    filter += "OACompanySendDoc.OWNERID==@" + paras.Count().ToString();
            //    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            //}
            if (SearchUserID == Common.CurrentLoginUserInfo.EmployeeID)
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "( OWNERID =@" + paras.Count().ToString();
                paras.Add(SearchUserID);//员工ID值
                filter += " or ";
                filter += "CREATEUSERID =@" + paras.Count().ToString();//添加人的ID
                paras.Add(SearchUserID);
                filter += " ) ";
            }
            else
            {
                if (!string.IsNullOrEmpty(SearchUserID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OWNERID =@" + paras.Count().ToString();
                    paras.Add(SearchUserID);
                }
            }

            
            if (IsQueryBtn)
            {
                T_SYS_DICTIONARY GradeObj = cbxGrade.SelectedItem as T_SYS_DICTIONARY;//级别
                T_SYS_DICTIONARY ProritityObj = cbxProritity.SelectedItem as T_SYS_DICTIONARY;//缓急
                T_OA_SENDDOCTYPE sendtype = new T_OA_SENDDOCTYPE();
                switch (cbxIsSave.SelectedIndex)
                { 
                    case 0:
                        break;
                    case 1:
                        StrIsSave = "0";
                        break;
                    case 2:
                        StrIsSave = "1";
                        break;

                }
                switch (cbxDistrbute.SelectedIndex)
                {
                    case 0:
                        break;
                    case 1:
                        StrDistrbute = "0";
                        break;
                    case 2:
                        StrDistrbute = "1";
                        break;

                }
                if (!string.IsNullOrEmpty(StrIsSave))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.ISSAVE =@" + paras.Count().ToString();//标题名称
                    paras.Add(StrIsSave);
                }
                if (!string.IsNullOrEmpty(StrDistrbute))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.ISDISTRIBUTE =@" + paras.Count().ToString();//标题名称
                    paras.Add(StrDistrbute);
                }
                
                StrTitle = this.txtSendDocTitle.Text.Trim().ToString();
                //StrContent = this.txtDocContent.Text.Trim().ToString();
                StrStart = this.dpStart.Text.Trim().ToString();
                StrEnd = this.dpEnd.Text.Trim().ToString();

                if (this.cbxGrade.SelectedIndex>0)
                {
                    StrGrade = GradeObj.DICTIONARYNAME.ToString();

                }
                if (this.cbxProritity.SelectedIndex >0)
                {
                    StrProritity = ProritityObj.DICTIONARYNAME.ToString();

                }
                if (this.cbxdoctype.SelectedIndex >0)
                {
                    sendtype = this.cbxdoctype.SelectedItem as T_OA_SENDDOCTYPE;
                    StrDocType = sendtype.SENDDOCTYPE;

                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    IsNull = true;
                    //if (!string.IsNullOrEmpty(filter))
                    //{
                    //    filter += " and ";
                    //}
                    //filter += "OACompanySendDoc.SENDDOCTITLE ^@" + paras.Count().ToString();//标题名称
                    //paras.Add(StrTitle);

                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "@" + paras.Count().ToString() + ".Contains(OACompanySendDoc.SENDDOCTITLE) ";
                    paras.Add(StrTitle);
                }
                

                if (!string.IsNullOrEmpty(StrProritity))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.PRIORITIES ^@" + paras.Count().ToString();//缓急名称
                    paras.Add(StrProritity);
                }
                if (this.cbxdoctype.SelectedIndex >0)
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " doctype.SENDDOCTYPE ==@" + paras.Count().ToString();
                    paras.Add(sendtype.SENDDOCTYPE);
                    
                }

                if (!string.IsNullOrEmpty(StrGrade))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "OACompanySendDoc.GRADED ^@" + paras.Count().ToString();//级别名称
                    paras.Add(StrGrade);
                }
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("dtSearch"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        return;
                    }
                    else
                    {
                        IsNull = true;
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "OACompanySendDoc.CREATEDATE >=@" + paras.Count().ToString();
                        paras.Add(DtStart);
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "OACompanySendDoc.CREATEDATE <=@" + paras.Count().ToString();
                        paras.Add(DtEnd);

                    }
                }
                //IsQueryBtn = false;
            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            SendDocClient.GetSendDocInfosListByWorkFlowAsync(dataPager.PageIndex, dataPager.PageSize, "OACompanySendDoc.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
            
            
        }
Example #15
0
        void LoadMeetingRoomAppInfos()
        {
            int    pageCount     = 0;
            string filter        = ""; //查询过滤条件
            string StrRoomName   = "";
            string StrDepartment = "";

            string StrStart = "";
            string StrEnd   = "";
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>();   //参数值

            if (IsQueryBtn)
            {
                StrRoomName = this.txtMeetingRoomName.Text.ToString().Trim();
                //StrDepartment = this.PostsObject.Text.ToString().Trim();


                StrStart = DPStart.Text.ToString();
                StrEnd   = DPEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();

                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd   = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));

                        return;
                    }
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " roomapp.STARTTIME >=@" + paras.Count().ToString();
                    paras.Add(DtStart);
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " roomapp.ENDTIME <=@" + paras.Count().ToString();
                    paras.Add(DtEnd);
                }

                if (checkState == ((int)CheckStates.UnSubmit).ToString())
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "roomapp.OWNERID==@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
                }

                if (!string.IsNullOrEmpty(StrRoomName))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "room.MEETINGROOMNAME ^@" + paras.Count().ToString();
                    paras.Add(StrRoomName);
                }
                //if (!string.IsNullOrEmpty(StrDepartment))
                //{
                //    if (!string.IsNullOrEmpty(filter))
                //    {
                //        filter += " and ";
                //    }
                //    filter += "roomapp.DEPARTNAME ==@" + paras.Count().ToString();
                //    paras.Add(StrDepartment);
                //}
            }
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;


            loadbar.Start();
            MeetingClient.GetMeetingRoomAppInfosByFlowAsync(dataPager.PageIndex, dataPager.PageSize, "roomapp.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
        }
Example #16
0
        void LoadMeetingTypeInfos()
        {
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            if (IsQueryBtn)
            {
                if (!string.IsNullOrEmpty(txtSearchType.Text.Trim()))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "MEETINGTYPE ^@" + paras.Count().ToString();
                    paras.Add(txtSearchType.Text.Trim());
                }
            }
            //if (!string.IsNullOrEmpty(txtSearchMemo.Text.Trim()))
            //{
            //    if (!string.IsNullOrEmpty(filter))
            //    {
            //        filter += " and ";
            //    }
            //    filter += "REMARK ^@" + paras.Count().ToString();
            //    paras.Add(txtSearchMemo.Text.Trim());
            //}
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();

            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            loadbar.Start();
            MeetingClient.GetMeetingTypeInfosAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo);
      
        }
Example #17
0
        void LoadMeetingInfos()
        {
            string StrTitle = "";
            string StrType = "";
            string StrDepartment = "";
            string StrContent = "";

            string StrStart = "";
            string StrEnd = "";
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            if (checkState == ((int)CheckStates.UnSubmit).ToString())
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "meetinginfo.OWNERID==@" + paras.Count().ToString();
                paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            }
            


            if (IsQueryBtn)
            {
                StrTitle = txtMeetingTitle.Text.Trim().ToString();                
                if (cbMeetingType.SelectedIndex >0) //if (cbMeetingType.SelectedItem.ToString() != "请选择")
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    StrType = ((cbMeetingType.SelectedItem) as T_OA_MEETINGTYPE).MEETINGTYPE.ToString();
                    filter += "meetingtype.meetingtype ==@" + paras.Count().ToString();
                    paras.Add(StrType);

                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "meetinginfo.MEETINGTITLE ^@" + paras.Count().ToString();
                    paras.Add(StrTitle);
                }
                

                StrStart = dpStart.Text.ToString();
                StrEnd = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        //MessageBox.Show("开始时间不能大于结束时间");
                        Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            if (!string.IsNullOrEmpty(filter))
                            {
                                filter += " and ";
                            }
                            filter += "meetinginfo.CREATEDATE >=@" + paras.Count().ToString();
                            paras.Add(DtStart);
                            if (!string.IsNullOrEmpty(filter))
                            {
                                filter += " and ";
                            }
                            filter += "meetinginfo.CREATEDATE <=@" + paras.Count().ToString();
                            paras.Add(DtEnd);
                        }
                    }
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))//选择了开始时间
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "meetinginfo.CREATEDATE >=@" + paras.Count().ToString();
                    paras.Add(System.Convert.ToDateTime(StrStart));
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))//选择了结束时间
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "meetinginfo.CREATEDATE <=@" + paras.Count().ToString();
                    paras.Add(System.Convert.ToDateTime(StrEnd));
                }
            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            MeetingClient.GetMeetingInfoListByFlowAsync(dataPager.PageIndex, dataPager.PageSize, "meetinginfo.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
            
        }
Example #18
0
        void LoadDocTypeInfos()
        { 
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            string StrName = "";
            string StrRecord = "";
            string StrStart = "";
            string StrEnd = "";
            string StrTypeFlag = ""; //文档类型
            StrStart = dpStart.Text.ToString();
            StrEnd = dpEnd.Text.ToString();
            DateTime DtStart = new DateTime();
            DateTime DtEnd = new DateTime();
            StrRecord = this.cbxIsSave.SelectedIndex.ToString();
            StrName = this.txtDocType.Text.Trim().ToString();
            switch (this.cbxIsSave.SelectedIndex)
            { 
                case 0:
                    break;
                case 1:
                    StrTypeFlag ="1";
                    break;
                case 2:
                    StrTypeFlag ="0";
                    break;
            }
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            
            if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
            {
                
                //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL"),
                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
            if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
            {

                //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("MEETINGSTARTTIMENOTNULL"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL"),
                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
            if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
            {
                DtStart = System.Convert.ToDateTime(StrStart);
                DtEnd = System.Convert.ToDateTime(StrEnd + " 23:59:59");
                if (DtStart > DtEnd)
                {
                    //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ERRORSTARTDATEGTENDDATE"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORSTARTDATEGTENDDATE"),
                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    
                    return;
                }
                else
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "CREATEDATE >=@" + paras.Count().ToString();//开始时间
                    paras.Add(DtStart);
                    filter += " and ";
                    filter += "CREATEDATE <=@" + paras.Count().ToString();//结束时间
                    paras.Add(DtEnd);
                }
            }
            //if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
            //{
            //    DtStart = System.Convert.ToDateTime(StrStart);
            //    DtEnd = System.Convert.ToDateTime(StrEnd);
            //    if (DtStart > DtEnd)
            //    {
            //        //MessageBox.Show("开始时间不能大于结束时间");
            //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("MEETINGSTARTTIMENOTNULL"));
            //        return;
            //    }
            //    else
            //    {
                    
            //    }
            //}
            
            if (!string.IsNullOrEmpty(StrName))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "SENDDOCTYPE ^@" + paras.Count().ToString();//类型名称
                paras.Add(StrName);
            }
            if(!string.IsNullOrEmpty(StrTypeFlag))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "OPTFLAG ==@" + paras.Count().ToString();//类型名称
                paras.Add(StrTypeFlag);

            }

            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            //client.GetLendingListByUserIdAsync(dataPager.PageIndex, dataPager.PageSize, "archivesLending.CREATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
            start = DateTime.Now;
            BumfClient.GetDocTypeInfosListBySearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo);
        }
        void LoadDocTypeTemplateInfos()
        {

            int pageCount = 0;
            string filter = "";            
            string StrTitle = ""; //标题            
            string StrStart = "";//添加文档的起始时间
            string StrEnd = "";//添加文档的结束时间

            string StrGrade = "";//级别
            string StrProritity = "";//缓急
            string StrDocType = "";//文档类型
            bool IsNull = false;  //用来控制是否有查询条件
            string StrTemplateName = "";  //模板名称
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            StrTitle = this.txtSendDocTitle.Text.Trim().ToString();
            
            StrStart = this.dpStart.Text.Trim().ToString();
            StrEnd = this.dpEnd.Text.Trim().ToString();
            StrTemplateName = this.txtTemplateName.Text.Trim().ToString();
            
            if (IsQueryBtn)
            {
                T_SYS_DICTIONARY GradeObj = cbxGrade.SelectedItem as T_SYS_DICTIONARY;//级别
                T_SYS_DICTIONARY ProritityObj = cbxProritity.SelectedItem as T_SYS_DICTIONARY;//缓急
                if (this.cbxGrade.SelectedIndex >0)
                {
                    StrGrade = GradeObj.DICTIONARYNAME.ToString();

                }
                if (this.cbxProritity.SelectedIndex >0)
                {
                    StrProritity = ProritityObj.DICTIONARYNAME.ToString();
                    
                }
                if (this.cbxdoctype.SelectedItem.ToString() != "请选择")
                {
                    StrDocType = this.cbxdoctype.SelectedItem.ToString();
                    
                }
                if (!string.IsNullOrEmpty(StrTitle))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "SENDDOCTITLE ^@" + paras.Count().ToString();//标题名称
                    paras.Add(StrTitle);
                }
                
                if (!string.IsNullOrEmpty(StrTemplateName))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "TEMPLATENAME ^@" + paras.Count().ToString();//模板名称
                    paras.Add(StrTemplateName);
                }
                
                if (!string.IsNullOrEmpty(StrProritity))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "PRIORITIES==@" + paras.Count().ToString();//缓急名称
                    paras.Add(StrProritity);
                }
                if (!string.IsNullOrEmpty(StrDocType))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "SENDDOCTYPE ^@" + paras.Count().ToString();//类型名称
                    paras.Add(StrDocType);
                }
                                
                if (!string.IsNullOrEmpty(StrGrade))
                {
                    IsNull = true;
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "GRADED==@" + paras.Count().ToString();//级别名称
                    paras.Add(StrGrade);
                }
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();
                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {

                    //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ENDTIMENOTNULL"),
                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    
                    //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTNULL"),
                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    return;
                }
                if (!string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    DtStart = System.Convert.ToDateTime(StrStart);
                    DtEnd = System.Convert.ToDateTime(StrEnd +" 23:59:59");
                    if (DtStart > DtEnd)
                    {
                        //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"));
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("STARTTIMENOTGREATENDTIME"),
                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                        return;
                    }
                    else
                    {
                        IsNull = true;
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "CREATEDATE >=@" + paras.Count().ToString();
                        paras.Add(DtStart);
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "CREATEDATE <=@" + paras.Count().ToString();
                        paras.Add(DtEnd);
                    }
                }
                //if (!IsNull)
                //{
                //    Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("SEARCH"), Utility.GetResourceStr("REQUIRED","SEARCH"));
                //    return;
                //}
                
            }


            SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            DocTypeTemplateClient.GetDocTypeTemplateInfosListBySearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, "", loginUserInfo);
            
        }