public void ShowWebInfo()
    {
        WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo();
        DataSet ds = bll_WebMainInfo.GetList(" 1=1 ");
        if (ds.Tables[0].Rows.Count > 0)
        {
            PageUrl = ds.Tables[0].Rows[0]["WebURL"].ToString();
            CompanyInfo = ds.Tables[0].Rows[0]["Title"].ToString();

            this.lblLeftTelephone.Text = ds.Tables[0].Rows[0]["Telephone"].ToString();
            this.lblLeftKeepPerson.Text = ds.Tables[0].Rows[0]["KeepPerson"].ToString();
            this.lblLeftMobile .Text = ds.Tables [0].Rows [0]["Mobile"].ToString() ;
            this.lblLeftFax.Text = ds.Tables[0].Rows[0]["Fax"].ToString();
            this.lblLeftAddress.Text = ds.Tables[0].Rows[0]["Address"].ToString();
            this.lblLeftMailNum.Text = ds.Tables[0].Rows[0]["MailNum"].ToString();
            this.lblLeftEmail.Text = ds.Tables[0].Rows[0]["Email"].ToString();

            this.lblEndCompanyName.Text = ds.Tables[0].Rows[0]["CompanyName"].ToString();
            this.lblEndTelephone.Text = ds.Tables[0].Rows[0]["Telephone"].ToString();
            this.lblEndFax.Text = ds.Tables[0].Rows[0]["Fax"].ToString();
            this.lblEndEmail.Text = ds.Tables[0].Rows[0]["Email"].ToString();
            this.lblEndAddress.Text = ds.Tables[0].Rows[0]["Address"].ToString();
            this.lblEndICP.Text = ds.Tables[0].Rows[0]["ICP"].ToString();

        }
    }
示例#2
0
 public void ShowWebInfo()
 {
     ThisYear = DateTime.Now.Year.ToString();
     WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo();
     DataSet ds = bll_WebMainInfo.GetList(" 1=1 ");
     if (ds.Tables[0].Rows.Count > 0)
     {
         PageTitle = ds.Tables[0].Rows[0]["Title"].ToString();
         PageKeyWords = ds.Tables[0].Rows[0]["KeyWords"].ToString();
         PageDescription = ds.Tables[0].Rows[0]["Description"].ToString();
         PageUrl = ds.Tables[0].Rows[0]["WebURL"].ToString();
     }
 }
    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 ShowCompanyInfo()
 {
     WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo();
     DataSet ds = bll_WebMainInfo.GetList(" 1=1 ");
     if (ds.Tables[0].Rows.Count > 0)
     {
         this.lblCompanyName.Text = ds.Tables[0].Rows[0]["CompanyName"].ToString();
         this.lblWebURL.Text = ds.Tables[0].Rows[0]["WebURL"].ToString();
         this.lblAddress.Text = ds.Tables[0].Rows[0]["Address"].ToString();
         this.lblKeepPerson.Text = ds.Tables[0].Rows[0]["KeepPerson"].ToString();
         this.lblTelephone.Text = ds.Tables[0].Rows[0]["Telephone"].ToString();
         this.lblMobile.Text = ds.Tables[0].Rows[0]["Mobile"].ToString();
         this.lblFax.Text = ds.Tables[0].Rows[0]["Fax"].ToString();
         this.lblEmail.Text = ds.Tables[0].Rows[0]["Email"].ToString();
         this.lblMailNum.Text = ds.Tables[0].Rows[0]["MailNum"].ToString();
     }
 }
示例#5
0
 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();
         }
     }
 }
 public void ShowData()
 {
     WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo();
     WebProject.Model.BaseData.ZT_COM_WebMainInfo model_WebMainInfo = bll_WebMainInfo.GetModel(SessionUtil.GetAdminSession().AdminID);
     if (model_WebMainInfo != null)
     {
         this.txtTitle.Text = model_WebMainInfo.Title.ToString();
         this.txtWebURL.Text = model_WebMainInfo.WebURL.ToString();
         this.txtCompanyName.Text = model_WebMainInfo.CompanyName.ToString();
         this.txtAddress.Text = model_WebMainInfo.Address.ToString();
         this.txtMailNum.Text = model_WebMainInfo.MailNum.ToString();
         this.txtMobile.Text = model_WebMainInfo.Mobile.ToString();
         this.txtFax.Text = model_WebMainInfo.Fax.ToString();
         this.txtEmail.Text = model_WebMainInfo.Email.ToString();
         this.txtQQ.Text = model_WebMainInfo.QQ.ToString();
         this.txtKeepPerson.Text = model_WebMainInfo.KeepPerson.ToString();
         this.txtTelephone.Text = model_WebMainInfo.Telephone.ToString();
         this.txtKeyWords.Text = model_WebMainInfo.KeyWords.ToString();
         this.txtDescription.Text = model_WebMainInfo.Description.ToString();
         this.txtICP.Text = model_WebMainInfo.ICP.ToString();
     }
 }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     WebProject.BLL.BaseData.ZT_COM_WebMainInfo bll_WebMainInfo = new WebProject.BLL.BaseData.ZT_COM_WebMainInfo();
     WebProject.Model.BaseData.ZT_COM_WebMainInfo model_WebMainInfo = bll_WebMainInfo.GetModel();
     if (model_WebMainInfo != null)
     {
         model_WebMainInfo.Title = this.txtTitle.Text.Trim();
         model_WebMainInfo.WebURL = this.txtWebURL.Text.Trim();
         model_WebMainInfo.CompanyName = this.txtCompanyName.Text.Trim();
         model_WebMainInfo.Address = this.txtAddress.Text.Trim();
         model_WebMainInfo.MailNum = this.txtMailNum.Text.Trim();
         model_WebMainInfo.Mobile = this.txtMobile.Text.Trim();
         model_WebMainInfo.Fax = this.txtFax.Text.Trim();
         model_WebMainInfo.Email = this.txtEmail.Text.Trim();
         model_WebMainInfo.QQ = this.txtQQ.Text.Trim();
         model_WebMainInfo.KeepPerson = this.txtKeepPerson.Text.Trim();
         model_WebMainInfo.Telephone = this.txtTelephone.Text.Trim();
         model_WebMainInfo.KeyWords = this.txtKeyWords.Text.Trim();
         model_WebMainInfo.Description = this.txtDescription.Text.Trim();
         model_WebMainInfo.ICP = this.txtICP.Text.Trim();
         bll_WebMainInfo.Update(model_WebMainInfo);
         MessageBox.ShowAndRedirect(this, "修改成功", "Main.aspx");
     }
 }