Beispiel #1
0
        public static ListItem GetListItem(EAdvLevelType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Beispiel #2
0
 public static bool Equals(EAdvLevelType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Beispiel #3
0
 public static string GetText(EAdvLevelType type)
 {
     if (type == EAdvLevelType.Hold)
     {
         return("独占");
     }
     else if (type == EAdvLevelType.Standard)
     {
         return("标准");
     }
     else
     {
         throw new Exception();
     }
 }
Beispiel #4
0
 public static string GetValue(EAdvLevelType type)
 {
     if (type == EAdvLevelType.Hold)
     {
         return("Hold");
     }
     else if (type == EAdvLevelType.Standard)
     {
         return("Standard");
     }
     else
     {
         throw new Exception();
     }
 }
Beispiel #5
0
        public AdvInfo(int advID, int publishmentSystemID, int adAreaID, string advName, string summary, bool isEnabled, bool isDateLimited, DateTime startDate, DateTime endDate, EAdvLevelType levelType, int level, bool isWeight, int weight, EAdvRotateType rotateType, int rotateInterval, string nodeIDCollectionToChannel, string nodeIDCollectionToContent, string fileTemplateIDCollection) 
		{
            this.advID = advID;
            this.publishmentSystemID = publishmentSystemID;
            this.adAreaID =adAreaID;
            this.advName = advName;
            this.summary = summary;
            this.isEnabled = isEnabled;
            this.isDateLimited = isDateLimited;
            this.startDate = startDate;
            this.endDate = endDate;
            this.levelType = levelType;
            this.level= level;
            this.isWeight = isWeight;
            this.weight = weight;
            this.rotateType = rotateType;
            this.rotateInterval = rotateInterval;
            this.nodeIDCollectionToChannel =nodeIDCollectionToChannel;
            this.nodeIDCollectionToContent = nodeIDCollectionToContent;
            this.fileTemplateIDCollection = fileTemplateIDCollection;
		}
Beispiel #6
0
		public AdvInfo()
		{
            advID = 0;
            publishmentSystemID = 0;
            adAreaID=0;
            advName = string.Empty;
            summary = string.Empty ;
			isEnabled = true;
			isDateLimited = false;
			startDate = DateTime.Now;
			endDate = DateTime.Now.AddMonths(1);
            levelType = EAdvLevelType.Hold;
            level=0;
            isWeight=false;
            weight=0;
            rotateType = EAdvRotateType.Equality;
            rotateInterval = 0;
            nodeIDCollectionToChannel = string.Empty;
            nodeIDCollectionToContent = string.Empty;
            fileTemplateIDCollection = string.Empty;
		}