public ResponseModel ReportSearch([FromBody] StoreReportModel SearchParams) { ResponseModel objResponseModel = new ResponseModel(); int StatusCode = 0; string statusMessage = ""; int resultCount = 0; StoreReportCaller dbsearchMaster = new StoreReportCaller(); List <StoreUserListing> StoreUserList = new List <StoreUserListing>(); try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); SearchParams.TenantID = authenticate.TenantId; // add tenantID to request // searchparams.curentUserId = authenticate.UserMasterID; // add currentUserID to request StoreUserList = new StoreUserService(_connectioSting).GetStoreUserList(authenticate.TenantId); resultCount = dbsearchMaster.StoreReportSearch(new StoreReportService(_connectioSting), SearchParams, StoreUserList); StatusCode = resultCount > 0 ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.RecordNotFound; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)StatusCode); objResponseModel.Status = true; objResponseModel.StatusCode = StatusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = resultCount; } catch (Exception) { throw; } return(objResponseModel); }
public void GetStoreScheduleDetails(string ConString) { try { exceptions.FileText("Step BAL 1 Start"); List <TicketScheduleModal> ListTicketScheduleModal = new List <TicketScheduleModal>(); ListTicketScheduleModal = getdata.getStoreScheduleDetails(ConString); if (ListTicketScheduleModal.Count > 0) { for (int i = 0; i < ListTicketScheduleModal.Count; i++) { if (!String.IsNullOrEmpty(ListTicketScheduleModal[i].SearchInputParams)) { StoreReportModel searchparams = new StoreReportModel(); searchparams = JsonConvert.DeserializeObject <StoreReportModel>(ListTicketScheduleModal[i].SearchInputParams); searchparams.TenantID = ListTicketScheduleModal[i].TenantID; ListTicketScheduleModal[i].SearchOutputFileName = GetStoreReportSearch(searchparams, ListTicketScheduleModal[i].CreatedBy, ListTicketScheduleModal[i].TenantID, ConString); ListTicketScheduleModal[i].Alert_TypeID = 1; ListTicketScheduleModal[i].SMTPDetails = getdata.GetSMTPDetails(ListTicketScheduleModal[i].TenantID, ConString); getdata.GetSoreMailContent(ListTicketScheduleModal[i]); } } } if (ListTicketScheduleModal.Count > 0) { for (int i = 0; i < ListTicketScheduleModal.Count; i++) { if (!String.IsNullOrEmpty(ListTicketScheduleModal[i].SearchInputParams)) { Task t = ProcessToSendMail(ListTicketScheduleModal[i]); t.Wait(); } } } exceptions.FileText("Step BAL 1 End"); } catch (Exception ex) { exceptions.SendErrorToText(ex); } }
private string GetStoreReportSearch(StoreReportModel searchModel, int CreatedBy, int TenantID, string ConString) { SearchStoreResponseReport _searchResult = null; string SearchOutputFileName = null; List <SearchStoreTaskReportResponse> TaskReport = new List <SearchStoreTaskReportResponse>(); List <SearchStoreClaimReportResponse> ClaimReport = new List <SearchStoreClaimReportResponse>(); List <SearchStoreCampaignReportResponse> CampaignReport = new List <SearchStoreCampaignReportResponse>(); try { exceptions.FileText("Step BAL 9 Start"); _searchResult = getdata.GetStoreReportSearch(searchModel, ConString); if (searchModel.ActiveTabId.Equals(1)) { TaskReport = _searchResult.TaskReport; SearchOutputFileName = StoreReportCreateExcel(TaskReport, CreatedBy, TenantID, "StoreReportTask"); } else if (searchModel.ActiveTabId.Equals(2)) { ClaimReport = _searchResult.ClaimReport; SearchOutputFileName = StoreReportCreateExcel(ClaimReport, CreatedBy, TenantID, "StoreReportClaim"); } else { CampaignReport = _searchResult.CampaignReport; SearchOutputFileName = StoreReportCreateExcel(CampaignReport, CreatedBy, TenantID, "StoreReportCampaign"); } exceptions.FileText("Step BAL 9 End"); } catch (Exception ex) { exceptions.SendErrorToText(ex); } return(SearchOutputFileName); }
public int StoreReportSearch(IStoreReport Report, StoreReportModel searchModel, List <StoreUserListing> StoreUserList) { _Reports = Report; return(_Reports.GetStoreReportSearch(searchModel, StoreUserList)); }