protected void btnTransmit_ServerClick(object sender, EventArgs e) { if (Request["MsgCode"] != null) { BLL.SendMsg send = new RmsPM.BLL.SendMsg(); send.SendMsgCode = Request["MsgCode"].ToString(); Response.Redirect("../SendMsg/SendMsgModify.aspx?SendMsgCode=" + send.SendMsgCode + "&Type=4");//"4"用来判断转发! } }
private void InitPage() { if (Request["UserCode"] != null) { this.txtUserCode.Value = Request["UserCode"].ToString(); this.txtUserName.Value = BLL.SystemRule.GetUserName(Request["UserCode"].ToString()); } else { if (Request["Type"] == "4") { string strNull = ""; BLL.SendMsg send = new RmsPM.BLL.SendMsg(); send.SendMsgCode = Request.QueryString["SendMsgCode"]; send.GetSendMsgs(); string sendMsg = send.Msg.Replace("<b>", strNull); sendMsg = sendMsg.Replace("</b>", strNull); this.txtContent.Value = sendMsg; return; } return; } }
protected void Button3_ServerClick(object sender, EventArgs e) { BLL.SendMsg send = new RmsPM.BLL.SendMsg(); BLL.SendMsg send1 = new RmsPM.BLL.SendMsg();; for (int i = 0; i < this.dgList.Items.Count; i++) { CheckBox checkAll = (CheckBox)dgList.Items[i].Cells[5].FindControl("ck1"); if (checkAll.Checked == true) { string tblName = "SendMsg"; string code = dgList.Items[i].Cells[0].Text.Trim().ToString(); send.SendMsgCode = code; if (send.SendUsercode == user.UserCode) { send.senddel = "1"; } if (send.ToUsercode == user.UserCode) { send.todel = "1"; } if (send.SendUsercode == user.UserCode && send.ToUsercode == user.UserCode) { send.senddel = "1"; send.todel = "1"; } send.SendMsgSubmit(); } } if ((send1.State) != "1") { for (int i = 0; i < this.Datagrid1.Items.Count; i++) { CheckBox checkAll = (CheckBox)Datagrid1.Items[i].Cells[5].FindControl("ck2"); if (checkAll.Checked == true) { send1 = new BLL.SendMsg(); string tblName = "SendMsg"; string code = Datagrid1.Items[i].Cells[0].Text.Trim().ToString(); send1.SendMsgCode = code; if (send1.SendUsercode == user.UserCode) { send1.senddel = "1"; } if (send1.ToUsercode == user.UserCode) { send1.todel = "1"; } if (send1.SendUsercode == user.UserCode && send1.ToUsercode == user.UserCode) { send1.senddel = "1"; send1.todel = "1"; } send1.SendMsgSubmit(); } } } InitPage(); }