public void ShowWebInfo() { if (Request["NewsID"] + "" == "") { Response.Redirect("ErrorPage.aspx"); } else { try { int NewsID = Convert.ToInt32(Request.QueryString["NewsID"].ToString()); WebProject.BLL.BaseData.ZT_COM_WebInfo bll_WebInfo = new WebProject.BLL.BaseData.ZT_COM_WebInfo(); DataSet ds = bll_WebInfo.GetList("FilePath='NewsView.aspx?NewsID="+NewsID.ToString()+"'"); if (ds.Tables[0].Rows.Count > 0) { Title = ds.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds.Tables[0].Rows[0]["Description"].ToString(); } else { DataSet ds1 = bll_WebInfo.GetList("FilePath='NewsView.aspx'"); if (ds1.Tables[0].Rows.Count > 0) { Title = ds1.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds1.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds1.Tables[0].Rows[0]["Description"].ToString(); } else { WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo(); DataSet ds2 = bll_WebMainInfo.GetList(" 1=1 "); if (ds2.Tables[0].Rows.Count > 0) { Title = ds2.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds2.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds2.Tables[0].Rows[0]["Description"].ToString(); } } } } catch { Response.Redirect("ErrorPage.aspx"); } } }
public void ShowWebInfo() { WebProject.BLL.BaseData.ZT_COM_WebInfo bll_WebInfo = new WebProject.BLL.BaseData.ZT_COM_WebInfo(); DataSet ds1 = bll_WebInfo.GetList("FilePath='Index.aspx'"); if (ds1.Tables[0].Rows.Count > 0) { Title = ds1.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds1.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds1.Tables[0].Rows[0]["Description"].ToString(); this.lblLeftTelephone.Text = ds1.Tables[0].Rows[0]["Telephone"].ToString(); this.lblLeftKeepPerson.Text = ds1.Tables[0].Rows[0]["KeepPerson"].ToString(); this.lblLeftMobile.Text = ds1.Tables[0].Rows[0]["Mobile"].ToString(); this.lblLeftFax.Text = ds1.Tables[0].Rows[0]["Fax"].ToString(); this.lblLeftAddress.Text = ds1.Tables[0].Rows[0]["Address"].ToString(); this.lblLeftMailNum.Text = ds1.Tables[0].Rows[0]["MailNum"].ToString(); this.lblLeftEmail.Text = ds1.Tables[0].Rows[0]["Email"].ToString(); this.lblEndCompanyName.Text = ds1.Tables[0].Rows[0]["CompanyName"].ToString(); this.lblEndTelephone.Text = ds1.Tables[0].Rows[0]["Telephone"].ToString(); this.lblEndFax.Text = ds1.Tables[0].Rows[0]["Fax"].ToString(); this.lblEndAddress.Text = ds1.Tables[0].Rows[0]["Address"].ToString(); this.lblEndICP.Text = ds1.Tables[0].Rows[0]["ICP"].ToString(); this.lblEndEmail.Text = ds1.Tables[0].Rows[0]["Email"].ToString(); } else { WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo(); DataSet ds2 = bll_WebMainInfo.GetList(" 1=1 "); if (ds2.Tables[0].Rows.Count > 0) { Title = ds2.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds2.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds2.Tables[0].Rows[0]["Description"].ToString(); PageUrl = ds2.Tables[0].Rows[0]["WebURL"].ToString(); CompanyInfo = ds2.Tables[0].Rows[0]["Title"].ToString(); this.lblLeftTelephone.Text = ds2.Tables[0].Rows[0]["Telephone"].ToString(); this.lblLeftKeepPerson.Text = ds2.Tables[0].Rows[0]["KeepPerson"].ToString(); this.lblLeftMobile.Text = ds2.Tables[0].Rows[0]["Mobile"].ToString(); this.lblLeftFax.Text = ds2.Tables[0].Rows[0]["Fax"].ToString(); this.lblLeftAddress.Text = ds2.Tables[0].Rows[0]["Address"].ToString(); this.lblLeftMailNum.Text = ds2.Tables[0].Rows[0]["MailNum"].ToString(); this.lblLeftEmail.Text = ds2.Tables[0].Rows[0]["Email"].ToString(); this.lblEndCompanyName.Text = ds2.Tables[0].Rows[0]["CompanyName"].ToString(); this.lblEndTelephone.Text = ds2.Tables[0].Rows[0]["Telephone"].ToString(); this.lblEndFax.Text = ds2.Tables[0].Rows[0]["Fax"].ToString(); this.lblEndAddress.Text = ds2.Tables[0].Rows[0]["Address"].ToString(); this.lblEndICP.Text = ds2.Tables[0].Rows[0]["ICP"].ToString(); this.lblEndEmail.Text = ds2.Tables[0].Rows[0]["Email"].ToString(); } } }
public void ShowData() { WebProject.BLL.BaseData.ZT_COM_WebInfo bll_WebInfo = new WebProject.BLL.BaseData.ZT_COM_WebInfo(); DataSet ds = bll_WebInfo.GetList(""); if (ds.Tables[0].Rows.Count > 0) { this.lblMessage.Visible = false; this.btnDeleteSelect.Visible = true; this.GridView1.Visible = true; this.GridView1.DataSource = ds; this.GridView1.DataBind(); } else { this.lblMessage.Visible = true; this.btnDeleteSelect.Visible = false; this.GridView1.Visible = false; } }
public void ShowWebInfo() { WebProject.BLL.BaseData.ZT_COM_WebInfo bll_WebInfo = new WebProject.BLL.BaseData.ZT_COM_WebInfo(); DataSet ds1 = bll_WebInfo.GetList("FilePath='ZhaoPin.aspx'"); if (ds1.Tables[0].Rows.Count > 0) { Title = ds1.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds1.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds1.Tables[0].Rows[0]["Description"].ToString(); } else { WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo(); DataSet ds2 = bll_WebMainInfo.GetList(" 1=1 "); if (ds2.Tables[0].Rows.Count > 0) { Title = ds2.Tables[0].Rows[0]["Title"].ToString(); KeyWords = ds2.Tables[0].Rows[0]["KeyWords"].ToString(); Description = ds2.Tables[0].Rows[0]["Description"].ToString(); } } }