public override void OnLoad() { if (this.Registro != null) { System.Data.DataTable AccList = null; try { AccList = this.Connection.Select("SELECT * FROM sys_permisos WHERE id_persona=" + this.Id.ToString()); } catch { // Si dió un error, asumo que no existe la tabla, y doy momentáneamente permiso total Lbl.Sys.Permisos.Objeto Obj = new Sys.Permisos.Objeto(this.Connection); Obj.Crear(); Obj.Tipo = "Global"; Obj.Nombre = "Global"; this.Pemisos = new Sys.Permisos.ListaDePermisos(this); this.Pemisos.Add(new Sys.Permisos.Permiso(this, Obj, Sys.Permisos.Operaciones.Total, null)); } if (AccList != null) { this.Pemisos = new Sys.Permisos.ListaDePermisos(this, AccList); } } }
public override void OnLoad() { if (this.Registro != null) { System.Data.DataTable AccList = null; try { AccList = this.Connection.Select("SELECT * FROM sys_permisos WHERE id_persona=" + this.Id.ToString()); } catch { // Si dió un error, asumo que no existe la tabla, y doy momentáneamente permiso total Lbl.Sys.Permisos.Objeto Obj = new Sys.Permisos.Objeto(this.Connection); Obj.Crear(); Obj.Tipo = "Global"; Obj.Nombre = "Global"; this.Pemisos = new Sys.Permisos.ListaDePermisos(this); this.Pemisos.Add(new Sys.Permisos.Permiso(this, Obj, Sys.Permisos.Operaciones.Total, null)); } if (AccList != null) this.Pemisos = new Sys.Permisos.ListaDePermisos(this, AccList); } }