Beispiel #1
0
        public async Task <IActionResult> Create([Bind("WorkOrderStatusId,StatusDescription,Color")] WorkOrderStatus workOrderStatus)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workOrderStatus);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workOrderStatus));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("WorkOrderId,WorkOrderStatusId,MainContat,Phone,Email,Brand,Model,Year,Description")] WorkOrder workOrder)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workOrder);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workOrder));
        }