using System; using System.Data; using System.Data.SqlClient; using System.Text; using System.IO; using System.Web; using System.Text.RegularExpressions; public partial class index_index : System.Web.UI.Page { protected string ln = ""; protected string cln = ""; protected string CityName = ""; protected void Page_Load(object sender, EventArgs e) { ln = BLLhelp.LanguageNull(); cln = BLLhelp.Language(); CityName = OtherPublic.GetCityName(); BindBanner(); BindPartner(); BindPro(); BindComp(); BindCase(); BindNews(); BindFAQ(); } protected readonly Maticsoft.BLL.publicHelp BLLhelp = new Maticsoft.BLL.publicHelp(); protected readonly Maticsoft.BLL.XMLHelper XMLhelp = new Maticsoft.BLL.XMLHelper(); protected StringBuilder lt_Banner = new StringBuilder(); protected void BindBanner() { SqlParameter[] parameters = { new SqlParameter("@fshow",true), new SqlParameter("@cln",cln), new SqlParameter("@ftype","banner") }; SqlDataReader odr = BLLhelp.GetList("focus", "fimage,ID,forder,flink,fname", "fshow=@fshow and cln=@cln and ftype=@ftype order by forder asc, ID asc", parameters); while (odr.Read()) { lt_Banner.Append("
"); lt_Banner.Append(""); lt_Banner.Append("
"); } odr.Dispose(); odr.Close(); } protected StringBuilder lt_Partner = new StringBuilder(); protected void BindPartner() { SqlParameter[] parameters = { new SqlParameter("@ashow",true), new SqlParameter("@aid","12") }; SqlDataReader odr = BLLhelp.GetList("advantage", "aname,aimage", "ashow=@ashow and aid=@aid order by aorder asc, ID asc", parameters); while (odr.Read()) { lt_Partner.Append("
  • "); lt_Partner.Append(""); lt_Partner.Append("\"""); lt_Partner.Append(odr["aname"].ToString()); lt_Partner.Append(""); lt_Partner.Append("
  • "); } odr.Dispose(); odr.Close(); } protected StringBuilder lt_ProTitle = new StringBuilder(); protected StringBuilder lt_ProNav = new StringBuilder(); protected StringBuilder lt_ProList = new StringBuilder(); protected void BindPro() { string strProTitle = BLLhelp.GetOneField("hlclass", "ctitle", "ID=3", null); lt_ProTitle.Append("" + strProTitle + ""); lt_ProTitle.Append("PRODUCTS"); lt_ProTitle.Append(""); SqlParameter[] parameters = { new SqlParameter("@cshow",true), new SqlParameter("@pid","3"), new SqlParameter("@ctitle" + ln,"") }; SqlDataReader odr = BLLhelp.GetList("hlclass", "top 9 ctitle,cclass,ID,ctype,ctarget,cid,(select tpath from pagetype where ttype=hlclass.ctype) as tpath", "cshow=@cshow and pid=@pid and ctitle" + ln + "<>@ctitle" + ln + " order by corder asc,ID asc", parameters); while (odr.Read()) { lt_ProNav.Append("
  • " + odr["ctitle"].ToString() + "
  • "); } odr.Dispose(); odr.Close(); string allson = BLLhelp.hlclassGetTypeAllSon("3"); SqlParameter[] parameters2 = { new SqlParameter("@pshow",true), new SqlParameter("@cln",cln) }; SqlDataReader odr2 = BLLhelp.GetList("product", "top 9 ID,pname,cclass,urlkey,pthumb1", "cclass in (3" + allson + ") and pshow=@pshow and cln=@cln order by porder asc, ID desc", parameters2); string strName = ""; while (odr2.Read()) { strName = OtherPublic.GetArea(odr2["pname"].ToString(), CityName); lt_ProList.Append("
  • \n"); lt_ProList.Append(""); lt_ProList.Append("\""\n"); lt_ProList.Append("" + strName + ""); lt_ProList.Append(""); lt_ProList.Append("
  • \n"); } odr2.Dispose(); odr2.Close(); } protected StringBuilder lt_Comp = new StringBuilder(); protected void BindComp() { string allson = BLLhelp.hlclassGetTypeAllSon("6"); SqlParameter[] parameters = { new SqlParameter("@pshow",true), new SqlParameter("@cln",cln) }; SqlDataReader odr = BLLhelp.GetList("product", "top 12 ID,pname,cclass,urlkey,pthumb1", "cclass in (6" + allson + ") and pshow=@pshow and cln=@cln order by porder asc, ID desc", parameters); string strName = ""; while (odr.Read()) { strName = OtherPublic.GetArea(odr["pname"].ToString(), CityName); lt_Comp.Append("
  • \n"); lt_Comp.Append(""); lt_Comp.Append("\""\n"); lt_Comp.Append("" + strName + ""); lt_Comp.Append(""); lt_Comp.Append("
  • \n"); } odr.Dispose(); odr.Close(); } protected StringBuilder lt_Case = new StringBuilder(); protected void BindCase() { string allson = BLLhelp.hlclassGetTypeAllSon("5"); SqlParameter[] parameters = { new SqlParameter("@pshow",true), new SqlParameter("@cln",cln) }; SqlDataReader odr = BLLhelp.GetList("product", "top 5 ID,pname,cclass,urlkey,pthumb1,pkey", "cclass in (5" + allson + ") and pshow=@pshow and cln=@cln order by porder asc, ID desc", parameters); string strName = ""; while (odr.Read()) { strName = OtherPublic.GetArea(odr["pname"].ToString(), CityName); lt_Case.Append("
  • \n"); lt_Case.Append(""); lt_Case.Append("\""\n"); lt_Case.Append("

    "); lt_Case.Append("" + strName + ""); lt_Case.Append("" + OtherPublic.GetArea(odr["pkey"].ToString(), CityName) + ""); lt_Case.Append("了解详情"); lt_Case.Append("

    "); lt_Case.Append("
    "); lt_Case.Append("
  • \n"); } odr.Dispose(); odr.Close(); } protected StringBuilder lt_NewsNav = new StringBuilder(); protected StringBuilder lt_NewsList = new StringBuilder(); protected void BindNews() { SqlParameter[] parameters = { new SqlParameter("@cshow",true), new SqlParameter("@pid","4"), new SqlParameter("@ctitle" + ln,"") }; SqlDataReader odr = BLLhelp.GetList("hlclass", "top 3 ctitle,cclass,ID,ctype,ctarget,cid,(select tpath from pagetype where ttype=hlclass.ctype) as tpath", "cshow=@cshow and pid=@pid and ctitle" + ln + "<>@ctitle" + ln + " order by corder asc,ID asc", parameters); int i = 0; string href = "", strNullPic = "", strTitle = ""; while (odr.Read()) { lt_NewsNav.Append("
  • " + odr["ctitle"].ToString() + "
  • "); lt_NewsList.Append("
    "); odr2.Dispose(); odr2.Close(); i++; } odr.Dispose(); odr.Close(); } protected StringBuilder lt_FAQ = new StringBuilder(); protected void BindFAQ() { string href = "", strTitle = "", strKey = ""; SqlParameter[] parameters = { new SqlParameter("@cclass","7"), new SqlParameter("@nshow",true), new SqlParameter("@cln",cln) }; SqlDataReader odr = BLLhelp.GetList("news", "top 12 ID,ntitle,cclass,urlkey,npic,nkey,nkey", "cclass=@cclass and nshow=@nshow and cln=@cln order by norder asc, ID desc", parameters); while (odr.Read()) { href = BLLhelp.GetSubUrl(odr["cclass"].ToString(), "newsshow", OtherPublic.GetStrName((odr["urlkey"].ToString() == "" ? OtherPublic.Pseudo_static(odr["cclass"].ToString()) : odr["urlkey"].ToString())), odr["ID"].ToString(), "news", OtherPublic.GetCompanyUrl()); strTitle = OtherPublic.GetArea(odr["ntitle"].ToString(), CityName); strKey = OtherPublic.GetArea(odr["nkey"].ToString(), CityName); lt_FAQ.Append("
  • "); lt_FAQ.Append("Q" + strTitle + ""); lt_FAQ.Append("A" + strKey + ""); lt_FAQ.Append("
  • "); } odr.Dispose(); odr.Close(); } }