コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         NoticeDatalistListDelete.DataSource = info.GetAllByTime();
         NoticeDatalistListDelete.DataBind();
     }
 }
コード例 #2
0
    protected void NoticeDeleteCommand(object sender, DataListCommandEventArgs e)
    {
        string notice_id = e.CommandArgument.ToString();

        if (info.Delete(Convert.ToInt32(notice_id)))
        {
            NoticeDatalistListDelete.DataSource = info.GetAll();
            NoticeDatalistListDelete.DataBind();
            Response.Write("<script language='javascript'>alert('删除成功!')</script>");
        }
    }