Example #1
0
        public async Task<IHttpActionResult> GetUnReviewedClientsCnt1(string searchText = "")
        {
            string companyId = User.Identity.GetUserId();
            UnreviewedClientsCountDto unreviewedClientsCountDto = new UnreviewedClientsCountDto
            {
                Count = this.crmManagerService.GetUnReviewdClientsCount(companyId, searchText)
            };

            return this.Ok(unreviewedClientsCountDto);
        }
Example #2
0
        public async Task<IHttpActionResult> GetUnReviewedClientsCnt()
        {
            string companyId = User.Identity.GetUserId();
            List<UserResultModel> lstUserResultModel = new List<UserResultModel>();
            UnreviewedClientsCountDto unreviewedClientsCountDto = new UnreviewedClientsCountDto();
            List<VTigerPotential> lst = this.crmManagerService.GetUnReviewdClients(companyId, 1, int.MaxValue);
            int count = 0;

            foreach (var item in lst)
            {
                UserResultModel userResultModel = new UserResultModel();
                string userId = this.userService.GetContactByCrmId(item.contact_id).Id;

                if (userId != null)
                {
                    count++;
                }
            }

            unreviewedClientsCountDto.Count = count;
            return this.Ok(unreviewedClientsCountDto);
        }