Ejemplo n.º 1
0
        public IEnumerable <R_PartnershipType> GetPartnershipTypes()
        {
            IEnumerable <R_PartnershipType> results = null;

            var sql = PetaPoco.Sql.Builder
                      .Select("*")
                      .From("R_PartnershipType")
                      .Where("IsDeleted = 0")

            ;

            results = R_PartnershipType.Query(sql);

            return(results);
        }
Ejemplo n.º 2
0
        public IEnumerable <R_PartnershipType> GetPartnershipTypeListAdvancedSearch(
            string name
            , string description
            , string activityType
            , bool?active
            )
        {
            IEnumerable <R_PartnershipType> results = null;

            var sql = PetaPoco.Sql.Builder
                      .Select("*")
                      .From("R_PartnershipType")
                      .Where("IsDeleted = 0"
                             + (name != null ? " and Name like '%" + name + "%'" : "")
                             + (description != null ? " and Description like '%" + description + "%'" : "")
                             + (activityType != null ? " and ActivityType like '%" + activityType + "%'" : "")
                             + (active != null ? " and Active = " + (active == true ? "1" : "0") : "")
                             )
            ;

            results = R_PartnershipType.Query(sql);

            return(results);
        }