コード例 #1
0
        public IEnumerable <R_DeliveryReportMessageType> GetDeliveryReportMessageTypes()
        {
            IEnumerable <R_DeliveryReportMessageType> results = null;

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

            ;

            results = R_DeliveryReportMessageType.Query(sql);

            return(results);
        }
コード例 #2
0
        public IEnumerable <R_DeliveryReportMessageType> GetDeliveryReportMessageTypeListAdvancedSearch(
            string name
            , string description
            , bool?active
            )
        {
            IEnumerable <R_DeliveryReportMessageType> results = null;

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

            results = R_DeliveryReportMessageType.Query(sql);

            return(results);
        }