Exemple #1
0
 protected void Submit_btn_Click(object sender, EventArgs e)
 {
     Article at = new Article();
     at.liebie = Convert.ToInt32(DropDownList_liebie.SelectedValue);
     at.title = Tit_tbx.Text;
     at.content = FCKeditor_content.Value.ToString();
     at.author = "omycle";
     ArticleOperate ato = new ArticleOperate();
     ato.insert(at);
     Response.Redirect("Default.aspx");
 }
Exemple #2
0
    protected void Submit_btn_Click(object sender, EventArgs e)
    {
        Article at = new Article();

        at.liebie  = Convert.ToInt32(DropDownList_liebie.SelectedValue);
        at.title   = Tit_tbx.Text;
        at.content = FCKeditor_content.Value.ToString();
        at.author  = "omycle";
        ArticleOperate ato = new ArticleOperate();

        ato.insert(at);
        Response.Redirect("Default.aspx");
    }
Exemple #3
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string         title   = this.txtTitle.Text.ToString();
        int            cid     = Convert.ToInt32(this.DropDownListClass.SelectedValue);
        string         content = this.txtBody.Value;
        ArticleOperate aop     = new ArticleOperate();
        Article        ac      = new Article(cid, title, content);
        bool           b       = aop.insert(ac);

        if (b)
        {
            Response.Redirect("~/refresh.aspx?msg=" + "恭喜你,发表成功!");
        }
        else
        {
            this.lblMsg.Text = "很遗憾,发表失败,请重新尝试!";
        }
    }