public async Task <List <QueryMasterListModel> > GetUnResolvedQuerysAsync(int customerId = 0) { List <QueryMasterListModel> list = QueryMasterListModel .ConvertQueryMasterToListModel(await queryContext.GetUnResolvedQueryOfCustomerAsync(customerId)); return(list); }
public async Task <List <QueryMasterListModel> > GetUnResolvedQuerysAsync(int deptId = 0) { List <QueryMasterListModel> list = QueryMasterListModel .ConvertQueryMasterToListModel(await queryContext.GetUnResolvedQuerysOfDeptAsync(deptId)); return(list); }
public async Task <IActionResult> GetRecentResolvedQuerysAsync(int customerId = 0) { if (customerId <= 0) { return(BadRequest("Customer ID can't be 0")); // 400 } List <QueryMasterListModel> list = QueryMasterListModel .ConvertQueryMasterToListModel(await queryContext.GetRecentResolvedQueryOfCustomerAsync(customerId)); foreach (QueryMasterListModel qm in list) { qm.isQuerySolutionRated = await surveyContext.IsQueryRated(qm.QueryId); } return(Ok(list)); }
public async Task <QueryMasterListModel> GetQueryDetailsAsync(int queryId) { if (!queryContext.ExistsQueryId(queryId)) { return(null); } QueryMaster qm = await queryContext.GetQueryMaster(queryId); QueryMasterListModel qlm = QueryMasterListModel.ConvertQueryMasterToListModel(qm); // Get if query is Rated by Customer or not qlm.isQuerySolutionRated = await queryContext.IsQueryRatedByCustomer(queryId); return(qlm); }