public static List<clsRol> SelectAll() { DAORol daoProxy = new DAORol(); DataSet dtsProxy = daoProxy.SelectAll(); return CargarLista(dtsProxy.Tables[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); }
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); }
public static clsRol SelectRow(int iRol_id) { DAORol daoProxy = new DAORol(); DataSet dtsProxy = daoProxy.SelectRow(iRol_id); return Load(dtsProxy.Tables[0].Rows[0]); }