<%@ Page Title="基本信息受权" Language="C#" MasterPageFile="~/BackStage/HelperMaster.Master" AutoEventWireup="true" CodeBehind="Frm_Powers.aspx.cs" Inherits="AndroidSevice.Web.WLTGL.Frm_Powers" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function sAlert(info) {
        var message = info;
        layer.alert(message, 8); //风格一，layer弹出层特效
    }
      function sAlerts(info,reltype) {
          var message = info;
          var realtype = reltype
          layer.alert(message, 8); //风格一，layer弹出层特效
          if (realtype == 'true')
          {
              parent.location.reload(); //刷新父页面
          }
      }
      function sAlertok(info) {
          layer.alert(info, { closeBtn: 0
          }, function () {
              parent.location.reload(); //刷新父页面
          });
      }
      function sAlertOut(info) {
          layer.alert(info, { closeBtn: 0
          }, function () {
              window.location.href = '../default.aspx'; //刷新父页面
          });
      }
      </script>
    <style type="text/css">
        .style1
        {
            width: 97px;
        }
    </style>
</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="Frm_Powers.aspx?pages=prhit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=prhit&loginid=<%=_loginid%>'" type="button" class="btn">商品授权</button></a>
            <a href="Frm_Powers.aspx?pages=brhit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=brhit&loginid=<%=_loginid%>'" type="button" class="btn">单位授权</button></a>
            <a href="Frm_Powers.aspx?pages=krhit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=krhit&loginid=<%=_loginid%>'" type="button" class="btn">仓库授权</button></a>
           
            <a  href="Frm_Powers.aspx?pages=xrhit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=xrhit&loginid=<%=_loginid%>'" type="button"class="btn">现金银行授权</button></a>
            <% if (_IsFzLimit.ToUpper() == "TRUE")
            {%>
            <a  href="Frm_Powers.aspx?pages=emphit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=emphit&loginid=<%=_loginid%>'" type="button"class="btn">职员授权</button></a>
            <%} %>
            <% if (_isStype.ToUpper() == "TRUE")
               {%>
            <a href="Frm_Powers.aspx?pages=srhit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=srhit&loginid=<%=_loginid%>'" type="button" class="btn">分支机构授权</button></a>
            <%} %>
             <% if (_IsFzNetLimit.ToUpper() == "TRUE")
               {%>
            <a href="Frm_Powers.aspx?pages=FZsrhit&loginid=<%=_loginid%>"><button onclick="window.location.href='Frm_Powers.aspx?pages=FZsrhit&loginid=<%=_loginid%>'" type="button" class="btn">分支机构授权</button></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">
                          <div class="row-fluid">
                          <% if (_prhit == "prhit")
                                {%>
                                    快速选择商品组：
                                    <table id="Table1" class="table table-bordered table-striped table-hover">
                                            <%
                                                if (dtGroup != null && dtGroup.Rows.Count != 0)
                                                {
                                                    for (int i = 0; i < rowCount; i++)
                                                    {%>
                                                        <tr style="border-width:0px">
                                                        <% for (int j = 0 +8*i; j < 8 * (i + 1); j++)
                                                        {
                                                            if (j < dtGroup.Rows.Count)
                                                            {
                                                                %>
											                        <td style="border-width:0px" > <button type="button"  onclick="window.location.href='Frm_Powers.aspx?add=add&Id=<%=dtGroup.Rows[j]["Id"].ToString() %>&loginid=<%=_loginid%>&pages=prhit'"  class="btn" >
                                                                            <%=dtGroup.Rows[j]["ptypeName"].ToString()%></button></td>
                                                                <%
}
                                                            else
                                                            {%>
                                                            
                                                           <% }
                                                        } %>
                                                        </tr>   
                                                <%}}
                                                %>
							        </table>
                                    <%} %>
                          <button type="submit" value="sub" name="sub" class="btn" ><i class="icon-hdd"></i>保存</button>
                          <button type="button" onclick="window.location.href='Frm_Powers.aspx?subreturn=return&parid=<%=returnPtypeid%>&relseparid=<%=returnParid %>&pages=<%=_pages %>&loginid=<%=_loginid%>'" value="return" name="sub" class="btn" ><i class="icon-backward"></i>返回上一层</button>
                              <!--主体内容-->
                              <table id="wew" class="table table-bordered table-striped table-hover">
                                    <thead>
										<tr>
											<th class="">编号</th>
											<th class="style1">名称</th>
                                            <th class="">状态</th>
											<th>授权</th>
                                            <th>下一级</th>
										</tr>
									</thead>
                                    <tbody>
                                    <% if (list != null&&list.Count!=0)
                                       {
                                           for (int i = 0; i < list.Count; i++)
                                           {
                                            %>
                                    <tr>
                                            <td ><%=list[i].Pusercode%></td>
                                            <td ><a href="Frm_Powers.aspx?parid=<%=list[i].Ptypeid %>&relseparid=<%=list[i].Parid %>&pages=<%=_pages %>&loginid=<%=_loginid%>"><%=list[i].PfullName%></a></td>
                                            <td >
                                            <%=list[i].PZT %>
                                            </td>
                                            <td ><input name="limitcheck" type="hidden" value="<%=list[i].Ptypeid+":"+_loginid+":0" %>" />
                                            <input type="checkbox" value="<%=list[i].Ptypeid+":"+_loginid+":1" %>" <%=list[i].PZT.ToString()=="★"?"checked":"" %> <%=list[i].PZT.ToString()=="☆"?"checked":"" %> name="limitcheck" />
                                            </td>
                                            <td ><a href="Frm_Powers.aspx?parid=<%=list[i].Ptypeid %>&relseparid=<%=list[i].Parid %>&pages=<%=_pages %>&loginid=<%=_loginid%>">下一级</a></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>
</asp:Content>