public IList <JioListServiceResponse> ListServiceRequest(string partyID) { var clientRequest = new CustomerProblemManagement.listCustomerProblemRequest(); clientRequest.customer.partyId = partyID; var client = new CustomerProblemManagement.CustomerProblemManagementV2dot7Client(); var listProblem = client.listCustomerProblem(clientRequest); List <JioListServiceResponse> responselist = new List <JioListServiceResponse>(); JioListServiceResponse jiolistResponse = null; if (listProblem != null && listProblem.customerProblem != null) { foreach (var problem in listProblem.customerProblem) { jiolistResponse = new JioListServiceResponse() { Category = problem.category, Remarks = problem.reason, SubCategory = problem.subCategory, SubSubCategory = problem.subCategoryDescription, Status = problem.statusDescription, ResolvedDate = problem.TroubleTicket != null ? problem.TroubleTicket.serviceRestoredDate : default(DateTime?), CreationDate = problem.customerProblemDateTime ?? default(DateTime?) }; responselist.Add(jiolistResponse); } } return(responselist); }
public IHttpActionResult GetSRListByJioNumber([FromUri] string jioNumber) { JioListServiceResponse jioListServiceResponse = default(JioListServiceResponse); jioListServiceResponse = JioFactorySingleton.Instance.JioServiceFacade.GetSRListByJioNumber(jioNumber); if (jioListServiceResponse == null) { return(NotFound()); } return(Ok <JioListServiceResponse>(jioListServiceResponse)); }
public override JioListServiceResponse GetSRListByJioNumber(string jioNumber) { try { IList <JioListServiceResponse> jioListSrvResponse = default(List <JioListServiceResponse>); JioListServiceResponse jioSrvcResponse = default(JioListServiceResponse); JioCustomer jioCustomer = _jioManagerFactory.CustService.GetJioCustomerByJioNumber(jioNumber); if (jioCustomer != null && !string.IsNullOrEmpty(jioCustomer.PartyID)) { jioListSrvResponse = _jioManagerFactory.SrService.ListServiceRequest(jioCustomer.PartyID); } if (jioListSrvResponse != null) { jioSrvcResponse = jioListSrvResponse.OrderByDescending(x => x.CreationDate).FirstOrDefault(); } return(jioSrvcResponse); } catch (Exception ex) { throw ex; } }