GIF89;a
GIF89;a
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;
using BusinessLayer.BOObjects;
public partial class Controls_Articles : BaseControl
{
public Globals.ArcticlesType articleType
{
get { return m_articleType; }
set { m_articleType = value; }
}private Globals.ArcticlesType m_articleType = Globals.ArcticlesType.General;
public int PageName
{
get { return m_PageName; }
set { m_PageName = value; }
}private int m_PageName=1;
public bool Full
{
get { return m_Full; }
set { m_Full = value; }
}private bool m_Full = false;
protected void Page_Load(object sender, EventArgs e)
{
Articles articles = new Articles();
DataSet ds = new DataSet();
if (articleType != Globals.ArcticlesType.Main)
{
ds = articles.GetPage(PageName);
}
else
{
ds = articles.GetMain();
}
if (ds != null)
{
if (ds.Tables.Count > 0)
{
if (ds.Tables[0].Rows.Count > 0)
{
if (Convert.ToBoolean(ds.Tables[0].Rows[0]["Visibility"].ToString()) == true)
{
if (!Full)
{
lblShort.Text = "" + ds.Tables[0].Rows[0]["Title"].ToString() + "";
lblLong.Text = ds.Tables[0].Rows[0]["ShortText"].ToString();
}
else
{
lblShort.Text = "" + ds.Tables[0].Rows[0]["Title"].ToString() + "";
lblLong.Text = ds.Tables[0].Rows[0]["LongText"].ToString();
}
}
}
else
{
lblShort.Text = ""+GetGlobalResourceObject("Common","NoInformation").ToString()+"";
}
}
else
{
lblShort.Text = "" + GetGlobalResourceObject("Common", "NoInformation").ToString() + "";
}
}
else
{
lblShort.Text = "" + GetGlobalResourceObject("Common", "NoInformation").ToString() + "";
}
}
}