<%@ Page Title="" Language="C#" MasterPageFile="~/Portal/default.master" AutoEventWireup="true" CodeBehind="appform_mymsg_lists.aspx.cs" Inherits="Portal.Portal.appform_mymsg_lists" %>
<%@ Register src="../UserControls/Menu.ascx" tagname="Menu" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<uc1:Menu ID="Menu1" runat="server" />


 <div class="appform_body">
        
      <style>
      .itemline{ margin-bottom:5px; padding:10px; min-height:50px;  }
      .sepline{ width:750px; height:1px; border-bottom:solid 1px #aaaaaa}
      .readstatus0{ font-weight:bold; min-height:50px;}
      .readstatus1{ font-weight:normal; min-height:50px;}
      </style>


      <script>
          function setread(obj, id , isread) {
              if (isread == "0") {
                  obj.style.fontWeight = "normal";
                  $.get("appform_setread.aspx?id=" + id);
              } 

          }
      
      </script>
      
    <asp:GridView AutoGenerateColumns="false" ID="GridView1" runat="server" 
     AllowPaging="true" PageSize=20    DataKeyNames="id" DataSourceID="SqlDataSource1"  GridLines=None
      >
    <Columns>
    
    <asp:TemplateField>
    <ItemTemplate>
    
   

        <table cellpadding=0 cellspacing=0>
         <tr valign="top" >
         <td width=120px  >

         <div class="itemline" >
             <%#Eval("opusername") %>
             <div style=" font-size:10px; ">
               <%#DateTime.Parse(Eval("createdate").ToString()).ToString("yyyy-MM-dd HH:mm") %>
             </div>
        </div>

         </td>
         
         <td class="itemline" width=650px>

          <div class="readstatus<%#Eval("isread")%>"   onclick='setread(this, <%#Eval("id") %>,<%#Eval("isread") %>)' >
   
           留言：<%#Eval("contents") %></div>
         
         </td>
         </tr>
        
        </table>




        <div class="sepline"></div>






</ItemTemplate>
    
    </asp:TemplateField>
 

    
    </Columns>
    </asp:GridView>













    <asp:SqlDataSource  
     SelectCommand="select id, isread, opusername, contents, createdate  from Portal_page_audit_log where  toid=@toid" 
     ConnectionString='<%$ConnectionStrings:ConnectionString %>'
     ID="SqlDataSource1" runat="server" onselecting="SqlDataSource1_Selecting">
     
     
     <SelectParameters>
     <asp:Parameter DefaultValue="0" Name="toid" Type="Int32" />
     </SelectParameters>
      
     
     </asp:SqlDataSource>



    </div>





  <script>
      SetC("L3");
</script>
</asp:Content>
