protected void NoticeDatalistList_ItemCommand(object source, DataListCommandEventArgs e)
    {
        string id = e.CommandArgument.ToString();

        m_info = info.GetById(Convert.ToInt32(id));

        TitleLbl.Text     = m_info.Title;
        TimeLbl.Text      = m_info.Time.ToString();
        AuthorLbl.Text    = m_info.Author;
        infoBox.InnerHtml = m_info.Info;
    }
Example #2
0
    protected void NoticeUpdateCommand(object sender, DataListCommandEventArgs e)
    {
        string notice_id = e.CommandArgument.ToString();

        id     = Convert.ToInt32(notice_id);
        m_info = info.GetById(id);

        TitleUpdateBox.Text  = m_info.Title;
        AuthorUpdateBox.Text = m_info.Author;
        InfoUpdateBox.Text   = m_info.Info;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Model.Notice now_info = new Model.Notice();
        if (!IsPostBack)
        {
            //content = "ada";
            NoticeDatalistList.DataSource = info.GetAllByTime();
            NoticeDatalistList.DataBind();

            now_info          = info.Getnewtime();
            TitleLbl.Text     = now_info.Title;
            TimeLbl.Text      = now_info.Time.ToString();
            AuthorLbl.Text    = now_info.Author;
            infoBox.InnerHtml = now_info.Info;
        }
    }