using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class WebMain_news_Announcement : System.Web.UI.UserControl
{

    TableRow tr;
    TableCell tc;
    #region 属性群
    private string newsid;
    private string tit;
    private string count;
    private int strlength;
    private string newsoscss;
    private string showdata;
    public string NewsId
    {
        set
        {
            newsid = value.ToString();
        }
    }
    public string Count
    {
        set
        {
            count = value.ToString();
        }
    }
    public string StrLength
    {
        set
        {
            strlength =Convert.ToInt32(value.ToString());
        }
    }
    public string NewsCSS
    {
        set
        {
            newsoscss = value.ToString();
        }
    }
    public string ShowDate
    {
        set
        {
            showdata = value.ToString();
        }
    }
    #endregion
    protected void Page_Load(object sender, EventArgs e)
    {
        uc_news_stylesos s1 = (uc_news_stylesos)this.LoadControl("../../uc/news/stylesos.ascx");
        string id = newsid;//所指向小类ID
        s1.Id =id;
        s1.Rss =count; //显示行数
        s1.StrLength =strlength; //截取多少个字符后显示...
        s1.ShowDate =showdata; //是否显示日期
        tr = new TableRow();
        tc = new TableCell();
        tr.CssClass =newsoscss;
        tc.HorizontalAlign = HorizontalAlign.Left;
        tc.Controls.Add(s1);
        tr.Controls.Add(tc);
        TB.Controls.Add(tr);
        TB.Controls.Add(tr);
    }

}
