public ActionResult WPCommonOfBuildEventCode(int currentPage = 1, WPCommonOfBuildEventCodeVM viewModel = null) { log.Info(string.Format("{0}: WPCommonOfBuildEventCode", Framework.LoggingOptions.UI_Process_Started.ToString())); Framework.EntityContracts.ViewModelBase <MSBuildLogsExtended.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaCommonFlatten> vmFromTempData; if (TempData.ContainsKey(TempDataKey_WPCommonOfBuildEventCode)) { vmFromTempData = (Framework.EntityContracts.ViewModelBase <MSBuildLogsExtended.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaCommonFlatten>)TempData[TempDataKey_WPCommonOfBuildEventCode]; } else { vmFromTempData = null; } viewModel.PopulateAllUIElements(vmFromTempData, currentPage); //viewModel.Criteria.LowerBoundCreatedDateTimeCommonOftOfCommon = string.IsNullOrWhiteSpace(lowerBoundCreatedDateTimeCommonOftOfCommon) ? DateTime.MinValue : Framework.DateTimePeriodHelper.ParseDateTime(lowerBoundCreatedDateTimeCommonOftOfCommon); viewModel.Criteria.UpperBoundCreatedDateTimeCommonOftOfCommon = string.IsNullOrWhiteSpace(upperBoundCreatedDateTimeCommonOftOfCommon) ? DateTime.MinValue : Framework.DateTimePeriodHelper.ParseDateTime(upperBoundCreatedDateTimeCommonOftOfCommon); var searchResult = MSBuildLogsExtended.CommonBLLIoC.IoCBuildEventCode.GetMessageOfEntityOfCommon( new MSBuildLogsExtended.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaCommon(viewModel.Criteria) , viewModel.QueryPagingSetting , viewModel.QueryOrderBySettingCollection); viewModel.StatusOfResult = searchResult.BusinessLogicLayerResponseStatus; if (viewModel.StatusOfResult == Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK) { viewModel.Result = searchResult.Message; if (searchResult.QueryPagingResult != null) { viewModel.QueryPagingSetting.CountOfRecords = searchResult.QueryPagingResult.CountOfRecords; viewModel.QueryPagingSetting.RecordCountOfCurrentPage = searchResult.QueryPagingResult.RecordCountOfCurrentPage; } TempData[TempDataKey_WPCommonOfBuildEventCode] = viewModel.GetPrimaryInformationEntity(); TempData.Keep(TempDataKey_WPCommonOfBuildEventCode); ViewBag.StaticPagedResult = new PagedList.StaticPagedList <MSBuildLogsExtended.DataSourceEntities.BuildEventCode>(searchResult.Message, currentPage, searchResult.QueryPagingResult.PageSize, searchResult.QueryPagingResult.CountOfRecords); } else { viewModel.StatusMessageOfResult = searchResult.GetStatusMessage(); #if DEBUG viewModel.StatusMessageOfResult = string.Format("{0} {1}", viewModel.StatusMessageOfResult, searchResult.ServerErrorMessage); #endif } if (viewModel.Result != null) { ViewBag.StaticPagedResult = new PagedList.StaticPagedList <MSBuildLogsExtended.DataSourceEntities.BuildEventCode>(viewModel.Result, viewModel.QueryPagingSetting.CurrentPage, viewModel.QueryPagingSetting.PageSize, viewModel.QueryPagingSetting.CountOfRecords); } viewModel.ContentData.Title = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildEventCode.BuildEventCode; viewModel.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildEventCode.Description; return(View(viewModel)); }
public ActionResult WPCommonOfBuildEventCode(int currentPage = 1 , WPCommonOfBuildEventCodeVM viewModel = null) { log.Info(string.Format("{0}: WPCommonOfBuildEventCode", Framework.LoggingOptions.UI_Process_Started.ToString())); Framework.EntityContracts.ViewModelBase<MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerChainedQueryCriteriaEntityBuildEventCodeCommonFlatten> vmFromTempData; if (TempData.ContainsKey(TempDataKey_WPCommonOfBuildEventCode)) { vmFromTempData = (Framework.EntityContracts.ViewModelBase<MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerChainedQueryCriteriaEntityBuildEventCodeCommonFlatten>)TempData[TempDataKey_WPCommonOfBuildEventCode]; } else { vmFromTempData = null; } viewModel.PopulateAllUIElements(vmFromTempData, currentPage); //viewModel.Criteria.LowerBoundCreatedDateTimeCommonOftOfCommon = string.IsNullOrWhiteSpace(lowerBoundCreatedDateTimeCommonOftOfCommon) ? DateTime.MinValue : Framework.DateTimePeriodHelper.ParseDateTime(lowerBoundCreatedDateTimeCommonOftOfCommon); viewModel.Criteria.UpperBoundCreatedDateTimeCommonOftOfCommon = string.IsNullOrWhiteSpace(upperBoundCreatedDateTimeCommonOftOfCommon) ? DateTime.MinValue : Framework.DateTimePeriodHelper.ParseDateTime(upperBoundCreatedDateTimeCommonOftOfCommon); var searchResult = MSBuildLogsExtended.CommonBLLIoC.BusinessLogicLayerEntityStaticBuildEventCode.GetMessageOfEntityOfCommon( new MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerChainedQueryCriteriaEntityBuildEventCodeCommon(viewModel.Criteria) , viewModel.QueryPagingSetting , viewModel.QueryOrderBySettingCollection); viewModel.StatusOfResult = searchResult.BusinessLogicLayerResponseStatus; if (viewModel.StatusOfResult == Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK) { viewModel.Result = searchResult.Message; if (searchResult.QueryPagingResult != null) { viewModel.QueryPagingSetting.CountOfRecords = searchResult.QueryPagingResult.CountOfRecords; viewModel.QueryPagingSetting.RecordCountOfCurrentPage = searchResult.QueryPagingResult.RecordCountOfCurrentPage; } TempData[TempDataKey_WPCommonOfBuildEventCode] = viewModel.GetPrimaryInformationEntity(); TempData.Keep(TempDataKey_WPCommonOfBuildEventCode); } else { viewModel.StatusMessageOfResult = searchResult.GetStatusMessage(); #if DEBUG viewModel.StatusMessageOfResult = string.Format("{0} {1}", viewModel.StatusMessageOfResult, searchResult.ServerErrorMessage); #endif } return View(viewModel); }
public ActionResult WPCommonOfBuildEventCode(int currentPage = 1, WPCommonOfBuildEventCodeVM viewModel = null) { log.Info(string.Format("{0}: WPCommonOfBuildEventCode", Framework.LoggingOptions.UI_Process_Started.ToString())); Framework.ViewModels.ViewModelBase <MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaCommon> vmFromTempData; if (TempData.ContainsKey(TempDataKey_WPCommonOfBuildEventCode)) { vmFromTempData = (Framework.ViewModels.ViewModelBase <MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaCommon>)TempData[TempDataKey_WPCommonOfBuildEventCode]; } else { vmFromTempData = null; } viewModel.PopulateAllUIElements(vmFromTempData, currentPage); viewModel.LoadData(true); if (viewModel.StatusOfResult == Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK) { TempData[TempDataKey_WPCommonOfBuildEventCode] = viewModel.GetPrimaryInformationEntity(); TempData.Keep(TempDataKey_WPCommonOfBuildEventCode); } // else // { // viewModel.StatusMessageOfResult = searchResult.GetStatusMessage(); //#if DEBUG // viewModel.StatusMessageOfResult = string.Format("{0} {1}", viewModel.StatusMessageOfResult, searchResult.ServerErrorMessage); //#endif // } if (viewModel.Result != null) { ViewBag.StaticPagedResult = new PagedList.StaticPagedList <MSBuildExtensionPack.DataSourceEntities.BuildEventCode>(viewModel.Result, viewModel.QueryPagingSetting.CurrentPage, viewModel.QueryPagingSetting.PageSize, viewModel.QueryPagingSetting.CountOfRecords); } viewModel.ContentData.Title = MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.BuildEventCode; viewModel.ContentData.Summary = MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.Description; return(View(viewModel)); }