Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         NoticeDatalistListUpdate.DataSource = info.GetAllByTime();
         NoticeDatalistListUpdate.DataBind();
     }
 }
Example #2
0
 protected void NoticeBtn_Click(object sender, EventArgs e)
 {
     m_info.Title  = TitleUpdateBox.Text;
     m_info.Author = AuthorUpdateBox.Text;
     m_info.Info   = InfoUpdateBox.Text;
     if (info.Update(m_info))
     {
         NoticeDatalistListUpdate.DataSource = info.GetAllByTime();
         NoticeDatalistListUpdate.DataBind();
         Response.Write("<script language='javascript'>alert('修改成功!')</script>");
     }
     else
     {
         Response.Write("<script language='javascript'>alert('修改失败!')</script>");
     }
 }