public Perfil(TB_Perfil TB_Perfil) { CodPerfil = TB_Perfil.CodPerfil; Nome = TB_Perfil.Nome; Personalizado = TB_Perfil.Personalizado; TipoPerfil = TB_Perfil.CodTipoPerfil; }
public async Task <ActionResult> DeleteConfirmed(int id) { TB_Perfil tB_Perfil = await db.TB_Perfil.FindAsync(id); db.TB_Perfil.Remove(tB_Perfil); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "PerfilId,Perfil")] TB_Perfil tB_Perfil) { if (ModelState.IsValid) { db.Entry(tB_Perfil).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tB_Perfil)); }
public async Task <ActionResult> Create([Bind(Include = "PerfilId,Perfil")] TB_Perfil tB_Perfil) { if (ModelState.IsValid) { db.TB_Perfil.Add(tB_Perfil); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tB_Perfil)); }
public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TB_Perfil tB_Perfil = await db.TB_Perfil.FindAsync(id); if (tB_Perfil == null) { return(HttpNotFound()); } return(View(tB_Perfil)); }