/// <summary> /// 地区分类 /// </summary> private void LoadArea() { SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; int pageCount = 0; string filter = ""; //查询过滤条件 System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>(); //参数值 //filter += "OWNERCOMPANYID ^@" + paras.Count().ToString(); //paras.Add(loginUserInfo.companyID); this.RefreshUI(RefreshedTypes.ShowProgressBar); if (cmbSolution.SelectedItem != null) { T_OA_TRAVELSOLUTIONS travelObjs = cmbSolution.SelectedItem as T_OA_TRAVELSOLUTIONS; if (travelObjs != null) { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX ascending", filter, paras, pageCount, loginUserInfo.companyID, travelObjs.TRAVELSOLUTIONSID); } } else { Utility.ShowCustomMessage(MessageTypes.Caution, "提示", "请先选择有效的出差方案"); //client.GetAreaWithPagingAsync(1, 100, "AREAINDEX ascending", filter, paras, pageCount, loginUserInfo.companyID, null); } }
/// <summary> /// 加载地区分类 /// </summary> private void LoadArea() { SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; int pageCount = 0; string filter = ""; System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>(); filter = null; //if (currentArea != null && isRefresh == false) //{ // filter += " && T_OA_AREADIFFERENCE.T_OA_TRAVELSOLUTIONS.TRAVELSOLUTIONSID==@" + paras.Count().ToString(); // paras.Add(solutionsObj.TRAVELSOLUTIONSID); //} //else //{ // isRefresh = false; // currentArea = null; //} if (cmbSolution.SelectedIndex > 0) { T_OA_TRAVELSOLUTIONS travelObjs = cmbSolution.SelectedItem as T_OA_TRAVELSOLUTIONS; if (travelObjs != null) { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX", filter, paras, pageCount, loginUserInfo.companyID, travelObjs.TRAVELSOLUTIONSID); } } else { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX", filter, paras, pageCount, loginUserInfo.companyID, null); } }
private void LoadData() { loadbar.Start(); //打开转动动画 int pageCount = 0; string filter = ""; //查询过滤条件 ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值 if (!string.IsNullOrEmpty(txtNoClaims.Text.Trim())) //报销单号 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "NoClaims =@" + paras.Count().ToString(); paras.Add(txtNoClaims.Text.Trim()); } if (!string.IsNullOrEmpty(SearchUserID))//出差人 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "Travelmanagement.OWNERID =@" + paras.Count().ToString(); paras.Add(SearchUserID); } //if (!string.IsNullOrEmpty(postId))//岗位ID //{ // if (!string.IsNullOrEmpty(filter)) // { // filter += " and "; // } // filter += "Travelmanagement.OWNERPOSTID =@" + paras.Count().ToString(); // paras.Add(postId); //} if (!string.IsNullOrEmpty(StartTime.Text.Trim()))//开始时间 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "Travelmanagement.CREATEDATE >=@" + paras.Count().ToString(); paras.Add(DateTime.Parse(StartTime.Text.Trim())); } if (!string.IsNullOrEmpty(EndTime.Text.Trim()))//结束时间 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "Travelmanagement.CREATEDATE <=@" + paras.Count().ToString(); paras.Add(DateTime.Parse(EndTime.Text.Trim())); } SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; Travelmanagement.GetTravelmanagementListByUserIdAsync(dpGrid.PageIndex, dpGrid.PageSize, "Travelmanagement.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo); }
void LoadSolutionInfos() { int pageCount = 0; string filter = ""; //查询过滤条件 ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值 SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; client.GetTravelSolutionFlowAsync(0, 100, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo); }
/// <summary> /// 加载地区分类 /// </summary> private void LoadArea() { SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; int pageCount = 0; string filter = ""; System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>(); filter = null; if (cmbSolution.SelectedItem != null) { T_OA_TRAVELSOLUTIONS travelObjs = cmbSolution.SelectedItem as T_OA_TRAVELSOLUTIONS; if (travelObjs != null) { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX", filter, paras, pageCount, loginUserInfo.companyID, travelObjs.TRAVELSOLUTIONSID); } } }
void LoadSolutionInfos() { int pageCount = 0; string filter = ""; //查询过滤条件 ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //参数值 SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; client.GetTravelSolutionFlowAsync(0, 100, "CREATEDATE descending", filter, paras, pageCount, loginUserInfo); }
void LoadOrderMealInfos(string StrUserID, string StrState) { //OrderMealClient.GetOrderMealInfosCompleted +=new EventHandler<GetOrderMealInfosCompletedEventArgs>(OrderMealClient_GetOrderMealInfosCompleted); //OrderMealClient.GetOrderMealInfosAsync(tmpStrUserID,StrState); string StrTitle = ""; int pageCount = 0; string filter = ""; //查询过滤条件 string StrContent = ""; string StrStart = ""; string StrEnd = ""; StrTitle = txtOrderMealTitle.Text.Trim().ToString(); StrContent = txtContent.Text.Trim().ToString(); StrStart = dpStart.Text.ToString(); StrEnd = dpEnd.Text.ToString(); DateTime DtStart = new DateTime(); DateTime DtEnd = new DateTime(); ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //参数值 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; } } if (!string.IsNullOrEmpty(StrState)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "ORDERMEALFLAG ^@" + paras.Count().ToString();//类型名称 paras.Add(StrState); } if (!string.IsNullOrEmpty(StrTitle)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "ORDERMEALTITLE ^@" + paras.Count().ToString();//类型名称 paras.Add(StrTitle); } if (!string.IsNullOrEmpty(StrContent)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "CONTENT ^@" + paras.Count().ToString();//类型名称 paras.Add(StrContent); } SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; OrderMealClient.GetOrderMealInfosListByTitleTimeSearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE", filter, paras, pageCount, loginUserInfo); }
private void LoadData() { loadbar.Start();//打开转动动画 int pageCount = 0; string filter = ""; //查询过滤条件 ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //参数值 if (!string.IsNullOrEmpty(txtNoClaims.Text.Trim()))//报销单号 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "NoClaims =@" + paras.Count().ToString(); paras.Add(txtNoClaims.Text.Trim()); } if (!string.IsNullOrEmpty(SearchUserID))//出差人 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "Travelmanagement.OWNERID =@" + paras.Count().ToString(); paras.Add(SearchUserID); } //if (!string.IsNullOrEmpty(postId))//岗位ID //{ // if (!string.IsNullOrEmpty(filter)) // { // filter += " and "; // } // filter += "Travelmanagement.OWNERPOSTID =@" + paras.Count().ToString(); // paras.Add(postId); //} if (!string.IsNullOrEmpty(StartTime.Text.Trim()))//开始时间 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "Travelmanagement.CREATEDATE >=@" + paras.Count().ToString(); paras.Add(DateTime.Parse(StartTime.Text.Trim())); } if (!string.IsNullOrEmpty(EndTime.Text.Trim()))//结束时间 { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "Travelmanagement.CREATEDATE <=@" + paras.Count().ToString(); paras.Add(DateTime.Parse(EndTime.Text.Trim())); } SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; Travelmanagement.GetTravelmanagementListByUserIdAsync(dpGrid.PageIndex, dpGrid.PageSize, "Travelmanagement.CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo); }
void LoadOrderMealInfos(string StrUserID, string StrState) { string StrTitle = ""; //string StrType = ""; string StrDepartment = ""; string StrContent = ""; string filter = ""; string StrStart = ""; string StrEnd = ""; int pageCount = 0; ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值 StrTitle = txtOrderMealTitle.Text.Trim().ToString(); StrContent = txtContent.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)) { 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")); return; } } if (!string.IsNullOrEmpty(StrState)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "ORDERMEALFLAG ^@" + paras.Count().ToString();//类型名称 paras.Add(StrState); } if (!string.IsNullOrEmpty(StrTitle)) { if (filter != "") { filter += " and "; } filter += "ORDERMEALTITLE ^@" + paras.Count().ToString();//类型名称 paras.Add(StrTitle); } if (!string.IsNullOrEmpty(StrContent)) { if (filter != "") { filter += " and "; } filter += "CONTENT ^@" + paras.Count().ToString();//类型名称 paras.Add(StrContent); } SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; loadbar.Start(); OrderMealClient.GetOrderMealInfosListByTitleTimeSearchAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE", filter, paras, pageCount, loginUserInfo); }
/// <summary> /// 获取数据 /// </summary> /// <param name="userID"></param> /// <param name="selDateTime"></param> private void GetData() { int pageCount = 0; string filter = ""; //查询过滤条件 string StrStart = this.dpStart.Text.Trim().ToString(); string StrEnd = this.dpEnd.Text.Trim().ToString(); ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //参数值 if (!string.IsNullOrEmpty(txtTitle.Text.Trim())) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "@" + paras.Count().ToString() + ".Contains(APPROVALTITLE) "; paras.Add(txtTitle.Text.Trim()); } //if (!string.IsNullOrEmpty(txtCode.Text.Trim())) //{ // if (!string.IsNullOrEmpty(filter)) // { // filter += " and "; // } // filter += "@" + paras.Count().ToString() + ".Contains(APPROVALCODE) "; // //paras.Add(txtCode.Text.Trim()); //} 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 (!string.IsNullOrEmpty(SearchCompanyID)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "OWNERCOMPANYID =@" + paras.Count().ToString(); paras.Add(SearchCompanyID); } 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 { 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); } } try { loadbar.Start(); SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; OaPersonOfficeClient.GetApporvalTempletListAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo); } catch (Exception ex) { loadbar.Stop(); } }
/// <summary> /// 地区分类 /// </summary> private void LoadArea() { SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; int pageCount = 0; string filter = ""; //查询过滤条件 System.Collections.ObjectModel.ObservableCollection<string> paras = new System.Collections.ObjectModel.ObservableCollection<string>();//参数值 //filter += "OWNERCOMPANYID ^@" + paras.Count().ToString(); //paras.Add(loginUserInfo.companyID); this.RefreshUI(RefreshedTypes.ShowProgressBar); if (cmbSolution.SelectedItem!=null) { T_OA_TRAVELSOLUTIONS travelObjs = cmbSolution.SelectedItem as T_OA_TRAVELSOLUTIONS; if (travelObjs != null) { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX ascending", filter, paras, pageCount, loginUserInfo.companyID, travelObjs.TRAVELSOLUTIONSID); } } else { Utility.ShowCustomMessage(MessageTypes.Caution, "提示", "请先选择有效的出差方案"); //client.GetAreaWithPagingAsync(1, 100, "AREAINDEX ascending", filter, paras, pageCount, loginUserInfo.companyID, null); } }
/// <summary> /// 加载地区分类 /// </summary> private void LoadArea() { SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; int pageCount = 0; string filter = ""; System.Collections.ObjectModel.ObservableCollection<string> paras = new System.Collections.ObjectModel.ObservableCollection<string>(); filter = null; //if (currentArea != null && isRefresh == false) //{ // filter += " && T_OA_AREADIFFERENCE.T_OA_TRAVELSOLUTIONS.TRAVELSOLUTIONSID==@" + paras.Count().ToString(); // paras.Add(solutionsObj.TRAVELSOLUTIONSID); //} //else //{ // isRefresh = false; // currentArea = null; //} if (cmbSolution.SelectedIndex > 0) { T_OA_TRAVELSOLUTIONS travelObjs = cmbSolution.SelectedItem as T_OA_TRAVELSOLUTIONS; if (travelObjs != null) { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX", filter, paras, pageCount, loginUserInfo.companyID, travelObjs.TRAVELSOLUTIONSID); } } else { client.GetAreaWithPagingAsync(1, 100, "AREAINDEX", filter, paras, pageCount, loginUserInfo.companyID, null); } }
/// <summary> /// 获取数据 /// </summary> /// <param name="userID"></param> /// <param name="selDateTime"></param> private void GetData() { int pageCount = 0; string filter = ""; //查询过滤条件 string StrStart = this.dpStart.Text.Trim().ToString(); string StrEnd = this.dpEnd.Text.Trim().ToString(); ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>(); //参数值 if (!string.IsNullOrEmpty(txtTitle.Text.Trim())) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "@" + paras.Count().ToString() + ".Contains(APPROVALTITLE) "; paras.Add(txtTitle.Text.Trim()); } //if (!string.IsNullOrEmpty(txtCode.Text.Trim())) //{ // if (!string.IsNullOrEmpty(filter)) // { // filter += " and "; // } // filter += "@" + paras.Count().ToString() + ".Contains(APPROVALCODE) "; // //paras.Add(txtCode.Text.Trim()); //} 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 (!string.IsNullOrEmpty(SearchCompanyID)) { if (!string.IsNullOrEmpty(filter)) { filter += " and "; } filter += "OWNERCOMPANYID =@" + paras.Count().ToString(); paras.Add(SearchCompanyID); } 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 { 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); } } try { loadbar.Start(); SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo loginUserInfo = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.LoginUserInfo(); loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; loginUserInfo.userID = Common.CurrentLoginUserInfo.EmployeeID; OaPersonOfficeClient.GetApporvalTempletListAsync(dataPager.PageIndex, dataPager.PageSize, "CREATEDATE descending", filter, paras, pageCount, checkState, loginUserInfo); } catch (Exception ex) { loadbar.Stop(); } }