Esempio n. 1
0
        public List <SearchFeedbackStatusCountDTO> SearchFeedbackStatusCount(FeedbackCountSearchDTO feedbackCountSearch, long?userID, int roleID)
        {
            FeedbackCountSearch objFeedback = new FeedbackCountSearch();

            ObjectMapper.Map(feedbackCountSearch, objFeedback);

            List <SearchFeedbackStatusCountDTO> result = new List <SearchFeedbackStatusCountDTO>();

            ObjectMapper.Map(FeedbackRepository.SearchFeedbackStatusCount(objFeedback, userID, roleID), result);
            return(result);
        }
Esempio n. 2
0
        public JsonResponse <SearchFeedbackStatusCountDTO> SearchFeedbackStatusCount(FeedbackCountSearchDTO feedbackCountSearch, long?userID, int roleID)
        {
            JsonResponse <SearchFeedbackStatusCountDTO> response = new JsonResponse <SearchFeedbackStatusCountDTO>();

            try
            {
                ExceptionEngine.AppExceptionManager.Process(() =>
                {
                    response.Result    = FeedbackBusinessInstance.SearchFeedbackStatusCount(feedbackCountSearch, userID, roleID);
                    response.IsSuccess = true;
                }, AspectEnums.ExceptionPolicyName.ServiceExceptionPolicy.ToString());
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;
            }
            return(response);
        }
Esempio n. 3
0
        public JsonResponse <FeedbackSearchResultOutputDTO> SearchFeedbacks(FeedbackSearchDTO searchFeedBacks, int storeID, long userID)
        {
            JsonResponse <FeedbackSearchResultOutputDTO> response = new JsonResponse <FeedbackSearchResultOutputDTO>();

            try
            {
                ExceptionEngine.AppExceptionManager.Process(() =>
                {
                    bool HasMoreRows = false;
                    FeedbackSearchResultOutputDTO output = new FeedbackSearchResultOutputDTO();
                    output.FeedbacksearchList            = FeedbackBusinessInstance.SearchFeedbacks(searchFeedBacks, storeID, userID, out HasMoreRows);

                    FeedbackCountSearchDTO inputStatuCount = new FeedbackCountSearchDTO()
                    {
                        FeedbackCatIDs  = searchFeedBacks.FeedbackCatIDs,
                        FeedbackTeamIDs = searchFeedBacks.FeedbackTeamIDs,
                        FeedbackTypeIDs = searchFeedBacks.FeedbackTypeIDs
                    };
                    List <SearchFeedbackStatusCountDTO> FeedbackStatusCountList = FeedbackBusinessInstance.SearchFeedbackStatusCount(inputStatuCount, userID, 0);
                    StringBuilder data = new StringBuilder();;
                    FeedbackStatusCountList.ForEach(k => data.Append(k.FeedbackStatusName.Trim() + " (" + k.FeedbackCount + "),"));
                    //string ss= string.Join("," FeedbackStatusCountList.Select(k=>new { Status=k.FeedbackStatusName+" ("+k.FeedbackCount+")"}).ToArray() );
                    // output.SearchFeedbackStatusCountList = FeedbackBusinessInstance.SearchFeedbackStatusCount(inputStatuCount, userID, 0);
                    output.StatusCountStr = data.ToString().TrimEnd(',');
                    output.HasMoreRows    = HasMoreRows;
                    response.SingleResult = output;

                    response.IsSuccess = true;
                }, AspectEnums.ExceptionPolicyName.ServiceExceptionPolicy.ToString());
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;
            }
            return(response);
        }