<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dairy_pl.aspx.cs" Inherits="wormadmin_dairy_pl" ValidateRequest="false"%>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <link rel="stylesheet" href="css/content.css" type="text/css" />
    <title>日记评论列表</title>
</head>
<body>
    <form id="form1" runat="server">
    <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="25"><strong>日记评论列表:<asp:TextBox ID="tsql" runat="server" Style="display: none"></asp:TextBox></strong></td>
        </tr>
      </table>
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="3">
              <asp:GridView ID="myGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
                  OnRowCancelingEdit="mycancel" OnRowDeleting="mydelete"
                  OnRowEditing="myedit" OnRowUpdating="myupdate" SkinID="blueGrid" Width="800px">
                  <Columns>
                      <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />
                      <asp:TemplateField HeaderText="所属日记" SortExpression="CustomerID">
                          <ItemTemplate>
                              <%# Eval("drid")%>
                          </ItemTemplate>
                          <EditItemTemplate>
                              <%# Eval("drid")%>
                          </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="发布者" SortExpression="CustomerID">
                          <ItemTemplate>
                              <%# Eval("drwriter")%>
                          </ItemTemplate>
                          <EditItemTemplate>
                              <asp:TextBox ID="drwriter" runat="server" Height="13px" Text='<%# Eval("drwriter") %>'
                                  Width="100px"></asp:TextBox>
                          </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="内容" SortExpression="CustomerID">
                          <ItemTemplate>
                              <%# Eval("drcontent")%>
                          </ItemTemplate>
                          <EditItemTemplate>
                              <asp:TextBox ID="drcontent" runat="server" Height="39px" Text='<%# Eval("drcontent") %>'
                                  Width="153px" TextMode="MultiLine"></asp:TextBox>
                          </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="发表日期" SortExpression="CustomerID">
                          <ItemTemplate>
                              <%# short_time(Eval("drtime"))%>
                          </ItemTemplate>
                          <EditItemTemplate>
                              <asp:TextBox ID="drtime" runat="server" Height="13px" Text='<%# short_time(Eval("drtime")) %>'
                                  Width="80px"></asp:TextBox>
                          </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="屏蔽评论" SortExpression="CustomerID">
                          <ItemTemplate>
                              <asp:CheckBox ID="drunable" runat="server" Checked='<%#  Convert.ToBoolean(Eval("drunable"))%>'
                                  Enabled="false" Text="屏蔽" />
                          </ItemTemplate>
                          <EditItemTemplate>
                              <asp:CheckBox ID="drunable" runat="server" Checked='<%#  Convert.ToBoolean(Eval("drunable"))%>'
                                  Text="屏蔽" />
                          </EditItemTemplate>
                      </asp:TemplateField>
                      <asp:CommandField HeaderText="快速编辑" ShowEditButton="True" />
                      
                      <asp:TemplateField HeaderText="删除">
                          <HeaderTemplate>
                              &nbsp;<asp:CheckBox ID="delall" runat="server" AutoPostBack="True" OnCheckedChanged="delall_CheckedChanged"
                                  Text="删除" />
                          </HeaderTemplate>
                          <ItemTemplate>
                              <asp:CheckBox ID="del" runat="server" Text="" /></ItemTemplate>
                          <EditItemTemplate>
                              <asp:CheckBox ID="del" runat="server" />
                          </EditItemTemplate>
                          <FooterTemplate>
                              <asp:TextBox ID="del" runat="server" Text=''></asp:TextBox>
                          </FooterTemplate>
                      </asp:TemplateField>
                  </Columns>
              </asp:GridView>
              
              </td>
        </tr>
        <tr>
          <td width="190" style="padding-top:10px;">
          <webdiyer:aspnetpager id="AspNetPager1" runat="server" custominfohtml="当前  <font color='red'><b>%CurrentPageIndex%</b></font>/%PageCount%页&nbsp;&nbsp;记录位置:%StartRecordIndex%-%EndRecordIndex%"
            custominfotextalign="Center" firstpagetext="首页" horizontalalign="Center" inputboxstyle="width:19px"
            lastpagetext="尾页" meta:resourcekey="AspNetPager1" nextpagetext="下页" onpagechanged="pagego"
            pagesize="12" prevpagetext="前页" showcustominfosection="Left" showinputbox="Always"
            shownavigationtooltip="True" style="font-size: 14px" width="400px" AlwaysShow="True"></webdiyer:aspnetpager></td>
          <td style="padding-left:10px; padding-top:10px; width: 34px;"><asp:Button ID="Button1" SkinID="blue" runat="server" OnClick="Button1_Click" Text="全选" />
          </td>
          <td width="422" style="padding-left:10px; padding-top:10px"><asp:Button ID="btdel" SkinID="blue" runat="server" Text="选中删除" OnClick="btdel_Click" OnClientClick="javascript:{if(confirm('是否确认删除此评论?')){return true;}return false;}" /></td>
        </tr>
      </table>
    </form>
</body>
</html>
