public async Task <IActionResult> Edit(short id, [Bind("ESMPSitingID,SchoolID,a1Landmutation,a2IsSoilErosion,a3IsFloodPath,a4IsSalineLand,b1ClusterTrees,b2HowManyTrees,c1IsHighway,c2IsTransmissionLine,c3TypeTransmissionLine,c4HeightTransmissionLine,c5ElectricityPolPermises,c6TypeOfPole,c7FunctionHandwash,c8WashingRepairs,d1WaterSchoolPremises,d2WaterSourceType,d3WaterSourceVicinity,d4TypeWaterVicinity,d5DistanceWaterSource,d5Date,Verified,Verifiedby")] ESSChecklist eSSChecklist) { if (id != eSSChecklist.ESMPSitingID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(eSSChecklist); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ESSChecklistExists(eSSChecklist.ESMPSitingID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(eSSChecklist)); }
// GET: ESSChecklists/Create public IActionResult Create(int SchoolID) { ESSChecklist obj = new ESSChecklist(); ViewData["SchoolID"] = new SelectList(_context.Schools, "SchoolID", "SName"); obj.Verifiedby = "Kiran Mushtaq"; return(View()); }
public async Task <IActionResult> Create([Bind("ESMPSitingID,SchoolID,a1Landmutation,a2IsSoilErosion,a3IsFloodPath,a4IsSalineLand,b1ClusterTrees,b2HowManyTrees,c1IsHighway,c2IsTransmissionLine,c3TypeTransmissionLine,c4HeightTransmissionLine,c5ElectricityPolPermises,c6TypeOfPole,c7FunctionHandwash,c8WashingRepairs,d1WaterSchoolPremises,d2WaterSourceType,d3WaterSourceVicinity,d4TypeWaterVicinity,d5DistanceWaterSource,d5Date,Verified,Verifiedby")] ESSChecklist eSSChecklist) { if (ModelState.IsValid) { _context.Add(eSSChecklist); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["SchoolID"] = new SelectList(_context.Schools, "SchoolID", "SName", eSSChecklist.SchoolID); return(View(eSSChecklist)); }