Exemplo n.º 1
0
        public static List<clsRol> SelectAll()
        {
            DAORol daoProxy = new DAORol();
            DataSet dtsProxy = daoProxy.SelectAll();

            return CargarLista(dtsProxy.Tables[0]);
        }
Exemplo n.º 2
0
        public static int Insert(clsRol objProxy)
        {
            ValidationException x = new ValidationException();
            if (string.IsNullOrEmpty(objProxy.SRol_name))
                x.AgregarError("Ingrese el nombre del rol");

            if (x.Cantidad > 0)
                throw x;

            DAORol daoProxy = new DAORol();
            return daoProxy.Insert(objProxy.SRol_name,objProxy.sStatus);
        }
Exemplo n.º 3
0
        public static bool Delete(int iRol_id)
        {
            ValidationException x = new ValidationException();
            if (iRol_id <= 0)
                x.AgregarError("Ingrese el id del rol");

            if (x.Cantidad > 0)
                throw x;

            DAORol daoProxy = new DAORol();
            return daoProxy.Delete(iRol_id);
        }
Exemplo n.º 4
0
 public static clsRol SelectRow(int iRol_id)
 {
     DAORol daoProxy = new DAORol();
     DataSet dtsProxy = daoProxy.SelectRow(iRol_id);
     return Load(dtsProxy.Tables[0].Rows[0]);
 }