示例#1
0
        public IActionResult OnGet(int customerId)
        {
            Customer = _customerData.FindCustomerById(customerId);

            if (Customer != null)
            {
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Shared/_NotFound"));
            }
        }
示例#2
0
 public IActionResult OnGet(int customerId)
 {
     Customer = _customerData.FindCustomerById(customerId);
     if (Customer == null)
     {
         return(RedirectToPage("/Shared/_NotFound"));
     }
     else
     {
         Quotes  = _quoteData.GetQuotesByCustomerId(customerId);
         Message = MessageToDisplay(Quotes);
         return(Page());
     }
 }
示例#3
0
        public IActionResult OnGet(int customerId)
        {
            Titles   = _htmlHelper.GetEnumSelectList <TitleType>();
            Customer = _customerData.FindCustomerById(customerId);

            if (Customer != null)
            {
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Shared/_NotFound"));
            }
        }
示例#4
0
        public IActionResult OnGet(int quoteId)
        {
            Statuses = _htmlHelper.GetEnumSelectList <StatusType>();

            Quote = _quoteData.GetQuoteById(quoteId);
            if (Quote == null)
            {
                return(RedirectToPage("/Shared/_NotFound"));
            }

            Quote.Customer = _customerData.FindCustomerById(Quote.CustomerId);

            if (Quote.Customer == null)
            {
                return(RedirectToPage("/Shared/_NotFound"));
            }
            else
            {
                return(Page());
            }
        }