public IActionResult OnGet()
 {
     ViewData["AutoID"]    = new SelectList(_context.Auto, "ID", "ID");
     ViewData["OperID"]    = new SelectList(_context.Set <Staff>(), "ID", "ID");
     ViewData["RateID"]    = new SelectList(_context.Set <Rate>(), "ID", "ID");
     ViewData["ServiceID"] = new SelectList(_context.Set <Service>(), "ID", "ID");
     return(Page());
 }
Exemple #2
0
        public async Task <IActionResult> OnGetAsync(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Call = await _context.Call
                   .Include(c => c.Auto)
                   .Include(c => c.Oper)
                   .Include(c => c.Rate)
                   .Include(c => c.Service).FirstOrDefaultAsync(m => m.ID == id);

            if (Call == null)
            {
                return(NotFound());
            }
            ViewData["AutoID"]    = new SelectList(_context.Auto, "ID", "ID");
            ViewData["OperID"]    = new SelectList(_context.Set <Staff>(), "ID", "ID");
            ViewData["RateID"]    = new SelectList(_context.Set <Rate>(), "ID", "ID");
            ViewData["ServiceID"] = new SelectList(_context.Set <Service>(), "ID", "ID");
            return(Page());
        }
Exemple #3
0
        public async Task <IActionResult> OnGetAsync(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Auto = await _context.Auto
                   .Include(a => a.Brand).FirstOrDefaultAsync(m => m.ID == id);

            if (Auto == null)
            {
                return(NotFound());
            }
            ViewData["BrandID"] = new SelectList(_context.Set <Brand>(), "ID", "ID");
            return(Page());
        }
Exemple #4
0
 public IActionResult OnGet()
 {
     ViewData["BrandID"] = new SelectList(_context.Set <Brand>(), "ID", "ID");
     return(Page());
 }