예제 #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);
        }