public async Task <ActionResult> DeleteConfirmed(int id) { AttendanceDataSources attendanceDataSources = await db.AttendanceDataSourceses.FindAsync(id); db.AttendanceDataSourceses.Remove(attendanceDataSources); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Branch,AttendenceSources")] AttendanceDataSources attendanceDataSources) { if (ModelState.IsValid) { db.Entry(attendanceDataSources).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(attendanceDataSources)); }
public async Task <ActionResult> Create([Bind(Include = "Id,Branch,AttendenceSources")] AttendanceDataSources attendanceDataSources) { if (ModelState.IsValid) { db.AttendanceDataSourceses.Add(attendanceDataSources); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(attendanceDataSources)); }
// GET: AttendanceDataSources/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AttendanceDataSources attendanceDataSources = await db.AttendanceDataSourceses.FindAsync(id); if (attendanceDataSources == null) { return(HttpNotFound()); } return(View(attendanceDataSources)); }