Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable dt = new tbl_PersonalMessageTableAdapter().GetDataByUnreadMessage(
             Request.Cookies["Type_Role"].Value.ToString(),
               int.Parse(Request.Cookies["ID_Role"].Value.ToString()));
         MessageUnread = dt.Rows.Count.ToString();
     }
 }
 private void Fill()
 {
     DataTable dt = new tbl_PersonalMessageTableAdapter().GetDataByID(int.Parse(Request.QueryString["ID_PersonalMessage"]));
     TitleContent = dt.Rows[0]["PM_title"].ToString();
     DateContent = dt.Rows[0]["PM_Date"].ToString();
     Label1.Text = dt.Rows[0]["PM_text"].ToString();
     if (Request.QueryString["Kind"] == "Inbox")
     {
         FillPath(dt.Rows[0]["PM_Type_Role_Sender"].ToString(), dt.Rows[0]["PM_ID_Role_Sender"].ToString());
     }
     else if (Request.QueryString["Kind"] == "Outbox")
     {
         FillPath(dt.Rows[0]["PM_Type_Role_Getter"].ToString(), dt.Rows[0]["PM_ID_Role_Getter"].ToString());
     }
 }