Пример #1
0
        public static ListItem GetListItem(EAdvRotateType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Пример #2
0
 public static bool Equals(EAdvRotateType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Пример #3
0
 public static string GetText(EAdvRotateType type)
 {
     if (type == EAdvRotateType.Equality)
     {
         return("¾ùÔÈ");
     }
     else if (type == EAdvRotateType.HandWeight)
     {
         return("ÊÖ¶¯È¨ÖØ");
     }
     else if (type == EAdvRotateType.SlideRotate)
     {
         return("»ÃµÆƬÂÖ»»");
     }
     else
     {
         throw new Exception();
     }
 }
Пример #4
0
 public static string GetValue(EAdvRotateType type)
 {
     if (type == EAdvRotateType.Equality)
     {
         return("Equality");
     }
     else if (type == EAdvRotateType.HandWeight)
     {
         return("HandWeight");
     }
     else if (type == EAdvRotateType.SlideRotate)
     {
         return("SlideRotate");
     }
     else
     {
         throw new Exception();
     }
 }
Пример #5
0
 public static string GetText(EAdvRotateType type)
 {
     if (type == EAdvRotateType.Equality)
     {
         return("均匀");
     }
     else if (type == EAdvRotateType.HandWeight)
     {
         return("手动权重");
     }
     else if (type == EAdvRotateType.SlideRotate)
     {
         return("幻灯片轮换");
     }
     else
     {
         throw new Exception();
     }
 }
Пример #6
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;
		}
Пример #7
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;
		}
Пример #8
0
 public static bool Equals(string typeStr, EAdvRotateType type)
 {
     return(Equals(type, typeStr));
 }