Exemplo n.º 1
0
        public async Task <List <QueryMasterListModel> > GetUnResolvedQuerysAsync(int customerId = 0)
        {
            List <QueryMasterListModel> list = QueryMasterListModel
                                               .ConvertQueryMasterToListModel(await queryContext.GetUnResolvedQueryOfCustomerAsync(customerId));

            return(list);
        }
Exemplo n.º 2
0
        public async Task <List <QueryMasterListModel> > GetUnResolvedQuerysAsync(int deptId = 0)
        {
            List <QueryMasterListModel> list = QueryMasterListModel
                                               .ConvertQueryMasterToListModel(await queryContext.GetUnResolvedQuerysOfDeptAsync(deptId));

            return(list);
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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);
        }