using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Fm.Bussiness;

public partial class Admin_sys_affiche_edit : BasePage
{
    

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            public_select ps = new public_select();
            int aff_id=int.Parse(Request.QueryString["aff_id"].ToString());
            DataView dv = ps.Getps("Fm_affiche","*","aff_id="+aff_id+"") as DataView;
            aff_title.Text = dv[0]["aff_title"].ToString();
            aff_user.Text = dv[0]["aff_user"].ToString();
            aff_content.Value = dv[0]["aff_content"].ToString();
          
        }
    }
    //修改按钮
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        sys_affiche sys = new sys_affiche();

        Fm.EntityClass.Affiche affiche = new Fm.EntityClass.Affiche();
        affiche.aff_id=int.Parse(Request.QueryString["aff_id"].ToString());
        affiche.aff_user = aff_user.Text;
        affiche.aff_title = aff_title.Text;
        affiche.aff_content = aff_content.Value;
        affiche.aff_btime = DateTime.Now;
        if (sys.Affiche_Update(affiche))
        {
            Response.Redirect("Erro.aspx?eid=网站公告信息编辑成功!&url=sys_affiche_list.aspx", true);
        }
    }
}
