public async Task <IActionResult> OnGetAsync(int?id) { this.id = id; if (id == null) { return(NotFound()); } DeskQuote = await _context.DeskQuote .Include(d => d.Desk) .Include(d => d.RushOption).FirstOrDefaultAsync(m => m.DeskQuoteId == id); if (DeskQuote == null) { return(NotFound()); } ViewData["DeskId"] = new SelectList(_context.Set <Desk>(), "DeskId", "DeskId"); ViewData["RushOptionId"] = new SelectList(_context.Set <RushOption>(), "RushOptionId", "RushOptionName"); ViewData["NumDrawersId"] = new SelectList(_context.Set <NumDrawers>(), "NumDrawersId", "NumberOfDrawers"); ViewData["SurfaceMaterialId"] = new SelectList(_context.Set <SurfaceMaterial>(), "SurfaceMaterialId", "SurfaceMaterialName"); //ViewData["DeskQuote"] = new SelectList(_context.Set<Desk>(), "Depth", "Depth"); // ViewData["DeskQuote"] = new SelectList(_context.Set<Desk>(), "Width", "Width"); return(Page()); }
public IActionResult OnGet() { //ViewData["DeskId"] = new SelectList(_context.Set<Desk>(), "DeskId", "DeskId"); ViewData["DeliveryId"] = new SelectList(_context.Set <Delivery>(), "DeliveryId", "DeliveryName"); ViewData["DesktopMaterialId"] = new SelectList(_context.Set <DesktopMaterial>(), "DesktopMaterialId", "MaterialName"); return(Page()); }
public IActionResult OnGet() { //ViewData["DeskId"] = new SelectList(_context.Set<Desk>(), "DeskId", "DeskId"); ViewData["RushOptionId"] = new SelectList(_context.Set <RushOption>(), "RushOptionId", "RushOptionName"); //Added ViewData["NumDrawersId"] but may not be needed ViewData["NumDrawersId"] = new SelectList(_context.Set <NumDrawers>(), "NumDrawersId", "NumberOfDrawers"); ViewData["SurfaceMaterialId"] = new SelectList(_context.Set <SurfaceMaterial>(), "SurfaceMaterialId", "SurfaceMaterialName"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } DeskQuote = await _context.DeskQuote .Include(d => d.Delivery) .Include(d => d.Desk).FirstOrDefaultAsync(m => m.DeskQuoteId == id); if (DeskQuote == null) { return(NotFound()); } ViewData["DeliveryId"] = new SelectList(_context.Set <Delivery>(), "DeliveryId", "DeliveryId"); ViewData["DeskId"] = new SelectList(_context.Set <Desk>(), "DeskId", "DeskId"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } /*DeskQuote = await _context.DeskQuote * .Include(d => d.Desk) * .Include(d => d.Shipping).FirstOrDefaultAsync(m => m.DeskQuoteId == id);*/ DeskQuote = await _context.DeskQuote.FindAsync(id); Desk = await _context.Desk.FindAsync(DeskQuote.DeskId); if (DeskQuote == null) { return(NotFound()); } ViewData["SurfaceMaterialId"] = new SelectList(_context.Set <SurfaceMaterial>(), "SurfaceMaterialId", "SurfaceMaterialName"); ViewData["ShippingId"] = new SelectList(_context.Set <Shipping>(), "ShippingId", "ShippingDays"); return(Page()); }
public IActionResult OnGet() { ViewData["SurfaceMaterialId"] = new SelectList(_context.Set <SurfaceMaterial>(), "SurfaceMaterialId", "SurfaceMaterialName"); ViewData["ShippingId"] = new SelectList(_context.Set <Shipping>(), "ShippingId", "ShippingDays"); return(Page()); }