Esempio n. 1
0
        public void Delete(string advertisementName, int publishmentSystemId)
        {
            var parms = new IDataParameter[]
            {
                GetParameter(ParmAdName, EDataType.VarChar, 50, advertisementName),
                GetParameter(ParmPublishmentsystemid, EDataType.Integer, publishmentSystemId)
            };

            ExecuteNonQuery(SqlDeleteAd, parms);
            AdvertisementManager.RemoveCache(publishmentSystemId);
        }
Esempio n. 2
0
        public void Update(AdvertisementInfo adInfo)
        {
            var adParms = new IDataParameter[]
            {
                GetParameter(ParmAdType, EDataType.VarChar, 50, EAdvertisementTypeUtils.GetValue(adInfo.AdvertisementType)),
                GetParameter(ParmIsDateLimited, EDataType.VarChar, 18, adInfo.IsDateLimited.ToString()),
                GetParameter(ParmStartDate, EDataType.DateTime, adInfo.StartDate),
                GetParameter(ParmEndDate, EDataType.DateTime, adInfo.EndDate),
                GetParameter(ParmNodeIdCollectionToChannel, EDataType.NVarChar, 255, adInfo.NodeIDCollectionToChannel),
                GetParameter(ParmNodeIdCollectionToContent, EDataType.NVarChar, 255, adInfo.NodeIDCollectionToContent),
                GetParameter(ParmFileTemplateIdCollection, EDataType.NVarChar, 255, adInfo.FileTemplateIDCollection),
                GetParameter(ParmSettings, EDataType.NText, adInfo.Settings),
                GetParameter(ParmAdName, EDataType.VarChar, 50, adInfo.AdvertisementName),
                GetParameter(ParmPublishmentsystemid, EDataType.Integer, adInfo.PublishmentSystemID)
            };

            ExecuteNonQuery(SqlUpdateAd, adParms);

            AdvertisementManager.RemoveCache(adInfo.PublishmentSystemID);
        }