//发送 protected void BtnSend_Click(object sender, EventArgs e) { if (Page.IsValid) { M_Message messInfo = new M_Message(); B_User bll = new B_User(); messInfo.Sender = "admin"; messInfo.Title = this.TxtTitle.Text; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = this.EditorContent.Text; if (this.RadIncept1.Checked) { DataTable dt = bll.GetUserInfos(); foreach (DataRow dr in dt.Rows) { //if (dr["UserName"].ToString() != "admin") //{ messInfo.Incept = dr["UserName"].ToString(); B_Message.Add(messInfo); //} } } if (this.RadIncept3.Checked) { string uname = this.TxtInceptUser.Text; if (!string.IsNullOrEmpty(uname)) { string[] namearr = uname.Split(new char[] { ',' }); for (int i = 0; i < namearr.Length; i++) { messInfo.Incept = namearr[i]; B_Message.Add(messInfo); } } } } }