//検索処理 private List <tblAgentAHT> SearchData(string pageIndex, string pageSize, string pageTotal, DateTime dtST, DateTime dtEnd, string vAgentID, bool isGroupBySkill) { AppLog.WriteLog("AHTController SearchData start"); List <tblAgentAHT> result = new List <tblAgentAHT>(); try { int currentPageIndex = m_CurPageIndex; int currentPageSize = m_CurrentPageSize; int.TryParse(pageIndex, out currentPageIndex); int.TryParse(pageSize, out currentPageSize); m_CurPageIndex = currentPageIndex; m_CurrentPageSize = currentPageSize; string strSortField = GetSortField(m_SortField); string strSort = AppFunction.GetSortDefine(m_Sort); ViewBag.vTenantID = this.TenantID; ViewBag.vTenantSpeciaFlag = this.TenantSpecialFlag; //ページを再計算する CalcPage(pageTotal); using (WFMDBDataContext db = new WFMDBDataContext()) { if (isGroupBySkill) { IMultipleResults results = db.uspWFMSearchAHTGroupBySkillPaged(m_CurPageIndex, m_CurrentPageSize, strSortField, strSort, this.TenantID, dtST, dtEnd, this.TenantSpecialFlag, vAgentID); result = results.GetResult <tblAgentAHT>().ToList(); tblDataPaged tblPage = results.GetResult <tblDataPaged>().FirstOrDefault(); m_TotalRowCount = tblPage.TotalRowCount; m_CurPageIndex = tblPage.CurPageIndex; m_TotlePageCount = tblPage.TotalPageCount; } else { IMultipleResults results = db.uspWFMSearchAHTGroupByAggregationPaged(m_CurPageIndex, m_CurrentPageSize, strSortField, strSort, this.TenantID, dtST, dtEnd, this.TenantSpecialFlag, vAgentID); result = results.GetResult <tblAgentAHT>().ToList(); tblDataPaged tblPage = results.GetResult <tblDataPaged>().FirstOrDefault(); m_TotalRowCount = tblPage.TotalRowCount; m_CurPageIndex = tblPage.CurPageIndex; m_TotlePageCount = tblPage.TotalPageCount; } } } catch (Exception ex) { AppLog.WriteLog("AHTController SearchData system error:" + ex.Message + ex.StackTrace); } return(result); }
//検索処理 private List <tblPedictionCall> SearchData(string pageIndex, string pageSize, string pageTotal, DateTime dtST, DateTime dtEnd, string dateType, string vSkillIDs, string vSkillAgregationIDs) { AppLog.WriteLog("CallReportController SearchData start"); List <tblPedictionCall> result = new List <tblPedictionCall>(); try { int currentPageIndex = m_CurPageIndex; int currentPageSize = m_CurrentPageSize; int.TryParse(pageIndex, out currentPageIndex); int.TryParse(pageSize, out currentPageSize); int isByAggregation = 0; m_CurPageIndex = currentPageIndex; m_CurrentPageSize = currentPageSize; string strSortField = GetSortField(m_SortField); string strSort = AppFunction.GetSortDefine(m_Sort); ViewBag.vTenantID = this.TenantID; ViewBag.vTenantSpeciaFlag = this.TenantSpecialFlag; if (ViewBag.RadioChecked == "byAgregation") { isByAggregation = 1; } //ページを再計算する CalcPage(pageTotal); AppLog.WriteLog("CallReportController SearchData db excute start"); using (WFMDBDataContext db = new WFMDBDataContext()) { IMultipleResults results = db.uspWFMRptOfRealAndPredictionInboundCall(m_CurPageIndex, m_CurrentPageSize, strSortField, strSort, this.TenantID, dtST, dtEnd, dateType, isByAggregation, vSkillIDs, vSkillAgregationIDs); result = results.GetResult <tblPedictionCall>().ToList(); tblDataPaged tblPage = results.GetResult <tblDataPaged>().FirstOrDefault(); m_TotalRowCount = tblPage.TotalRowCount; m_CurPageIndex = tblPage.CurPageIndex; m_TotlePageCount = tblPage.TotalPageCount; } } catch (Exception ex) { AppLog.WriteLog(ex.Message + ex.StackTrace); } return(result); }
//検索処理 private List <tblCallDetailV3> SearchData(string pageIndex, string pageSize, string pageTotal, DateTime dtST, DateTime dtEnd, string vCalleeid, string vCallerid, int skillID, int isessionprofileid, int iConntype, int iCompletedCall, int iQueCall, int iHasTransfer, int iHasACD, int iGroupID) { AppLog.WriteLog(string.Format("CallDetailController SearchData paramter is pageIndex:{0},pageSize:{1},pageTotal:{2},dtST:{3},dtEnd:{4},vCalleeid:{5},skillID:{6},groupid:{7}", pageIndex, pageSize, pageTotal, dtST.ToString(AppConst.Const_Format_YMDHMS) , dtEnd.ToString(AppConst.Const_Format_YMDHMS), vCalleeid, skillID.ToString(), iGroupID.ToString())); List <tblCallDetailV3> result = new List <tblCallDetailV3>(); int currentPageIndex = m_CurPageIndex; int currentPageSize = m_CurrentPageSize; int.TryParse(pageIndex, out currentPageIndex); int.TryParse(pageSize, out currentPageSize); m_CurPageIndex = currentPageIndex; m_CurrentPageSize = currentPageSize; string strSortField = GetSortField(m_SortField); string strSort = AppFunction.GetSortDefine(m_Sort); ViewBag.vTenantID = this.TenantID; ViewBag.vTenantSpeciaFlag = this.TenantSpecialFlag; //ページを再計算する CalcPage(pageTotal); using (WFMDBDataContext db = new WFMDBDataContext(string.Format(System.Configuration.ConfigurationManager.ConnectionStrings["SpecialConnection"].ConnectionString, DBServer))) { IMultipleResults results = db.uspWFMGetCallDetailV3(m_CurPageIndex, m_CurrentPageSize, strSortField, strSort, this.TenantID, dtST.ToString(AppConst.Const_Format_YMDHMS), dtEnd.ToString(AppConst.Const_Format_YMDHMS), skillID, vCalleeid, vCallerid, isessionprofileid, iConntype, iCompletedCall, iQueCall, iHasTransfer, iHasACD, iGroupID); result = results.GetResult <tblCallDetailV3>().ToList(); tblDataPaged tblPage = results.GetResult <tblDataPaged>().FirstOrDefault(); m_TotalRowCount = tblPage.TotalRowCount; m_CurPageIndex = tblPage.CurPageIndex; m_TotlePageCount = tblPage.TotalPageCount; } return(result); }
//検索処理 private List <tblAgentWeekShift> SearchData(string pageIndex, string pageSize, string pageTotal, DateTime currentDate, string vAgentID) { List <tblAgentWeekShift> result = new List <tblAgentWeekShift>(); int currentPageIndex = m_CurPageIndex; int currentPageSize = m_CurrentPageSize; int.TryParse(pageIndex, out currentPageIndex); int.TryParse(pageSize, out currentPageSize); m_CurPageIndex = currentPageIndex; m_CurrentPageSize = currentPageSize; string strSortField = GetSortField(m_SortField); string strSort = AppFunction.GetSortDefine(m_Sort); ViewBag.vTenantID = this.TenantID; ViewBag.vTenantSpeciaFlag = this.TenantSpecialFlag; ViewBag.currentDate = currentDate.ToString(AppConst.Const_Format_YMD); //ページを再計算する CalcPage(pageTotal); using (WFMDBDataContext db = new WFMDBDataContext()) { IMultipleResults results = db.uspWFMSearchShiftAgentPaged(m_CurPageIndex, m_CurrentPageSize, strSortField, strSort, this.TenantID, currentDate, this.TenantSpecialFlag, vAgentID); result = results.GetResult <tblAgentWeekShift>().ToList(); tblDataPaged tblPage = results.GetResult <tblDataPaged>().FirstOrDefault(); m_TotalRowCount = tblPage.TotalRowCount; m_CurPageIndex = tblPage.CurPageIndex; m_TotlePageCount = tblPage.TotalPageCount; } return(result); }
//検索処理 private List <tblAgentDetailV3> SearchData(string pageIndex, string pageSize, string pageTotal, DateTime dtST, DateTime dtEnd, string vLogin, int iAgentStatus) { List <tblAgentDetailV3> result = new List <tblAgentDetailV3>(); int currentPageIndex = m_CurPageIndex; int currentPageSize = m_CurrentPageSize; int.TryParse(pageIndex, out currentPageIndex); int.TryParse(pageSize, out currentPageSize); m_CurPageIndex = currentPageIndex; m_CurrentPageSize = currentPageSize; string strSortField = GetSortField(m_SortField); string strSort = AppFunction.GetSortDefine(m_Sort); ViewBag.vTenantID = this.TenantID; ViewBag.vTenantSpeciaFlag = this.TenantSpecialFlag; //ページを再計算する CalcPage(pageTotal); using (WFMDBDataContext db = new WFMDBDataContext(string.Format(System.Configuration.ConfigurationManager.ConnectionStrings["SpecialConnection"].ConnectionString, DBServer))) { IMultipleResults results = db.uspWFMGetAgentDetailV3(m_CurPageIndex, m_CurrentPageSize, strSortField, strSort, this.TenantID, dtST.ToString(AppConst.Const_Format_YMDHMS), dtEnd.ToString(AppConst.Const_Format_YMDHMS), vLogin, iAgentStatus); result = results.GetResult <tblAgentDetailV3>().ToList(); tblDataPaged tblPage = results.GetResult <tblDataPaged>().FirstOrDefault(); m_TotalRowCount = tblPage.TotalRowCount; m_CurPageIndex = tblPage.CurPageIndex; m_TotlePageCount = tblPage.TotalPageCount; } return(result); }