Esempio n. 1
0
        public static List<clsFamilies> SelectAll()
        {
            DAOFamilies daoProxy = new DAOFamilies();
            DataSet dtsProxy = daoProxy.SelectAll();

            return CargarLista(dtsProxy.Tables[0]);
        }
Esempio n. 2
0
 public static clsFamilies SelectByName(string name)
 {
     DAOFamilies daoProxy = new DAOFamilies();
     DataSet dtsProxy = daoProxy.SelectByName(name);
     if (dtsProxy.Tables[0].Rows.Count > 0)
         return Load(dtsProxy.Tables[0].Rows[0]);
     else
         return null;
 }
Esempio n. 3
0
        public static int Insert(clsFamilies objProxy)
        {
            ValidationException x = new ValidationException();
            if (string.IsNullOrEmpty(objProxy.SFamily_name))
                x.AgregarError("Ingrese el nombre de la Familia");

            if (x.Cantidad > 0)
                throw x;

            DAOFamilies daoProxy = new DAOFamilies();
            return daoProxy.Insert(objProxy.SFamily_name,objProxy.SFamily_desc,objProxy.IDepreciation_time);
        }
Esempio n. 4
0
        public static bool Delete(int iFamily_id)
        {
            ValidationException x = new ValidationException();
            if (iFamily_id <= 0)
                x.AgregarError("Ingrese el codigo de la Familia");

            if (x.Cantidad > 0)
                throw x;

            DAOFamilies daoProxy = new DAOFamilies();
            return daoProxy.Delete(iFamily_id);
        }
Esempio n. 5
0
 public static clsFamilies SelectRow(int iFamilies_id)
 {
     DAOFamilies daoProxy = new DAOFamilies();
     DataSet dtsProxy = daoProxy.SelectRow(iFamilies_id);
     return Load(dtsProxy.Tables[0].Rows[0]);
 }