Exemplo n.º 1
0
        /// <summary>
        /// 设置消息已读
        /// </summary>
        /// <param name="AuthKey"></param>
        /// <param name="MsgID"></param>
        /// <returns></returns>
        public static int SetMessageRead(UserInfo User, int MsgID)
        {
            LogWriter.WriteLog("NoticeService.SetMessageRead:UserName="******",MsgID=" + MsgID.ToString());

            SM_ReceiverBLL.IsRead(MsgID, User.UserName);
            return(0);
        }
Exemplo n.º 2
0
    protected void ud_Grid_Recv_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
        int id = int.Parse(ud_Grid_Recv.DataKeys[e.NewSelectedIndex]["MsgID"].ToString());

        SM_ReceiverBLL.IsRead(id, (string)Session["UserName"]);
        BindGridRecvMsg();
    }
Exemplo n.º 3
0
    /// <summary>
    /// 回复按钮
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnReply_Click(object sender, EventArgs e)
    {
        string receiver = (string)Session["UserName"];

        SM_ReceiverBLL.IsRead((int)ViewState["MsgID"], receiver);
        Response.Redirect("MsgSender.aspx?SendTo=" + txtRealName.Text);
    }
Exemplo n.º 4
0
 protected void bt_AllRead_Click(object sender, EventArgs e)
 {
     foreach (GridViewRow gr in ud_Grid_Recv.Rows)
     {
         if (((CheckBox)gr.FindControl("chk_Msg_ID")).Checked == true)
         {
             int id = int.Parse(ud_Grid_Recv.DataKeys[gr.RowIndex]["MsgID"].ToString());
             SM_ReceiverBLL.IsRead(id, (string)Session["UserName"]);
         }
     }
     BindGridRecvMsg();
 }
Exemplo n.º 5
0
    /// <summary>
    /// 设定是否已读
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnRead_Click(object sender, EventArgs e)
    {
        string receiver = (string)Session["UserName"];

        SM_ReceiverBLL.IsRead((int)ViewState["MsgID"], receiver);

        int id = SM_ReceiverBLL.GetNextID((int)ViewState["ID"], (string)Session["UserName"]);

        if (id > 0)
        {
            Response.Redirect("MsgDetail.aspx?ID=" + id);
        }
        else
        {
            Response.Write("<script language=javascript>window.close();</script>");
        }
    }