//検索処理 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); }
//検索処理 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; }