Exemplo n.º 1
0
        public void Get_Saved_Quotation_With_Status_Nominations()
        {
            //
            // Arrange
            QuoteSearch request = new QuoteSearch()
            {
                Email        = "*****@*****.**",
                SearchString = string.Empty,
                Status       = "NOMINATIONS",
                PageNo       = 1,
                List         = string.Empty
            };

            //
            // Act
            var response = _quotationService.GetOnlySavedQuotesOrTemplates(request);

            //
            // Assert
            Assert.NotNull(response);
        }
Exemplo n.º 2
0
        public dynamic GetSavedQuoteList([FromBody] QuoteSearch request)
        {
            try
            {
                ListSavedQuotesEntity lstSavedQuotes = new ListSavedQuotesEntity();

                if (string.IsNullOrEmpty(request.List))
                {
                    request.List = "QuoteList";
                }
                if (string.IsNullOrEmpty(request.Status))
                {
                    request.Status = "ACTIVE";
                }

                request.SearchString = string.IsNullOrEmpty(request.SearchString) ? request.SearchString : Convert.ToString(request.SearchString).ToUpper();
                //if (request.PageNo != 0) { pageno = Convert.ToInt32(request.PageNo); }

                //lstSavedQuotes.QuotesTabCount = _QuotationService.GetQuoteStatusCount(request.Email, Convert.ToString(request.SearchString).ToUpper(), request.Status);
                lstSavedQuotes.QuotesTabCount = _QuotationService.GetQuoteStatusCount(request);

                lstSavedQuotes.SavedQuotes = _QuotationService.GetOnlySavedQuotesOrTemplates(request);

                return(Ok(lstSavedQuotes));
            }
            catch (Exception ex)
            {
                return(ex);
                //LogError("api/Quotation", "GetSavedQuoteList", ex.Message.ToString(), ex.StackTrace.ToString());
                //return new HttpResponseMessage()
                //{
                //    Content = new JsonContent(new
                //    {
                //        StatusCode = HttpStatusCode.ExpectationFailed,
                //        Message = ex.Message.ToString()
                //    })
                //};
            }
        }