Exemple #1
0
 public ActionResult GetStoreAdvertisePageList(StoreAdvertiseMstrQuery query)
 {
     try
     {
         var result = _storeAdvertiseMstrRepository.GetStoreAdvertisePageList(query);
         return(Page(result.Data, result.Page));
     }
     catch (Exception ex)
     {
         return(Fail(ex.Message));
     }
 }
Exemple #2
0
        public PagerList <dynamic> GetStoreAdvertisePageList(StoreAdvertiseMstrQuery query)
        {
            string where = _permissionHelper.GetCondition(AbpSession.USR_TYPE, AbpSession.USR_SCOPE, "BU_NO", AbpSession.ORG_NO, AbpSession.BG_NO);

            return(_sqlQuery.Select(@"ADVERTISE_ID,
                ADVERTISE_THEME,
                ADVERTISE_TYPE,
                ADVERTISE_CONTENT,
                ADVERTISE_POSTER_URL,
                STORE_CONTRACT,
                ADVERTISE_STATUS,
                ADVERTISE_CATEGORY,
                UPDATE_DATE")
                   .Filter("DEL_FLAG", 1)
                   .Contains("ADVERTISE_THEME", query.ADVERTISE_THEME)
                   .Filter("ADVERTISE_TYPE", query.ADVERTISE_TYPE)
                   .Filter("ADVERTISE_STATUS", query.ADVERTISE_STATUS)
                   .Filter("ADVERTISE_CATEGORY", query.ADVERTISE_CATEGORY)
                   .And(where)
                   .And("ADVERTISE_TYPE!='0'")
                   .OrderBy("UPDATE_DATE DESC")
                   .GetPageList <dynamic>(" store_advertise_mstr", Context.Database.GetDbConnection(), query));
        }