コード例 #1
0
 public static string GetValue(EAdvType type)
 {
     if (type == EAdvType.JsCode)
     {
         return("JsCode");
     }
     else if (type == EAdvType.HtmlCode)
     {
         return("HtmlCode");
     }
     else if (type == EAdvType.Text)
     {
         return("Text");
     }
     else if (type == EAdvType.Image)
     {
         return("Image");
     }
     else if (type == EAdvType.Flash)
     {
         return("Flash");
     }
     else
     {
         throw new Exception();
     }
 }
コード例 #2
0
 public static string GetText(EAdvType type)
 {
     if (type == EAdvType.JsCode)
     {
         return("JS代码");
     }
     if (type == EAdvType.HtmlCode)
     {
         return("HTML代码");
     }
     else if (type == EAdvType.Text)
     {
         return("文字");
     }
     else if (type == EAdvType.Image)
     {
         return("图片");
     }
     else if (type == EAdvType.Flash)
     {
         return("Flash");
     }
     else
     {
         throw new Exception();
     }
 }
コード例 #3
0
ファイル: EAdvType.cs プロジェクト: yankaics/cms-1
 public static string GetText(EAdvType type)
 {
     if (type == EAdvType.JsCode)
     {
         return("JS´úÂë");
     }
     if (type == EAdvType.HtmlCode)
     {
         return("HTML´úÂë");
     }
     else if (type == EAdvType.Text)
     {
         return("ÎÄ×Ö");
     }
     else if (type == EAdvType.Image)
     {
         return("ͼƬ");
     }
     else if (type == EAdvType.Flash)
     {
         return("Flash");
     }
     else
     {
         throw new Exception();
     }
 }
コード例 #4
0
        public static ListItem GetListItem(EAdvType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
コード例 #5
0
 public static bool Equals(EAdvType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
コード例 #6
0
        public IEnumerable GetDataSourceByType(EAdvType adType, int publishmentSystemId)
        {
            var parms = new IDataParameter[]
            {
                GetParameter(ParmAdmaterialType, EDataType.VarChar, 50, EAdvTypeUtils.GetValue(adType)),
                GetParameter(ParmPublishmentsystemid, EDataType.Integer, publishmentSystemId)
            };

            var enumerable = (IEnumerable)ExecuteReader(SqlSelectAllAdmaterialByType, parms);

            return(enumerable);
        }
コード例 #7
0
 public AdMaterialInfo(int adMaterialID, int publishmentSystemID, int advID, string adMaterialName, EAdvType adMaterialType, string code, string textWord, string textLink, string textColor, int textFontSize, string imageUrl, string imageLink, int imageWidth, int imageHeight, string imageAlt, int weight, bool isEnabled)
 {
     this.adMaterialID        = adMaterialID;
     this.publishmentSystemID = publishmentSystemID;
     this.advID          = advID;
     this.adMaterialName = adMaterialName;
     this.adMaterialType = adMaterialType;
     this.code           = code;
     this.textWord       = textWord;
     this.textLink       = textLink;
     this.textColor      = textColor;
     this.textFontSize   = textFontSize;
     this.imageUrl       = imageUrl;
     this.imageLink      = imageLink;
     this.imageWidth     = imageWidth;
     this.imageHeight    = imageHeight;
     this.imageAlt       = imageAlt;
     this.weight         = weight;
     this.isEnabled      = isEnabled;
 }
コード例 #8
0
 public AdMaterialInfo()
 {
     adMaterialID        = 0;
     publishmentSystemID = 0;
     advID          = 0;
     adMaterialName = string.Empty;
     adMaterialType = EAdvType.HtmlCode;
     code           = string.Empty;
     textWord       = string.Empty;
     textLink       = string.Empty;
     textColor      = string.Empty;
     textFontSize   = 0;
     imageUrl       = string.Empty;
     imageLink      = string.Empty;
     imageWidth     = 0;
     imageHeight    = 0;
     imageAlt       = string.Empty;
     weight         = 0;
     isEnabled      = true;
 }
コード例 #9
0
 public static bool Equals(string typeStr, EAdvType type)
 {
     return(Equals(type, typeStr));
 }