public async Task <IActionResult> Create([Bind("IdEquipment,NameEquipment,DateRelease")] Equipments equipments) { if (ModelState.IsValid) { _context.Add(equipments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(equipments)); }
public async Task <IActionResult> Create([Bind("IdWorker,Surname,Firstname,Adress,Birthday")] Workers workers) { if (ModelState.IsValid) { _context.Add(workers); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(workers)); }
public async Task <IActionResult> Create([Bind("IdMaterial,NameMaterial,MassMaterial,Units,Property")] Materials materials) { if (ModelState.IsValid) { _context.Add(materials); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(materials)); }
public async Task <IActionResult> Create([Bind("IdLaboratory,NumberLaboratory,IdEquipment")] Laboratories laboratories) { if (ModelState.IsValid) { _context.Add(laboratories); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdEquipment"] = new SelectList(_context.Equipments, "IdEquipment", "IdEquipment", laboratories.IdEquipment); return(View(laboratories)); }
public async Task <IActionResult> Create([Bind("IdSample,NameSample,MassSample,IdMaterial")] Samples samples) { if (ModelState.IsValid) { _context.Add(samples); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdMaterial"] = new SelectList(_context.Materials, "IdMaterial", "IdMaterial", samples.IdMaterial); return(View(samples)); }
public async Task <IActionResult> Create([Bind("IdSupple,IdProvider,Price,DateSupple,IdMaterial")] Supplies supplies) { if (ModelState.IsValid) { _context.Add(supplies); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdMaterial"] = new SelectList(_context.Materials, "IdMaterial", "IdMaterial", supplies.IdMaterial); ViewData["IdProvider"] = new SelectList(_context.Providers, "IdProvider", "IdProvider", supplies.IdProvider); return(View(supplies)); }
public async Task <IActionResult> Create([Bind("IdExperiment,IdSample,Dates,StartTime,EndTime,SupposeMass,ReceiveMass,IdLaboratory,IdWorker")] Experiments experiments) { if (ModelState.IsValid) { _context.Add(experiments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdLaboratory"] = new SelectList(_context.Laboratories, "IdLaboratory", "IdLaboratory", experiments.IdLaboratory); ViewData["IdSample"] = new SelectList(_context.Samples, "IdSample", "IdSample", experiments.IdSample); ViewData["IdWorker"] = new SelectList(_context.Workers, "IdWorker", "IdWorker", experiments.IdWorker); return(View(experiments)); }