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

            if (!string.IsNullOrEmpty(txtTitle.Text.Trim()))
            {
                filter += "ISSUANCETITLE ^@" + paras.Count().ToString();
                paras.Add(txtTitle.Text.Trim());
            }
            //if (!string.IsNullOrEmpty(txtContent.Text.Trim()))
            //{
            //    if (!string.IsNullOrEmpty(filter))
            //    {
            //        filter += " and ";
            //    }
            //    filter += "CONTENT ^@" + paras.Count().ToString();
            //    paras.Add(txtContent.Text.Trim());
            //}
            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            loadbar.Start();
            client.GetIssunaceListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
        }
        //加载数据
        private void GetData(int pageIndex, string checkState)
        {
            if (cmbVehicleInfo != null && cmbVehicleInfo.Items.Count > 0)
            {
                int pageCount = 0;
                ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值     
                paras.Add((cmbVehicleInfo.SelectionBoxItem as T_OA_VEHICLE).ASSETID);
                paras.Add(dtiStartDate.DateTimeValue);

                SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
                vehicleManager.Gets_VDCheckedAsync(pageIndex, dataPager.PageSize, "CREATEDATE", "", paras, pageCount, loginInfo);
            }
        }
        //加载数据
        private void GetData(int pageIndex, string checkState)
        {
            if (cmbVehicleInfo != null && cmbVehicleInfo.Items.Count > 0)
            {
                int pageCount = 0;
                ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>();   //参数值
                paras.Add((cmbVehicleInfo.SelectionBoxItem as T_OA_VEHICLE).ASSETID);
                paras.Add(dtiStartDate.DateTimeValue);

                SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
                vehicleManager.Gets_VDCheckedAsync(pageIndex, dataPager.PageSize, "CREATEDATE", "", paras, pageCount, loginInfo);
            }
        }
Example #4
0
        private void InitData()
        {
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (Common.CurrentLoginUserInfo != null)
            {
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID))
                {
                    filter += "(distrbuteObj.VIEWER =@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID);
                }
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " or ";
                    }
                    filter += "distrbuteObj.VIEWER =@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID);
                }
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].PostID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " or ";
                    }
                    filter += "distrbuteObj.VIEWER =@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.UserPosts[0].PostID);
                }
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.EmployeeID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " or ";
                    }
                    filter += "distrbuteObj.VIEWER =@" + paras.Count().ToString() + ")";
                    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
                }
            }
            if (!string.IsNullOrEmpty(txtUptown.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "houseInfoObj.COMMUNITY ^@" + paras.Count().ToString();
                paras.Add(txtUptown.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtHouseName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "houseInfoObj.HOUSENAME ^@" + paras.Count().ToString();
                paras.Add(txtHouseName.Text.Trim());
            }
            loadbar.Start();
            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            loginUserInfo.companyID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID       = Common.CurrentLoginUserInfo.EmployeeID;
            loginUserInfo.departmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            //if (string.IsNullOrEmpty(loginUserInfo.companyID))
            //{
            //    Utility.GetLoginUserInfo(loginUserInfo);
            //}

            client.GetMemberHireHouseAppListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "houselistObj.CREATEDATE", filter, paras, pageCount, loginUserInfo);
        }
Example #5
0
 private void LoadData()
 {
     int pageCount = 0;
     string filter = "";    //查询过滤条件
     ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值  
     if (!string.IsNullOrEmpty(txtTitle.Text.Trim()))
     {
         filter += "ISSUANCETITLE ^@" + paras.Count().ToString();
         paras.Add(txtTitle.Text.Trim());
     }
     //if (!string.IsNullOrEmpty(txtContent.Text.Trim()))
     //{
     //    if (!string.IsNullOrEmpty(filter))
     //    {
     //        filter += " and ";
     //    }
     //    filter += "CONTENT ^@" + paras.Count().ToString();
     //    paras.Add(txtContent.Text.Trim());
     //}
     SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
     if (string.IsNullOrEmpty(loginUserInfo.companyID))
     {
         Utility.GetLoginUserInfo(loginUserInfo);
     }
     loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
     loadbar.Start();
     client.GetIssunaceListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
 }
