protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AboutSiteDAO abdao = new AboutSiteDAO(); aboutMy abmy = abdao.AboutSiteSelect(); lblMy.Text = abmy.AboutSite; lblMyName.Text = abmy.MyName; lblOccupation.Text = abmy.Occupation; lblIntroduction.Text = abmy.Introduction; RepJs.DataSource = new codeContentCssDAO().CodeContentCssSelectCaNamehaha("js"); RepJs.DataBind(); RepCss.DataSource = new codeContentCssDAO().CodeContentCssSelectCaNamehaha("css"); RepCss.DataBind(); RepHtml.DataSource = new codeContentCssDAO().CodeContentCssSelectCaNamehaha("html"); RepHtml.DataBind(); RepAsp.DataSource = new codeContentCssDAO().CodeContentCssSelectCaNamehaha("asp"); RepAsp.DataBind(); RepOne.DataSource = new codeContentCssDAO().CodeContentCssSelectCaNamehaha("其它"); RepOne.DataBind(); RepNewsCont.DataSource = new codeContentCssDAO().codeContentCssSelectTop(); RepNewsCont.DataBind(); RepNewsTop.DataSource = new RecmdDAO().recmdSelecTop(); RepNewsTop.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AboutSiteDAO abdao = new AboutSiteDAO(); aboutMy abmy = abdao.AboutSiteSelect(); lblMy.Text = abmy.AboutSite; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AboutSiteDAO abdao = new AboutSiteDAO(); aboutMy abmy = abdao.AboutSiteSelect(); lblMy.Text = abmy.AboutSite; RepSay.DataSource = new SayDAO().SayAll(); RepSay.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AboutSiteDAO aboutdao = new AboutSiteDAO(); aboutMy outmy = aboutdao.AboutSiteSelect(); aboutCode.InnerText = outmy.AboutSite; bozhu.Value = outmy.MyName; zhiye.Value = outmy.Occupation; jianjie.InnerText = outmy.Introduction; guanyumy.InnerText = outmy.AboutMyText; RepRiJi.DataSource = new RiJiDAO().RiJiSelectAll(); RepRiJi.DataBind(); RepGuest.DataSource = new GuestBooksDAO().SelectAllGuest(); RepGuest.DataBind(); } }
/// <summary> /// 关于我们 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void modify_Click(object sender, EventArgs e) { aboutMy aboutmy = new aboutMy(); aboutmy.AboutSite = aboutCode.InnerText; aboutmy.MyName = bozhu.Value; aboutmy.Occupation = zhiye.Value; aboutmy.Introduction = jianjie.InnerText; aboutmy.AboutMyText = guanyumy.InnerText; bool res = new AboutSiteDAO().AboutUpdate(aboutmy); if (res) { Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('关于我们修改成功');</script>"); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('关于我们修改失败');</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AboutSiteDAO abdao = new AboutSiteDAO(); aboutMy abmy = abdao.AboutSiteSelect(); lblMyName.Text = abmy.MyName; string caid = Request.QueryString["CaId"]; codeContentCssDAO codecssdao = new codeContentCssDAO(); CodeContentCss css = codecssdao.CodeContentCssSelectId(caid); string strTime = css.CreateTime; lblTime.Text = Convert.ToDateTime(strTime).ToString("yyyy-MM-dd"); lblCaName.Text = css.CaName; lblContent.Text = css.NewsContent; lblTitle.Text = css.Title; lblcate.Text = css.CaName; lblExplain.Text = css.Explain; } }