Пример #1
0
        public static int InsertScalar(Cliente newEntity)
        {
            int         intNewId;
            ClientesDAL currentDAL = GetDAL();

            intNewId = currentDAL.InsertScalar(newEntity);
            return(intNewId);
        }
Пример #2
0
        public static List <Cliente> GetAll()
        {
            List <Cliente> returnList = new List <Cliente>();
            ClientesDAL    currentDAL = GetDAL();

            returnList = currentDAL.GetAll();

            return(returnList);
        }
Пример #3
0
        public static List <Cliente> GetInActivos()
        {
            List <Cliente> returnList = new List <Cliente>();
            ClientesDAL    currentDAL = GetDAL();

            returnList = currentDAL.GetByActivo(false);

            return(returnList);
        }
Пример #4
0
        public static Cliente GetById(int intId)
        {
            Cliente     returnEntity;
            ClientesDAL currentDAL = GetDAL();

            returnEntity = currentDAL.GetById(intId);

            return(returnEntity);
        }
Пример #5
0
        public static int InsertValid(Cliente newEntity, out string strErrores)
        {
            int         intNewId   = 0;
            ClientesDAL currentDAL = GetDAL();

            if (IsValid(newEntity, out strErrores))
            {
                intNewId = currentDAL.InsertScalar(newEntity);
            }

            return(intNewId);
        }