示例#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"]); //重新定位到该页面
        }
示例#2
0
 private void detach_BBSAnswer(BBSAnswer entity)
 {
     this.SendPropertyChanging();
     entity.BBSNote = null;
 }
示例#3
0
 private void attach_BBSAnswer(BBSAnswer entity)
 {
     this.SendPropertyChanging();
     entity.BBSNote = this;
 }
示例#4
0
 partial void DeleteBBSAnswer(BBSAnswer instance);
示例#5
0
 partial void UpdateBBSAnswer(BBSAnswer instance);
示例#6
0
 partial void InsertBBSAnswer(BBSAnswer instance);