<%@ Page Title="" Language="C#" MasterPageFile="~/BackStage/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Frm_PtypeList.aspx.cs" Inherits="AndroidSevice.Web.WLTGL.Frm_PtypeList" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function ShowDataHelp(_url, _title, _handler) {
                 var arr=new Array();
                 var checkbox=document.getElementsByName('Ptypecheck');
                 for (var i = 0; i < checkbox.length; i++) {
                     if (checkbox[i].checked == true) {
                         arr.push(checkbox[i].value);
                         //alert(checkbox[i].value);
                     }
                 }
           var _url = _url + '?checkvalue=' + arr;
         layer.open({
             type: 2,
             area: ['80%', '90%'],
             fix: false, //不固定
             maxmin: true,
             content: _url
         });
     }
     function ShowDataHelpImage(_url, _title, _handler) {
         layer.open({
             type: 2,
             area: ['80%', '90%'],
             fix: false, //不固定
             maxmin: true,
             content: _url
         });
     }
     function sAlert(info) {
         var message = info;
         layer.alert(message, 8); //风格一，layer弹出层特效
     }
     function sAlertOut(info) {
         layer.alert(info, { closeBtn: 0
         }, function () {
             window.location.href = '../../default.aspx'; //刷新父页面
         });
     }
     function SelectAll() {
         var checkboxs = document.getElementsByName("Ptypecheck");
         for (var i = 0; i < checkboxs.length; i++) {
             var e = checkboxs[i];
             e.checked = !e.checked;
         }
     }
     function sAlertOut(info) {
         layer.alert(info, { closeBtn: 0
         }, function () {
             window.location.href = '../../default.aspx'; //刷新父页面
         });
     }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="content-header">
				 <div class="btn-group"></div>
			</div>
    <div id="breadcrumb">
				<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>物联通管理</a>
				<a href="#" class="current">商品信息</a>
	</div>
    <div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-th-list"></i>
								</span>
								<h5>商品列表</h5>
							</div>
                            <div class="widget-content">
                            <div class="container-fluid">
                             <a href="#"><button type="button" onclick=ShowDataHelpImage('Frm_ImageInput.aspx?sub=query','','') class="btn" ><i class="icon-picture"></i>图片导入</button></a>
                      <a href="#"><button type="button" onclick=ShowDataHelp('Select_PtypeClassList.aspx','','') class="btn" ><i class="icon-tag"></i>设定标签</button></a>
                      <a href="Frm_PtypeClassList.aspx"><button type="button" onclick="window.location.href='Frm_PtypeClassList.aspx'" class="btn" ><i class="icon-tags"></i>标签管理</button></a>
  <div class="row-fluid">
    <div class="span2">
      <!--边栏内容-->
      <div class="TreeViewDiv">
        <asp:TreeView ID="TreeViewCategories"  ExpandDepth ="1" ImageSet="Simple" SelectedNodeStyle-BackColor="#c0c0c0"
             onselectednodechanged="TreeView1_SelectedNodeChanged" runat="server">
        </asp:TreeView>
        <br/>
      </div>
    </div>
    <div class="span10">
      <!--主体内容-->
      <table id="wew" class="table table-bordered table-striped table-hover">
                                    <thead>
										<tr>
                                            <th style=" width:20px;"><input type="checkbox" name="allChecked" id="allChecked" onclick="SelectAll()"/></th>
											<th>商品编号</th>
											<th>名称</th>
											<th>规格</th>
                                            <th>商品标签</th>
                                            <th>是否有图</th>
                                            <th>图片</th>
										</tr>
									</thead>
                                    <tbody>
                                    <% if (dtlist != null && dtlist.Rows.Count > 0)
                                       {
                                           for (int i = 0; i < dtlist.Rows.Count;i++)
                                           {
                                            %>
                                    <tr>
                                            <td><input type="checkbox" value="<%=dtlist.Rows[i]["typeid_"].ToString() %>" name="Ptypecheck" id="Ptypecheck"<%=i%> /></td>
                                            <td><%=dtlist.Rows[i]["usercode"].ToString()%></td>
                                            <td><%=dtlist.Rows[i]["fullname"].ToString()%></td>
                                            <td><%=dtlist.Rows[i]["standard"].ToString()%></td>
                                            <td><%=dtlist.Rows[i]["obligatetag"].ToString()%></td>
                                            <td><%=dtlist.Rows[i]["isimg"].ToString()%></td>
                                            <td><button type="button" onclick=ShowDataHelpImage('Frm_PtypeListImages.aspx?typeid=<%=dtlist.Rows[i]["typeid_"].ToString() %>','','') class="btn" ><i class="icon-picture"></i>图片上传</button></td>
									</tr>
                                    <%
                                           }
                                       }
                                         %>
                                    </tbody>
							</table>
      <div class="pager">
                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="首页" LastPageText="尾页" PrevPageText="上一页" NextPageText="下一页" 
                            onpagechanging="AspNetPager1_PageChanging"
                            PageSize="20" AlwaysShow="True" />
                            </div>
      <!--主体结束-->
    </div>
  </div>
</div>
							</div>

  </div>
</div>
							
						</div>
					</div>
</asp:Content>