Example #6
0
        //加载数据
        private void GetData(int pageIndex)
        {
            loadbar.Start();
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            if (IsQuery)
            {

                string StrContent = "";
                string StrStart = "";
                string StrEnd = "";
                string StrConservateType = ((SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY)cmbConserVationName.SelectedItem).DICTIONARYNAME.ToString();
                StrStart = dpStart.Text.ToString();
                StrEnd = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();

                StrContent = this.txtConserVationContent.Text.ToString().Trim();

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

                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    loadbar.Stop();
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {

                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    loadbar.Stop();
                    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"));
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "REPAIRDATE >=@" + paras.Count().ToString();//开始时间
                        paras.Add(DtStart);
                        filter += " and ";
                        filter += "REPAIRDATE <=@" + paras.Count().ToString();//结束时间
                        paras.Add(DtEnd);
                    }
                }
                if (cmbConserVationName.SelectedIndex > 0)
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "CONSERVATYPE ==@" + paras.Count().ToString();//类型
                    paras.Add(StrConservateType);
                }

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

            }

            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            _VM.Get_VCRecordsAsync(pageIndex, dataPager.PageSize, "UPDATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
        }
Example #7
0
        private void InitData()
        {
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值
            if (Common.CurrentLoginUserInfo != null)
            {
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID))
                {
                    filter += "(distrbuteObj.VIEWER =@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID);
                }
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " or ";
                    }
                    filter += "distrbuteObj.VIEWER =@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID);
                }
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].PostID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " or ";
                    }
                    filter += "distrbuteObj.VIEWER =@" + paras.Count().ToString();
                    paras.Add(Common.CurrentLoginUserInfo.UserPosts[0].PostID);
                }
                if (!string.IsNullOrEmpty(Common.CurrentLoginUserInfo.EmployeeID))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " or ";
                    }
                    filter += "distrbuteObj.VIEWER =@" + paras.Count().ToString() + ")";
                    paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
                }
            }
            if (!string.IsNullOrEmpty(txtUptown.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "houseInfoObj.COMMUNITY ^@" + paras.Count().ToString();
                paras.Add(txtUptown.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtHouseName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "houseInfoObj.HOUSENAME ^@" + paras.Count().ToString();
                paras.Add(txtHouseName.Text.Trim());
            }
            loadbar.Start();
            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            loginUserInfo.departmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            //if (string.IsNullOrEmpty(loginUserInfo.companyID))
            //{
            //    Utility.GetLoginUserInfo(loginUserInfo);
            //}

            client.GetMemberHireHouseAppListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "houselistObj.CREATEDATE", filter, paras, pageCount, loginUserInfo);
        }
        /// <summary>
        /// 获取派车单数据 1
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="checkState"></param>
        private void GetData()
        {
            loadbar.Start();
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值 
            if (IsQuery)
            {
                string StrTitle = "";
                string StrStart = "";
                string StrEnd = "";
                StrStart = dpStart.Text.ToString();
                StrEnd = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd = new DateTime();
                StrTitle = this.txtRoute.Text.ToString().Trim();

                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"));
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "STARTTIME >=@" + paras.Count().ToString();//开始时间
                        paras.Add(DtStart);
                        filter += " and ";
                        filter += "STARTTIME <=@" + paras.Count().ToString();//结束时间
                        paras.Add(DtEnd);
                    }
                }

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

            }
            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID;
            vehicleDispatchManager.Gets_VDInfoAsync(dataPager.PageIndex, dataPager.PageSize, "UPDATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
        }
Example #9
0
        /// <summary>
        /// 获取派车单数据 1
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="checkState"></param>
        private void GetData()
        {
            loadbar.Start();
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (IsQuery)
            {
                string StrTitle = "";
                string StrStart = "";
                string StrEnd   = "";
                StrStart = dpStart.Text.ToString();
                StrEnd   = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();
                StrTitle = this.txtRoute.Text.ToString().Trim();

                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"));
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "STARTTIME >=@" + paras.Count().ToString();//开始时间
                        paras.Add(DtStart);
                        filter += " and ";
                        filter += "STARTTIME <=@" + paras.Count().ToString();//结束时间
                        paras.Add(DtEnd);
                    }
                }

                if (!string.IsNullOrEmpty(StrTitle))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "ROUTE ^@" + paras.Count().ToString();//类型名称
                    paras.Add(StrTitle);
                }
            }
            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            vehicleDispatchManager.Gets_VDRecordAsync(dataPager.PageIndex, dataPager.PageSize, "UPDATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
        }
