<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pic_class.aspx.cs" Inherits="wormadmin_pic_class" 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">
    <title>图片分类</title>
    <link rel="stylesheet" href="css/content.css" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="25"><strong>图片分类列表:</strong></td>
        </tr>
      </table>
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="3">
              <asp:GridView ID="myGrid" runat="server" SkinId="blueGrid"
                   DataKeyNames="id" Width="800px"  AutoGenerateColumns="False" OnRowEditing="myedit" OnRowUpdating="myupdate" OnRowCancelingEdit="mycancel" OnRowCommand="piccommand" >
                 
                  <Columns>
                      <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />  
                       
                      <asp:TemplateField HeaderText="图片分类" SortExpression="CustomerID">
                      <ItemTemplate>
                          <%# Eval("pclass")%>
                          <asp:Label ID="pclasstemp" runat="server" Text='<%# Eval("pclass") %>' Visible=false></asp:Label>
                          <asp:Label ID="psorttemp" runat="server" Text='<%# Eval("psort") %>' Visible=false></asp:Label>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <asp:TextBox ID="pclass" Text='<%# Eval("pclass") %>' Width="100px" Height="13px" runat="server"></asp:TextBox>
                          <asp:Label ID="pclasstemp" runat="server" Text='<%# Eval("pclass") %>' Visible=false></asp:Label>
                      </EditItemTemplate>
                      </asp:TemplateField>   
                      
                      <asp:ButtonField HeaderText="上移操作" Text="上移" CommandName="shang"/>
                      <asp:ButtonField HeaderText="下移操作" Text="下移" CommandName="xia" />
                      
                      <asp:CommandField HeaderText="快速编辑" ShowEditButton="True" CausesValidation="False"/>
                      
                      <asp:TemplateField HeaderText="删除">
                      <HeaderTemplate>
                          <asp:CheckBox ID="delall" runat="server" OnCheckedChanged="delall_CheckedChanged" Text="删除" AutoPostBack="True" />                      </HeaderTemplate>
                      <ItemTemplate><asp:CheckBox ID="del" runat="server" Text=""/></ItemTemplate>
                      <EditItemTemplate>
                          <asp:CheckBox ID="del" runat="server" />                      </EditItemTemplate>
                      <FooterTemplate>
                        <asp:TextBox ID="del" Text='' runat="server"></asp:TextBox>
                      </FooterTemplate>
                      </asp:TemplateField>
                  </Columns>
              </asp:GridView>          </td>
        </tr>
        <tr>
          <td colspan="3">&nbsp;<strong>添加分类:</strong>
            <asp:TextBox ID="addclass" runat="server" Width="171px"></asp:TextBox>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="addclass"
                  Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
          <asp:Button ID="add" runat="server" OnClick="add_Click" Text="添加" Width="51px" SkinID="blue"/></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="全选" CausesValidation="False" />          </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;}" CausesValidation="False" /></td>
        </tr>
      </table>
    </form>
</body>
</html>
