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; public partial class Ful_LeftList : System.Web.UI.UserControl { public DataTable dtnews;//获取文化大类 public DataTable dtfulture;//获取文化小类 public DataTable list; protected void Page_Load(object sender, EventArgs e) { bindnews(); //bindful("2"); } public void bindnews() { string sql = null; if (Session["Lang"] != null) { if (Session["Lang"] == "zh-cn") { sql = "select tid,cn_tname from culturetypetab where fid='0'"; } else { sql = "select tid,en_tname as cn_tname from culturetypetab where fid='0'"; } } else { sql = "select tid,cn_tname from culturetypetab where fid='0'"; } DataTable dt= DBH.DBHelper.GetDataSet(sql); if (dt.Rows.Count > 0) { dtnews = dt; } } public DataTable bindful(string tid) { string sql = null; if (Session["Lang"] != null) { if (Session["Lang"] == "zh-cn") { sql = "select tid,cn_tname from culturetypetab where fid='" + tid + "'"; } else { sql = "select tid,en_tname as cn_tname from culturetypetab where fid='" + tid + "'"; } } else { sql = "select tid,cn_tname from culturetypetab where fid='" + tid + "'"; } dtfulture = DBH.DBHelper.GetDataSet(sql); return dtfulture; } public string getType(string tid) { string sql = null; if (Session["Lang"] != null) { if (Session["Lang"] == "zh-cn") { sql = "select cn_tname from culturetypetab where tid='" + tid + "'"; } else { sql = "select en_tname as cn_tname from culturetypetab where tid='" + tid + "'"; } } else { sql = "select cn_tname from culturetypetab where tid='" + tid + "'"; } DataTable dt = DBH.DBHelper.GetDataSet(sql); if (dt.Rows.Count > 0) { string strType = dt.Rows[0]["cn_tname"].ToString(); return strType; } else return ""; } }