public static clsSubFamilies SelectRow(int codigo) { DAOSubFamily daoProxy = new DAOSubFamily(); DataSet dtsProxy = daoProxy.selectRow(codigo); return Load(dtsProxy.Tables[0].Rows[0]); }
public static List<clsSubFamilies> SelectByName(string name) { DAOSubFamily daoProxy = new DAOSubFamily(); DataSet dtsProxy = daoProxy.selectByName(name); return LoadList(dtsProxy.Tables[0]); }
public static List<clsSubFamilies> SelectAll() { DAOSubFamily daoProxy = new DAOSubFamily(); DataSet dtsProxy = daoProxy.selectAll(); return LoadList(dtsProxy.Tables[0]); }
public static int Insert(clsSubFamilies objProxy) { ValidationException x = new ValidationException(); if (string.IsNullOrEmpty(objProxy.SSubFamily_name)) x.AgregarError("verifique el nombre de la subfamilia"); if (x.Cantidad > 0) throw x; DAOSubFamily daoProxy = new DAOSubFamily(); return daoProxy.Insert(objProxy.IFamily_id.IFamily_id,objProxy.SSubFamily_name, objProxy.SSubFamily_desc); }
public static bool Delete(int iSubFamily_id) { ValidationException x = new ValidationException(); if (iSubFamily_id <= 0) x.AgregarError("Ingrese el código de la subfamilia"); if (x.Cantidad > 0) throw x; DAOSubFamily daoProxy = new DAOSubFamily(); return daoProxy.Delete(iSubFamily_id); }