protected void Button1_ServerClick(object sender, System.EventArgs e) { if (Request["MsgCode"] != null) { BLL.SendMsg send = new BLL.SendMsg(); send.SendMsgCode = Request["MsgCode"].ToString(); 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(); Response.Write(Rms.Web.JavaScript.ScriptStart); Response.Write(Rms.Web.JavaScript.OpenerReload(false)); Response.Write(Rms.Web.JavaScript.WinClose(false)); Response.Write(Rms.Web.JavaScript.ScriptEnd); } }
private void InitPage() { if (Request["MsgCode"] != null) { BLL.SendMsg send = new BLL.SendMsg(); send.SendMsgCode = Request["MsgCode"].ToString(); this.txtContent.InnerHtml = send.Msg.Replace("\n", "<br>"); this.tdsendtime.InnerHtml = "发送时间:" + send.Sendtime; if (send.SendUsercode == user.UserCode) { this.tdusername.InnerHtml = "接收人:" + BLL.SystemRule.GetUserName(send.ToUsercode); } if (send.ToUsercode == user.UserCode) { this.tdusername.InnerHtml = "发送人:" + BLL.SystemRule.GetUserName(send.SendUsercode); BLL.SendMsg msg = new BLL.SendMsg(); msg.SendMsgCode = Request["MsgCode"].ToString(); msg.State = "2"; msg.SendMsgSubmit(); } if (send.SendUsercode == user.UserCode && send.ToUsercode == user.UserCode) { this.tdusername.InnerHtml = "发送人:" + BLL.SystemRule.GetUserName(send.SendUsercode); this.tdusername.InnerHtml += " 接收人:" + BLL.SystemRule.GetUserName(send.ToUsercode); } if (Request["Re"] + "" == "true") { this.btnRevert.Visible = true; this.spanscript.InnerHtml = "<script language=\"javascript\">" + "function Revert()" + "{" + " window.location=\"../SendMsg/SendMsgModify.aspx?UserCode="+ send.SendUsercode + "\"" + "}" + "</script>"; } else { this.btnRevert.Visible = false; } } }
protected void Button1_ServerClick(object sender, System.EventArgs e) { try { BLL.SendMsg send = new BLL.SendMsg(); send.SendMsgCode = ""; send.SendUsercode = user.UserCode; send.Msg = this.txtContent.Value; send.Sendtime = DateTime.Now.ToShortDateString(); send.State = "1"; send.senddel = "0"; send.todel = "0"; send.SendMsgSubmit(this.txtUserCode.Value); //生成多条附件 EntityData entitydata = send.entitydata; string oldSendMsgCode = ""; if (entitydata.HasRecord()) { AttachMentAdd1.SaveAttachMent(entitydata.CurrentRow["SendMsgCode"].ToString()); oldSendMsgCode = entitydata.CurrentRow["SendMsgCode"].ToString(); } for (int i = 1; i < entitydata.CurrentTable.Rows.Count; i++) { entitydata.SetCurrentRow(i); RmsPM.BLL.DocumentRule.Instance().CopyAttachment(oldSendMsgCode, entitydata.CurrentRow["SendMsgCode"].ToString(), "SendMsg1"); } Response.Write(Rms.Web.JavaScript.ScriptStart); Response.Write(Rms.Web.JavaScript.OpenerReload(false)); Response.Write(Rms.Web.JavaScript.WinClose(false)); Response.Write(Rms.Web.JavaScript.ScriptEnd); } catch (Exception ex) { throw ex; } }
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(); }