public bool sendFeedback(feedback_Entity feedT) { feedback_T a = new feedback_T(); a.account = feedT.account; a.report = feedT.reportInfo; sellDB.feedBack_T.InsertOnSubmit(a); sellDB.SubmitChanges(); return(true); }
protected void btnSendFeedBack_Click(object sender, EventArgs e) { if (txtFeedBack.Text.Trim().Length <= 0) { Response.Write(MessagesBox.showMessages("内容不能为空")); return; } String account = Session["UserAccount"].ToString(); String feedBackText = txtFeedBack.Text; feedback_Entity feedbackEntity = new feedback_Entity(); feedbackEntity.account = account; feedbackEntity.reportInfo = feedBackText; bool result = data.sendFeedback(feedbackEntity); if (result) { Response.Write(MessagesBox.showMessages("感谢您的反馈!")); Response.Write("<script language=javascript>history.go(-1);</script>"); } }