Esempio n. 1
0
        protected void bnSubject_Click(object sender, EventArgs e)
        {
            BBSDataContext lq = new BBSDataContext(); //实例化LINQ类

            BBSAnswer ba = new BBSAnswer();           //创建一个新对象

            ba.uID       = Convert.ToInt32(Session["uID"]);
            ba.bnID      = Convert.ToInt32(Request["id"]);
            ba.baContent = txtbaContent.Text;
            ba.baAddTime = System.DateTime.Now;
            lq.BBSAnswer.InsertOnSubmit(ba);                             //执行插入数据操作
            lq.SubmitChanges();                                          //提交数据库
            Response.Redirect("BBSAnswerList.aspx?id=" + Request["id"]); //重新定位到该页面
        }
Esempio n. 2
0
 private void detach_BBSAnswer(BBSAnswer entity)
 {
     this.SendPropertyChanging();
     entity.BBSNote = null;
 }
Esempio n. 3
0
 private void attach_BBSAnswer(BBSAnswer entity)
 {
     this.SendPropertyChanging();
     entity.BBSNote = this;
 }
Esempio n. 4
0
 partial void DeleteBBSAnswer(BBSAnswer instance);
Esempio n. 5
0
 partial void UpdateBBSAnswer(BBSAnswer instance);
Esempio n. 6
0
 partial void InsertBBSAnswer(BBSAnswer instance);