Example #10
0
        private void LoadData()
        {
            int pageCount = 0;
            string filter = "";    //查询过滤条件
            ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>();   //参数值


            //filter += " OWNERID ==@" + paras.Count().ToString();
            //paras.Add(Common.CurrentLoginUserInfo.EmployeeID);
            
            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();           
            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                Utility.GetLoginUserInfo(loginUserInfo);
            }
            if (!string.IsNullOrEmpty(txtUptown.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += " houseInfoObj.UPTOWN ^@" + paras.Count().ToString();
                paras.Add(txtUptown.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtHouseName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += " houseInfoObj.HOUSENAME ^@" + paras.Count().ToString();
                paras.Add(txtHouseName.Text.Trim());
            }
            string StrStart = "";
            string StrEnd = "";
            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))
                    {
                        filter += " and ";
                    }
                    filter += " houseAppObj.CREATEDATE >=@" + paras.Count().ToString();
                    paras.Add(DtStart);
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " houseAppObj.CREATEDATE <=@" + paras.Count().ToString();
                    paras.Add(DtEnd);
                    
                    
                }
            }
            loadbar.Start();        
            client.GetHireAppListPagingByMemberAsync(dataPager.PageIndex, dataPager.PageSize, "houseAppObj.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
        }
        private void LoadData()
        {
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值


            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            if (string.IsNullOrEmpty(loginUserInfo.companyID))
            {
                //Utility.GetLoginUserInfo(loginUserInfo);
                loginUserInfo.companyID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                loginUserInfo.userID       = Common.CurrentLoginUserInfo.EmployeeID;
                loginUserInfo.departmentID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            }
            if (!string.IsNullOrEmpty(txtUptown.Text.Trim()))
            {
                filter += "houseInfoObj.UPTOWN^@" + paras.Count().ToString();
                paras.Add(txtUptown.Text.Trim());
            }
            if (!string.IsNullOrEmpty(txtHouseName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += "houseInfoObj.HOUSENAME^@" + paras.Count().ToString();
                paras.Add(txtHouseName.Text.Trim());
            }
            string StrStart = "";
            string StrEnd   = "";

            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))
                    {
                        filter += " and ";
                    }
                    filter += "houseAppObj.CREATEDATE >=@" + paras.Count().ToString();
                    paras.Add(DtStart);
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "houseAppObj.CREATEDATE <=@" + paras.Count().ToString();
                    paras.Add(DtEnd);
                }
            }
            loadbar.Start();
            //client.GetHireAppListPagingAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
            client.GetHireAppListPagingByHouseInfoOrListAsync(dataPager.PageIndex, dataPager.PageSize, "houseAppObj.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo);
        }
Example #12
0
        //加载数据
        private void GetData(int pageIndex)
        {
            loadbar.Start();
            int    pageCount = 0;
            string filter    = "";                                                                                    //查询过滤条件
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值

            if (IsQuery)
            {
                string StrContent        = "";
                string StrStart          = "";
                string StrEnd            = "";
                string StrConservateType = ((SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY)cmbConserVationName.SelectedItem).DICTIONARYNAME.ToString();
                StrStart = dpStart.Text.ToString();
                StrEnd   = dpEnd.Text.ToString();
                DateTime DtStart = new DateTime();
                DateTime DtEnd   = new DateTime();

                StrContent = this.txtConserVationContent.Text.ToString().Trim();

                if (!string.IsNullOrEmpty(StrStart) && string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("ENDTIMENOTNULL"));
                    loadbar.Stop();
                    return;
                }
                if (string.IsNullOrEmpty(StrStart) && !string.IsNullOrEmpty(StrEnd))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("STARTTIMENOTNULL"));
                    loadbar.Stop();
                    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"));
                        return;
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(filter))
                        {
                            filter += " and ";
                        }
                        filter += "REPAIRDATE >=@" + paras.Count().ToString();//开始时间
                        paras.Add(DtStart);
                        filter += " and ";
                        filter += "REPAIRDATE <=@" + paras.Count().ToString();//结束时间
                        paras.Add(DtEnd);
                    }
                }
                if (cmbConserVationName.SelectedIndex > 0)
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "CONSERVATYPE ==@" + paras.Count().ToString();//类型
                    paras.Add(StrConservateType);
                }

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

            SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOACommonAdminService.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            _VM.Get_VCRecordsAsync(pageIndex, dataPager.PageSize, "UPDATEDATE", filter, paras, pageCount, checkState, loginUserInfo);
        }