<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customer_manage.aspx.cs" Inherits="wormadmin_customer_manage" 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">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <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>用户管理列表:<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" SkinId="blueGrid"
                   DataKeyNames="id" Width="800px"  AutoGenerateColumns="False" OnRowEditing="myedit" OnRowUpdating="myupdate" OnRowCancelingEdit="mycancel" OnSelectedIndexChanging="myselect" >
                 
                  <Columns>
                      <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />  
                       
                      <asp:TemplateField HeaderText="用户名" SortExpression="cname">
                      <ItemTemplate>
                          <%# Eval("cname")%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <%# Eval("cname")%>
                      </EditItemTemplate>
                      </asp:TemplateField>   
                      
                      <asp:TemplateField HeaderText="密码" SortExpression="cpw">
                      <ItemTemplate>
                          <%# Eval("cpw")%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <%# Eval("cpw")%>
                      </EditItemTemplate>
                      </asp:TemplateField> 

                      <asp:TemplateField HeaderText="性别" SortExpression="cpw">
                      <ItemTemplate>
                          <%# Eval("csex")%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <%# Eval("csex")%>
                      </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="注册日期" SortExpression="cpw">
                      <ItemTemplate>
                          <%# short_time(Eval("cdate"))%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <%# short_time(Eval("cdate"))%>
                      </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="用户类别" SortExpression="cpw">
                      <ItemTemplate>
                          <%# Eval("clei")%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <asp:TextBox ID="tempclass" Text='<%# Eval("clei") %>' Width="120px" Height="13px" runat="server" Visible="false"></asp:TextBox>
                          <asp:DropDownList ID="dlclass" runat="server">
                              <asp:ListItem>普通会员</asp:ListItem>
                              <asp:ListItem>Vip会员</asp:ListItem>
                          </asp:DropDownList>
                      </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="登录次数" SortExpression="cpw">
                      <ItemTemplate>
                          <%# Eval("cdeng")%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <%# Eval("cdeng")%>
                      </EditItemTemplate>
                      </asp:TemplateField>
                      
                      <asp:TemplateField HeaderText="发表次数" SortExpression="cpw">
                      <ItemTemplate>
                          <%# Eval("csend")%>
                      </ItemTemplate>
                      <EditItemTemplate>
                          <%# Eval("csend")%>
                      </EditItemTemplate>
                      </asp:TemplateField>

                      <asp:CommandField HeaderText="详细信息" ShowSelectButton="True" />
                      
                      <asp:CommandField HeaderText="快速编辑" ShowEditButton="True" />
                      
                      <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>
                      </asp:TemplateField>
                  </Columns>
              </asp:GridView>
            </td>
        </tr>
        <tr>
          <td style="padding-top:10px;" colspan="3">
              <asp:Panel ID="cusmsg" runat="server" Height="50px" Width="525px">
                <table width="500" border="0" cellpadding="2" cellspacing="1" bgcolor="#999999">
                  <tr>
                    <td colspan="2" bgcolor="#ffffff">
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/wormadmin/images/plus.gif"
                            OnClick="ImageButton1_Click" ToolTip="关闭信息" />
                        用户详细信息:</td>
                  </tr>
				  <tr>
                    <td width="100" bgcolor="#ffffff"><table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><div align="center">
                            <img src="<%=txhead %>" border="0" />
                            </div></td>
                      </tr>
                      <tr>
                        <td><div align="center"><%=txname %></div></td>
                      </tr>
                    </table></td>
                    <td bgcolor="#ffffff"><table width="380" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="25">姓名: <%=txname %></td>
                      </tr>
                      <tr>
                        <td height="25">密码: <%=txpw %></td>
                      </tr>
                      <tr>
                        <td height="25">性别: <%=txsex %></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" bgcolor="#ffffff">地址: <%=txaddress %></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" bgcolor="#ffffff"><table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="250">QQ: <%=txqq %></td>
                        <td width="250">Email: <%=txmail %></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" bgcolor="#ffffff">介绍: <%=txinstroduct%></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" bgcolor="#ffffff">注册日期: <%=short_time(txdate)%></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" bgcolor="#ffffff"><table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="250">类别: <%=txlei %></td>
                        <td width="250">等级: <%=txlevel %></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="25" colspan="2" bgcolor="#ffffff"><table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="250">登录次数: <%=txdeng %></td>
                        <td width="250">发表次数: <%=txsend %></td>
                      </tr>
                    </table></td>
                  </tr>
                </table>
                </asp:Panel>
          
          </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>
