public async Task <ActionResult> DeleteConfirmed(int id) { LesfondOrgup lesfondorgup = await db.LesfondOrgups.FindAsync(id); db.LesfondOrgups.Remove(lesfondorgup); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Code,NameEN,NameKZ,NameRU")] LesfondOrgup lesfondorgup) { if (ModelState.IsValid) { db.Entry(lesfondorgup).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(lesfondorgup)); }
public async Task <ActionResult> Create([Bind(Include = "Id,Code,NameEN,NameKZ,NameRU")] LesfondOrgup lesfondorgup) { if (ModelState.IsValid) { db.LesfondOrgups.Add(lesfondorgup); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(lesfondorgup)); }
public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LesfondOrgup lesfondorgup = await db.LesfondOrgups.FindAsync(id); if (lesfondorgup == null) { return(HttpNotFound()); } return(View(lesfondorgup)); }