本文整理汇总了C#中JumboTCMS.DAL.Common.GetDataTable方法的典型用法代码示例。如果您正苦于以下问题:C# Common.GetDataTable方法的具体用法?C# Common.GetDataTable怎么用?C# Common.GetDataTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JumboTCMS.DAL.Common
的用法示例。
在下文中一共展示了Common.GetDataTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetVote
/// <summary>
/// 得到列表
/// </summary>
public Extends_Vote GetVote()
{
using (DbOperHandler _doh = new Common().Doh())
{
Extends_Vote vote = new Extends_Vote();
_doh.Reset();
_doh.SqlCmd = "SELECT TOP 1 [Id],[Title],[VoteText],[VoteNum],[VoteTotal],[Type] FROM [jcms_extends_vote] WHERE [Lock]=0 ORDER BY Id Desc";
DataTable dtVote = _doh.GetDataTable();
if (dtVote.Rows.Count > 0)
{
vote.Id = dtVote.Rows[0]["Id"].ToString();
vote.Title = dtVote.Rows[0]["Title"].ToString();
vote.VoteTotal = Str2Int(dtVote.Rows[0]["VoteTotal"].ToString());
string[] itemtext = dtVote.Rows[0]["VoteText"].ToString().Split('|');
string[] itemclicks = dtVote.Rows[0]["VoteNum"].ToString().Split('|');
List<Extends_VoteItem> voteitems = new List<Extends_VoteItem>();
for (int i = 0; i < itemtext.Length; i++)
{
voteitems.Add(new Extends_VoteItem(itemtext[i], Str2Int(itemclicks[i])));
}
vote.Item = voteitems;
vote.Type = Str2Int(dtVote.Rows[0]["Type"].ToString());
}
else
vote.Id = "0";
dtVote.Clear();
dtVote.Dispose();
return vote;
}
}
示例2: QQOnlineList
/// <summary>
/// 得到列表
/// </summary>
public List<Extends_QQOnline> QQOnlineList()
{
using (DbOperHandler _doh = new Common().Doh())
{
List<Extends_QQOnline> qqonlines;
qqonlines = new List<Extends_QQOnline>();
_doh.Reset();
_doh.SqlCmd = "SELECT * FROM [jcms_extends_qqonline] Where State=1 ORDER BY OrderNum Desc,Id Desc";
DataTable dtQQOnline = _doh.GetDataTable();
if (dtQQOnline.Rows.Count > 0)
{
for (int i = 0; i < dtQQOnline.Rows.Count; i++)
{
qqonlines.Add(new Extends_QQOnline(dtQQOnline.Rows[i]["Id"].ToString(),
dtQQOnline.Rows[i]["QQID"].ToString(),
dtQQOnline.Rows[i]["Title"].ToString(),
dtQQOnline.Rows[i]["TColor"].ToString(),
dtQQOnline.Rows[i]["face"].ToString()
));
}
}
dtQQOnline.Clear();
dtQQOnline.Dispose();
return qqonlines;
}
}
示例3: PlacardList
/// <summary>
/// 得到列表
/// </summary>
public List<Extends_Placard> PlacardList()
{
using (DbOperHandler _doh = new Common().Doh())
{
List<Extends_Placard> placards;
placards = new List<Extends_Placard>();
_doh.Reset();
_doh.SqlCmd = "SELECT TOP 10 [Id],[Title],[AddTime] FROM [jcms_extends_placard] WHERE [State]=1 ORDER BY Id Desc";
DataTable dtPlacard = _doh.GetDataTable();
if (dtPlacard.Rows.Count > 0)
{
for (int i = 0; i < dtPlacard.Rows.Count; i++)
{
placards.Add(new Extends_Placard(dtPlacard.Rows[i]["Id"].ToString(),
dtPlacard.Rows[i]["Title"].ToString(),
"",
Convert.ToDateTime(dtPlacard.Rows[i]["AddTime"].ToString()),
1
));
}
}
dtPlacard.Clear();
dtPlacard.Dispose();
return placards;
}
}
示例4: CreateContent
public override void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.SqlCmd = "SELECT [PhotoUrl],[FirstPage] FROM [jcms_module_photo] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtContent = _doh.GetDataTable();
//图片地址分割处理
string PhotoUrl = dtContent.Rows[0]["PhotoUrl"].ToString().Replace("\r\n", "\r");
string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
dtContent.Clear();
dtContent.Dispose();
if (PhotoUrl != "")
{
string[] PhotoUrlArr = PhotoUrl.Split(new string[] { "\r" }, StringSplitOptions.RemoveEmptyEntries);
int pageCount = PhotoUrlArr.Length;
if (ContentFirstPage.Length == 0)
{
_doh.Reset();
_doh.SqlCmd = "UPDATE [jcms_module_photo] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
_doh.ExecuteSqlNonQuery();
}
for (int j = 1; j < (pageCount + 1); j++)
{
JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, j), Go2View(j, true, _ChannelId, _ContentId, true));
}
}
}
}
示例5: GetContent
public override string GetContent(string _ChannelId, string _ContentId, int _CurrentPage)
{
using (DbOperHandler _doh = new Common().Doh())
{
JumboTCMS.Entity.Normal_Channel _Channel = new JumboTCMS.DAL.Normal_ChannelDAL().GetEntity(_ChannelId);
if (_Channel.Enabled == false)
{
return "频道错误";
}
_doh.Reset();
_doh.SqlCmd = "SELECT [ClassId] FROM [jcms_module_photo] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtSearch = _doh.GetDataTable();
if (dtSearch.Rows.Count == 0)
{
dtSearch.Clear();
dtSearch.Dispose();
return "内容错误";
}
string ClassId = dtSearch.Rows[0]["ClassId"].ToString();
dtSearch.Clear();
dtSearch.Dispose();
TemplateEngineDAL te = new TemplateEngineDAL(_ChannelId);
_doh.Reset();
_doh.SqlCmd = "SELECT Id FROM [jcms_normal_class] WHERE [IsOut]=0 AND [ChannelId]=" + _ChannelId + " and [Id]=" + ClassId;
if (_doh.GetDataTable().Rows.Count == 0)
{
return "栏目错误";
}
string PageStr = string.Empty;
_doh.Reset();
_doh.SqlCmd = "SELECT * FROM [jcms_module_photo] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtContent = _doh.GetDataTable();
string _FirstPage = dtContent.Rows[0]["FirstPage"].ToString();
System.Collections.ArrayList ContentList = new System.Collections.ArrayList();
p__GetChannel_Photo(te, dtContent, ref PageStr, ref ContentList, 0);
te.ReplaceContentTag(ref PageStr, _ContentId);
te.ReplaceContentLoopTag(ref PageStr);//主要解决通过tags关联
te.ExcuteLastHTML(ref PageStr);
ContentList.Add(PageStr);
p__replaceSinglePhoto(dtContent, ref _CurrentPage, ref PageStr, ref ContentList);
int _TotalPage = Convert.ToInt16(ContentList[1].ToString());//总页数
dtContent.Clear();
dtContent.Dispose();
string _PrevLink = _CurrentPage == 1 ? "#" : Go2View(_CurrentPage - 1, (_Channel.IsHtml), _ChannelId, _ContentId, false);
string _NextLink = _CurrentPage == _TotalPage ? "#" : Go2View(_CurrentPage + 1, (_Channel.IsHtml), _ChannelId, _ContentId, false);
string _html = ContentList[0].ToString();
string[] ThisPhotoUrl = ContentList[2].ToString().Split(new string[] { "|||" }, StringSplitOptions.RemoveEmptyEntries);
string CurrentPhotoUrl = ThisPhotoUrl[ThisPhotoUrl.Length - 1];
string CurrentPhotoTitle = ThisPhotoUrl.Length == 1 ? "" : ThisPhotoUrl[0];
return _html
.Replace("{$CurrentPage}", _CurrentPage.ToString())
.Replace("{$TotalPage}", ContentList[1].ToString())
.Replace("{$CurrentPhotoUrl}", CurrentPhotoUrl)
.Replace("{$CurrentPhotoTitle}", CurrentPhotoTitle)
.Replace("{$SlideJSON}", ContentList[3].ToString())
.Replace("{$PrevLink}", _PrevLink)
.Replace("{$NextLink}", _NextLink);
}
}
示例6: BindData2Entity
/// <summary>
/// 绑定数据到实体
/// </summary>
/// <param name="_id"></param>
public void BindData2Entity(string _id, JumboTCMS.Entity.Normal_Class _class)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.SqlCmd = "SELECT * FROM [jcms_normal_class] WHERE [Id]=" + _id;
DataTable dt = _doh.GetDataTable();
if (dt.Rows.Count > 0)
{
_class.Id = dt.Rows[0]["Id"].ToString();
_class.ChannelId = Validator.StrToInt(dt.Rows[0]["ChannelId"].ToString(), 0);
_class.ParentId = Validator.StrToInt(dt.Rows[0]["ParentId"].ToString(), 0);
_class.Title = dt.Rows[0]["Title"].ToString();
_class.Info = dt.Rows[0]["Info"].ToString();
_class.Img = dt.Rows[0]["Img"].ToString();
_class.FilePath = dt.Rows[0]["FilePath"].ToString();
_class.Code = dt.Rows[0]["Code"].ToString();
_class.IsPost = Validator.StrToInt(dt.Rows[0]["IsPost"].ToString(), 0) == 1;
_class.IsTop = Validator.StrToInt(dt.Rows[0]["IsTop"].ToString(), 0) == 1;
_class.TopicNum = Validator.StrToInt(dt.Rows[0]["TopicNum"].ToString(), 0);
_class.TemplateId = Str2Str(dt.Rows[0]["TemplateId"].ToString());
_class.ContentTemp = Str2Str(dt.Rows[0]["ContentTemp"].ToString());
_class.PageSize = Validator.StrToInt(dt.Rows[0]["PageSize"].ToString(), 0);
_class.IsOut = Validator.StrToInt(dt.Rows[0]["IsOut"].ToString(), 0) == 1;
_class.FirstPage = dt.Rows[0]["FirstPage"].ToString();
_class.ReadGroup = Validator.StrToInt(dt.Rows[0]["ReadGroup"].ToString(), 0);
}
}
}
示例7: CreateContent
public virtual void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.SqlCmd = "SELECT [Content],[FirstPage] FROM [jcms_module_article] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtContent = _doh.GetDataTable();
string ArticleContent = dtContent.Rows[0]["Content"].ToString();
string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
dtContent.Clear();
dtContent.Dispose();
if (ArticleContent != "")
{
int pageCount = 1;
//处理文章内容分页
if (ArticleContent.Contains("[Jumbot_PageBreak]"))
{
string[] ContentArr = ArticleContent.Split(new string[] { "[Jumbot_PageBreak]" }, StringSplitOptions.RemoveEmptyEntries);
pageCount = ContentArr.Length;
}
if (ContentFirstPage.Length == 0)
{
_doh.Reset();
_doh.SqlCmd = "UPDATE [jcms_module_article] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
_doh.ExecuteSqlNonQuery();
}
for (int j = 1; j < (pageCount + 1); j++)
{
JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, j), Go2View(j, true, _ChannelId, _ContentId, true));
}
}
}
}
示例8: LinkList
/// <summary>
/// 得到列表
/// </summary>
public List<Normal_Link> LinkList()
{
using (DbOperHandler _doh = new Common().Doh())
{
List<Normal_Link> links;
links = new List<Normal_Link>();
_doh.Reset();
_doh.SqlCmd = "SELECT [Id],[Title],[Url],[ImgPath],[Info],[Style] FROM [jcms_normal_link] WHERE [State]=1 ORDER BY Style Desc,OrderNum Desc,Id Desc";
DataTable dtLink = _doh.GetDataTable();
if (dtLink.Rows.Count > 0)
{
for (int i = 0; i < dtLink.Rows.Count; i++)
{
links.Add(new Normal_Link(dtLink.Rows[i]["Id"].ToString(),
dtLink.Rows[i]["Title"].ToString(),
dtLink.Rows[i]["Url"].ToString(),
dtLink.Rows[i]["ImgPath"].ToString(),
dtLink.Rows[i]["Info"].ToString(),
Str2Int(dtLink.Rows[i]["Style"].ToString())
));
}
}
dtLink.Clear();
dtLink.Dispose();
return links;
}
}
示例9: GetTopList
/// <summary>
/// 得到评论列表
/// </summary>
/// <param name="_thispage">当前页码</param>
/// <param name="_pagesize">每页记录条数</param>
/// <param name="_channelid">频道ID</param>
/// <param name="_contentid">内容ID</param>
public string GetTopList(int _thispage, int _pagesize, string _channelid, string _contentid)
{
using (DbOperHandler _doh = new Common().Doh())
{
string sqlStr = "";
int countNum = 0;
string whereStr = "[IsPass]=1 AND [ParentId]=0";
if (_channelid != "0") whereStr += " AND [ChannelId]=" + _channelid;
if (_contentid != "0") whereStr += " AND [ContentId]=" + _contentid;
_doh.Reset();
_doh.ConditionExpress = whereStr;
countNum = _doh.Count("jcms_normal_review");
sqlStr = JumboTCMS.Utils.SqlHelp.GetSql("Id,ChannelId,ContentId,IP,UserName,AddDate,Content", "jcms_normal_review", "id", _pagesize, _thispage, "desc", whereStr);
_doh.Reset();
_doh.SqlCmd = sqlStr;
DataTable dt = _doh.GetDataTable();
string ResponseStr = "";
for (int j = 0; j < dt.Rows.Count; j++)
{
ResponseStr += "<li><a href=\"" + site.Dir + "review/default.aspx?ccid=" + dt.Rows[j]["ChannelId"].ToString() + "&id=" + dt.Rows[j]["ContentId"].ToString() + "#c" + dt.Rows[j]["Id"].ToString() + "\" target=\"_blank\">" + dt.Rows[j]["Content"].ToString() + "</a></li>";
}
dt.Clear();
dt.Dispose();
return ResponseStr;
}
}
示例10: GetContent
public override string GetContent(string _ChannelId, string _ContentId, int _CurrentPage)
{
using (DbOperHandler _doh = new Common().Doh())
{
JumboTCMS.Entity.Normal_Channel _Channel = new JumboTCMS.DAL.Normal_ChannelDAL().GetEntity(_ChannelId);
if (_Channel.Enabled == false)
{
return "频道错误";
}
_doh.Reset();
_doh.SqlCmd = "SELECT [ClassId] FROM [jcms_module_soft] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtSearch = _doh.GetDataTable();
if (dtSearch.Rows.Count == 0)
{
dtSearch.Clear();
dtSearch.Dispose();
return "内容错误";
}
string ClassId = dtSearch.Rows[0]["ClassId"].ToString();
dtSearch.Clear();
dtSearch.Dispose();
TemplateEngineDAL te = new TemplateEngineDAL(_ChannelId);
_doh.Reset();
_doh.SqlCmd = "SELECT Id FROM [jcms_normal_class] WHERE [IsOut]=0 AND [ChannelId]=" + _ChannelId + " and [Id]=" + ClassId;
if (_doh.GetDataTable().Rows.Count == 0)
{
return "栏目错误";
}
string PageStr = string.Empty;
_doh.Reset();
_doh.SqlCmd = "SELECT * FROM [jcms_module_soft] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtContent = _doh.GetDataTable();
System.Collections.ArrayList ContentList = new System.Collections.ArrayList();
p__GetChannel_Soft(te, dtContent, ref PageStr, ref ContentList, 0);
te.ReplaceContentTag(ref PageStr, _ContentId);
te.ReplaceContentLoopTag(ref PageStr);//主要解决通过tags关联
te.ExcuteLastHTML(ref PageStr);
ContentList.Add(PageStr);
p__replaceSingleSoft(dtContent, ref PageStr, ref ContentList);
dtContent.Clear();
dtContent.Dispose();
return ContentList[0].ToString().Replace("{$DownUrl}", ContentList[1].ToString());
}
}
示例11: GetDataTable
/// <summary>
/// 得到数据表
/// </summary>
/// <param name="_channelid"></param>
/// <returns></returns>
public DataTable GetDataTable(string _channelid)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
if (_channelid == "0")
_doh.SqlCmd = "SELECT ID,Title,iWidth,iHeight FROM [jcms_normal_thumbs] ORDER BY ChannelID,ID";
else
_doh.SqlCmd = "SELECT ID,Title,iWidth,iHeight FROM [jcms_normal_thumbs] WHERE [ChannelId]=" + _channelid + " OR [ChannelId]=0 ORDER BY ChannelID,ID";
DataTable dt = _doh.GetDataTable();
return dt;
}
}
示例12: BatchOper
/// <summary>
/// 批量操作插件
/// </summary>
/// <param name="_act">行为</param>
/// <param name="_ids">id,以,隔开</param>
public bool BatchOper(string _act, string _ids)
{
using (DbOperHandler _doh = new Common().Doh())
{
string[] idValue;
idValue = _ids.Split(',');
if (_act == "pass")
{
for (int i = 0; i < idValue.Length; i++)
{
_doh.Reset();
_doh.ConditionExpress = "[email protected]";
_doh.AddConditionParameter("@id", idValue[i]);
_doh.AddFieldItem("Enabled", 1);
_doh.Update("jcms_normal_extends");
}
}
else if (_act == "nopass")
{
for (int i = 0; i < idValue.Length; i++)
{
_doh.Reset();
_doh.ConditionExpress = "[email protected]";
_doh.AddConditionParameter("@id", idValue[i]);
_doh.AddFieldItem("Enabled", 0);
_doh.Update("jcms_normal_extends");
}
}
string TempStr = "";
_doh.Reset();
_doh.SqlCmd = JumboTCMS.Utils.SqlHelp.GetSql("[Title],[Name],[Type],[Enabled]", "jcms_normal_extends", "pId", 100, 1, "desc", "");
DataTable dt = _doh.GetDataTable();
for (int i = 0; i < dt.Rows.Count; i++)
{
if(dt.Rows[i]["Enabled"].ToString() =="1")
TempStr += "\r\nvar Plugin" + dt.Rows[i]["Name"].ToString() + " = true;//" + dt.Rows[i]["Title"].ToString() + "插件";
else
TempStr += "\r\nvar Plugin" + dt.Rows[i]["Name"].ToString() + " = false;//" + dt.Rows[i]["Title"].ToString() + "插件";
}
string _globalJS = JumboTCMS.Utils.DirFile.ReadFile("~/_data/jcmsV5.js");
string _strBegin = "//<!--插件开关begin";
string _strEnd = "//-->插件开关end";
System.Collections.ArrayList TagArray = JumboTCMS.Utils.Strings.GetHtmls(_globalJS, _strBegin, _strEnd, true, true);
if (TagArray.Count > 0)//标签存在
{
_globalJS = _globalJS.Replace(TagArray[0].ToString(), _strBegin + "\r\n\r\n" + TempStr + "\r\n\r\n" + _strEnd);
}
JumboTCMS.Utils.DirFile.SaveFile(_globalJS, "~/_data/jcmsV5.js");
}
return true;
}
示例13: CreateContent
public override void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.SqlCmd = "SELECT [FirstPage] FROM [jcms_module_soft] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtContent = _doh.GetDataTable();
string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
dtContent.Clear();
dtContent.Dispose();
if (ContentFirstPage.Length == 0)
{
_doh.Reset();
_doh.SqlCmd = "UPDATE [jcms_module_soft] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
_doh.ExecuteSqlNonQuery();
}
JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, 1), Go2View(1, true, _ChannelId, _ContentId, true));
}
}
示例14: GetListJSON
/// <summary>
/// 得到列表JSON数据
/// </summary>
/// <param name="_thispage">当前页码</param>
/// <param name="_pagesize">每页记录条数</param>
/// <param name="_joinstr">关联条件</param>
/// <param name="_wherestr1">外围条件(带A.)</param>
/// <param name="_wherestr2">分页条件(不带A.)</param>
/// <param name="_jsonstr">返回值</param>
public void GetListJSON(int _thispage, int _pagesize, string _joinstr, string _wherestr1, string _wherestr2, ref string _jsonstr)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.ConditionExpress = _wherestr2;
string sqlStr = "";
int _countnum = _doh.Count("jcms_normal_adminlogs");
sqlStr = JumboTCMS.Utils.SqlHelp.GetSql("A.id as id,A.AdminId as AdminId,B.[AdminName] as AdminName,A.OperInfo as OperInfo,A.OperTime as OperTime,A.OperIP as OperIP", "jcms_normal_adminlogs", "jcms_normal_user", "Id", _pagesize, _thispage, "desc", _joinstr, _wherestr1, _wherestr2);
_doh.Reset();
_doh.SqlCmd = sqlStr;
DataTable dt = _doh.GetDataTable();
_jsonstr = "{result :\"1\"," +
"returnval :\"操作成功\"," +
"pagerbar :\"" + JumboTCMS.Utils.HtmlPager.GetPageBar(3, "js", 2, _countnum, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," +
JumboTCMS.Utils.dtHelp.DT2JSON(dt, (_pagesize * (_thispage - 1))) +
"}";
dt.Clear();
dt.Dispose();
}
}
示例15: GetAdvBody
public string GetAdvBody(string _id)
{
using (DbOperHandler _doh = new Common().Doh())
{
string _body = "";
_doh.Reset();
_doh.SqlCmd = "select * from [jcms_normal_adv] where id=" + _id;
DataTable dt = _doh.GetDataTable();
if (dt.Rows.Count == 0)
{
return null;
}
string _advname = dt.Rows[0]["Title"].ToString();
string _type = dt.Rows[0]["AdvType"].ToString().ToLower();
string _width = dt.Rows[0]["width"].ToString();
string _height = dt.Rows[0]["height"].ToString();
string _content = dt.Rows[0]["Content"].ToString();
string _url = dt.Rows[0]["Url"].ToString();
string _picurl = dt.Rows[0]["Picurl"].ToString();
switch (_type)
{
case "img":
if (_url.Length > 10)
_body = string.Format("<!--" + _advname + "开始--><a href='{3}' target='_blank'><img src='{0}' width='{1}' height='{2}' border='0' /></a><!--" + _advname + "结束-->", _picurl, _width, _height, _url);
else
_body = string.Format("<!--" + _advname + "开始--><img src='{0}' width='{1}' height='{2}' border='0' /><!--" + _advname + "结束-->", _picurl, _width, _height);
break;
case "flash":
_body = "<!--" + _advname + "开始--><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + _width + "' height='" + _height + "' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='" + _picurl + "' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='" + _picurl + "' quality='high' bgcolor='#ffffff' width='" + _width + "' height='" + _height + "' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object><!--" + _advname + "结束-->";
break;
case "iframe":
_body = "<!--" + _advname + "开始--><iframe src='" + _content + "' width='" + _width + "' height='" + _height + "' scrolling='auto' frameborder='0' marginheight='0' marginwidth='0'></iframe><!--" + _advname + "结束-->";
break;
default:
_body = "<!--" + _advname + "开始-->" + _content + "<!--" + _advname + "结束-->";
break;
}
return _body;
}
}