public void AddMessage(CaseMessage doc)
 {
     using (var connection = new SqlConnection(_connectionString))
     {
         connection.Open();
         var dictionary = new Dictionary<string, object>
                              {
                                  {"案件编号", doc.案件编号},
                                  {"Content", doc.Content},
                                  {"SenderName", doc.SenderUsername}
                              };
         connection.Insert(TableName, dictionary);
     }
 }
 protected void ButtonOK_Click(object sender, EventArgs e)
 {
     var caseId = Session["SelectedCaseID"] as string;
     var user = (User) Session["User"];
     var doc = new CaseMessage
                   {
                       案件编号 = caseId,
                       Content = commentText.Value,
                       SenderUsername = user.UserName
                   };
     _caseMessageManager.AddMessage(doc);
     DataListFeedBack.DataSource = _caseMessageManager.GetMessagesOf(caseId);
     DataListFeedBack.DataBind();
     commentText.Value = "";
     //Response.Redirect(Request.Url.ToString());
 }