protected void SetMessageStatus()
    {
        Int32 MsgDetailId = Convert.ToInt32(Request.QueryString["MsgDetailId"]);
        Int32 MsgStatusId = Convert.ToInt32(Request.QueryString["Status"]);

        if (MsgStatusId == 1)
        {
            bool Updatestatus = clsMessage.UpdateMsgDetail(MsgDetailId, 2);
        }
    }
示例#2
0
    protected void imgbtnmovetoInbox_Click(object sender, EventArgs e)
    {
        bool Gcheck          = false;
        bool UpdateMsgDetail = false;

        if (gridDelete.Rows.Count > 0)
        {
            foreach (GridViewRow GR in gridDelete.Rows)
            {
                CheckBox chk = (CheckBox)GR.FindControl("chkMsg");
                if (chk.Checked == true)
                {
                    Gcheck = true;
                    break;
                }
            }
            if (Gcheck == false)
            {
                lblmsg.Text    = "Please select atleast one deleted Message to move to Inbox.";
                lblmsg.Visible = true;
                return;
            }
            else
            {
                if (gridDelete.Rows.Count > 0)
                {
                    foreach (GridViewRow GR in gridDelete.Rows)
                    {
                        CheckBox chk = (CheckBox)GR.FindControl("chkMsg");
                        if (chk.Checked == true)
                        {
                            Int32 MsgDetailId = Convert.ToInt32(gridDelete.DataKeys[GR.RowIndex].Value);
                            UpdateMsgDetail = clsMessage.UpdateMsgDetail(MsgDetailId, 1);
                        }
                    }
                    if (UpdateMsgDetail == true)
                    {
                        lblmsg.Visible = true;
                        lblmsg.Text    = "Messages are Successfully moved to Inbox.";
                        SelectMsgforDeleteBox();
                    }
                }
            }
        }
    }
示例#3
0
 protected void imgbtndiscard_Click(object sender, EventArgs e)
 {
     if (gridInbox.Rows.Count > 0)
     {
         foreach (GridViewRow GR in gridInbox.Rows)
         {
             CheckBox chk = (CheckBox)GR.FindControl("chkMsg");
             if (chk.Checked == true)
             {
                 Int32 MsgDetailId = Convert.ToInt32(gridInbox.DataKeys[GR.RowIndex].Value);
                 clsMessage.UpdateMsgDetail(MsgDetailId, 4);
                 lblmsg.Text    = "Message Discard Successfully";
                 lblmsg.Visible = true;
                 pnlmsg.Visible = true;
             }
         }
         SelectMsgforInbox();
     }
 }