示例#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));
 }