private void llenarGrillaRoles() { mgListadoRol.Rows.Clear(); RolesComponent idiomaComponent = new RolesComponent(); List <Roles> idiomas = new List <Roles>(); idiomas = idiomaComponent.Read(); int n = 0; int m = 0; int t = 0; int x = 0; foreach (Roles item in idiomas) { n = mgListadoRol.Rows.Add(); mgListadoRol.Rows[n].Cells[0].Value = item.Id; mgListadoRol.Rows[n].Cells[1].Value = item.name; m = mgVerRol.Rows.Add(); mgVerRol.Rows[n].Cells[0].Value = item.Id; mgVerRol.Rows[n].Cells[1].Value = item.name; t = mgAsignarLista.Rows.Add(); mgAsignarLista.Rows[n].Cells[0].Value = item.Id; mgAsignarLista.Rows[n].Cells[1].Value = item.name; x = mgABMComposite.Rows.Add(); mgABMComposite.Rows[n].Cells[0].Value = item.Id; mgABMComposite.Rows[n].Cells[1].Value = item.name; m++; t++; n++; x++; } }
public ActionResult Index() { RolesComponent roles = new RolesComponent(); return(View(roles.Read())); }