protected void GetToPartyDetail()
    {
        Int32 MsgId = Convert.ToInt32(Request.QueryString["MsgId"]);

        dt = new DataTable();

        dt = clsMessage.SelectMsgforDetail(MsgId);
        if (dt.Rows.Count > 0)
        {
            lblFrom.Text    = dt.Rows[0]["PartyName"].ToString();
            lblsubject.Text = dt.Rows[0]["MsgSubject"].ToString();
            lblmessage.Text = dt.Rows[0]["MsgDetail"].ToString();
            lbldate.Text    = dt.Rows[0]["MsgDate"].ToString();
        }
    }
    protected void GetMessgeDetail()
    {
        Int32 MsgDetailId = Convert.ToInt32(Request.QueryString["MsgDetailId"]);

        dt = new DataTable();
        dt = clsMessage.SelectMsgforDetail(MsgDetailId);
        if (dt.Rows.Count > 0)
        {
            lblfrom.Text      = dt.Rows[0]["Compname"].ToString();
            lblsubject.Text   = dt.Rows[0]["MsgSubject"].ToString();
            lblmessage.Text   = dt.Rows[0]["MsgDetail"].ToString();
            lbldate.Text      = dt.Rows[0]["MsgDate"].ToString();
            lblsignature.Text = dt.Rows[0]["signature"].ToString();
            if (Convert.ToString(dt.Rows[0]["picture"]) == "True")
            {
                SqlDataAdapter da    = new SqlDataAdapter("select photo from User_master inner join EmployeeMaster on EmployeeMaster.PartyID=User_master.PartyID where EmployeeMaster.EmployeeMasterID='" + Session["EmployeeId"].ToString() + "'", con);
                DataTable      dtpic = new DataTable();
                da.Fill(dtpic);

                string imag = dtpic.Rows[0]["photo"].ToString();
                image1.ImageUrl = "~/ShoppingCart/images/" + imag;
            }
            else
            {
                image1.Visible = false;
            }
        }
    }