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

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

            ;

            results = R_ProjectPartner.Query(sql);

            return(results);
        }
Ejemplo n.º 2
0
        public IEnumerable <R_ProjectPartner> GetProjectPartnerListAdvancedSearch(
            int?projectId
            , int?partnerId
            , double?grantValue
            )
        {
            IEnumerable <R_ProjectPartner> results = null;

            var sql = PetaPoco.Sql.Builder
                      .Select("*")
                      .From("R_ProjectPartner")
                      .Where("IsDeleted = 0"
                             + (projectId != null ? " and ProjectId = " + projectId : "")
                             + (partnerId != null ? " and PartnerId = " + partnerId : "")
                             + (grantValue != null ? " and GrantValue like '%" + grantValue + "%'" : "")
                             )
            ;

            results = R_ProjectPartner.Query(sql);

            return(results);
        }