1 protected void btnOnLine_Click(object sender, EventArgs e) 2 { 3 try 4 { 5 6 //更新 7 string loginname; 8 loginname = SPContext.Current.Web.CurrentUser.Name; 9 int queryID = Convert.ToInt32(Request.QueryString["ID"]); 10 SPWeb web = SPContext.Current.Web; 11 web.AllowUnsafeUpdates = true; 12 SPList listLeaderMail = web.Lists["领导信箱"]; 13 SPListItem logItem = listLeaderMail.GetItemById(queryID); 14 logItem["replyContent"] = txtreply.Text; 15 logItem["handleDate"] = DateTime.Now; 16 logItem["handleStatus"] = "已处理"; 17 logItem["replyShow"] = "是"; 18 logItem["handleResult"] = "线上处理"; 19 logItem["handleMan"] = loginname; 20 logItem.Update(); 21 btnOnLine.Text = "重新发布"; 22 btnOutLine.Visible = false; 23 btnDel.Visible = true; 24 BindTime(); 25 } 26 catch (Exception ex) 27 { 28 SharePointUtility.WriteLog(ex); 29 } 30 31 }