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

using EnterpriseNET.BusinessLogicLayer;

[PartialCaching(60)]
public partial class UserControls_top : System.Web.UI.UserControl
{
    public string SiteConfigID, CompanyName, Tel400,Mobile, LogoPicUrl, LogoAlt;

    protected void Page_Load(object sender, EventArgs e)
    {
        //加载
        if (!IsPostBack)
        {
            try
            {
                bindSiteConfig();

                DataView dvlist0 = MajorClass.QueryMajorClass();
                ShowMajorClass.DataSource = dvlist0;
                ShowMajorClass.DataBind();
            }
            catch
            {
                Response.Write("发生错误.");
                Response.End();
            }
        }
    }

    void bindSiteConfig()
    {
        int siteConfigID = 1;

        SiteConfig siteConfig = new SiteConfig();
        siteConfig.LoadData(siteConfigID);

        if (siteConfig.exist)
        {
            //显示站点配置详细内容
            CompanyName = siteConfig.companyName;
            Tel400 = siteConfig.tel400;
            Mobile = siteConfig.mobile;
            LogoPicUrl = siteConfig.logoPicUrl;
            LogoAlt = siteConfig.logoAlt;

            Page.DataBind();
        }
        else
        {
            Response.Write("数据不存在.");
            Response.End();
        }
    }



}
