示例#1
0
文件: Blank.aspx.cs 项目: ishui/rms2
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (Request["Flag"] == null)
            {
                string MsgScript  = "";
                string InLineUser = "******"#\" onclick=\"javascript:goInLinePage();return false;\">在线人数:" + ((Hashtable)Application["UserTable"]).Count.ToString() + "</a>";

                BLL.SendMsg msg = new BLL.SendMsg();
                msg.ToUsercode = ((User)Session["User"]).UserCode;
                msg.State      = "1";
                msg.todel      = "0";

                if (msg.GetSendMsgs().Rows.Count > 0)
                {
                    MsgScript = "<a href=\"#\" onclick=\"javascript:goMsgManage();return false;\"><IMG runat=\"server\" id=\"MsgImg\" border=\"0\" alt=\"消息\" src=\"Images/ShowMsg.gif\"></a>";
                }
                else
                {
                    MsgScript = "<a href=\"#\" onclick=\"javascript:goMsgManage();return false;\"><IMG runat=\"server\" id=\"MsgImg\" border=\"0\" alt=\"消息\" src=\"Images/Msg.gif\"></a>";
                }


                this.scriptspan.InnerHtml = "<script language=\"javascript\">"
                                            + "window.parent.tdInLineUser.innerHTML = '" + InLineUser + "';"
                                            + "window.parent.TdMsgImg.innerHTML = '" + MsgScript + "';"
                                            + "</script>";
            }
            else
            {
                /********************** 在线用户统计 ***************************/
                Session.Abandon();
                /***************************************************************/
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        private void InitPage()
        {
            BLL.SendMsg send2 = new BLL.SendMsg();
            send2.ToUsercode = user.UserCode;
            send2.State      = "1";
            send2.todel      = "0";
            if (send2.GetSendMsgs().Rows.Count > 0)
            {
                string code = send2.GetSendMsgs().Rows[0]["SendMsgCode"].ToString();
                Response.Redirect("sendmsgview.aspx?MsgCode=" + code + "&Re=true");
            }
            else
            {
                BLL.SendMsg send = new BLL.SendMsg();
                send.SendUsercode = user.UserCode;
                send.senddel      = "0";
                dgList.DataSource = send.GetSendMsgs();
                dgList.DataBind();
                this.GridPagination1.RowsCount = send.GetSendMsgs().Rows.Count.ToString();

                BLL.SendMsg send1 = new BLL.SendMsg();
                send1.ToUsercode     = user.UserCode;
                send1.todel          = "0";
                Datagrid1.DataSource = send1.GetSendMsgs();
                Datagrid1.DataBind();
                this.GridPagination2.RowsCount = send1.GetSendMsgs().Rows.Count.ToString();
            }
        }
示例#4
0
 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;
         }
     }
 }
示例#5
0
        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;
            }
        }
示例#6
0
        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();
        }