private static List<Rol> transductor(DataTable tabla) { List<Rol> lista = new List<Rol>(); if (tabla != null) foreach (DataRow fila in tabla.Rows) { //Transcribir Rol rol = new Rol(); rol.Nombre = Convert.ToString(fila["nombreRol"]); rol.Estado = Convert.ToBoolean(fila["estado"]); lista.Add(rol); } return lista; }
public logueo(Usuario a, Rol b,Hotel c) { User = a; Rol = b; Hotel= c; }
public static bool guardar(Rol rol) { //int estado = (rol.Estado) ? 1 : 0; return executeProcedure("updateRol", rol.Nombre, rol.Estado); }
public static bool insertar(Rol rol) { return executeProcedure("insertRol", rol.Nombre, rol.Estado); }