Exemple #1
0
        //検索処理
        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<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;
        }