<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master"  AutoEventWireup="true"  Title="机构结算" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsTcAccount" Codebehind="KS.CsTcAccount.aspx.cs" %>

<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Course" %>

<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<style>
d{ visibility:hidden}
</style>
 <script>
     function SetDate() {
         var today = new Date();
         if ($("#showdate").is(":hidden")) {
             $("#showdate").show();
             $('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
               $('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
           }
           else {
               $("#showdate").hide();
               $('#<%=TxtBeginDate.ClientID%>').val('');
               $('#<%=TxtEndDate.ClientID%>').val('');
           }
       }
       function keyWordFocus() {
           if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '请输入关键字！') {
               jQuery("#<%=this.KeyWord.ClientID %>").val('');
           }
       }
       function keyWordBlur() {
           if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '') {
        jQuery("#<%=this.KeyWord.ClientID %>").val('请输入关键字！');
    }
}
 </script>
<asp:Panel ID="ListPanel" runat="server" Width="100%">

<div class="listedit">
   <ul><asp:LinkButton ID="delclassbutton" runat="server" OnClick="delclassbutton_Click"  OnClientClick="return(GetIDS('del'));" CssClass="button">删除结算</asp:LinkButton></ul>
</div>
<style>
.categorynav{line-height:25px;width:97%;margin:0 auto;margin-bottom:10px;border:1px solid #DEEFFA;background-color:#F7FBFE;padding:5px 0px 5px 10px; height:100%; overflow:hidden;}
ul,li{padding:0px;margin:0px}
.categorynav li{width:160px;float:left;}
</style>           
  <div class="content-area mt20">    
    <div class="myTitle">名师提现</div>
	<div class="quickSearch clearfix">
     	<div class="SearchBox fl">
            <%--<strong>结算：</strong>
            <asp:TextBox ID="TextBox1" CssClass="textbox" runat="server"></asp:TextBox> --%> 
            <asp:DropDownList ID="Condition" runat="server" style="margin-right:8px;">
              <asp:ListItem Value="1">结算名称</asp:ListItem>
              <asp:ListItem Value="2">开户人</asp:ListItem>
              <asp:ListItem Value="3">开户银行</asp:ListItem>
              <asp:ListItem Value="4">开户账号</asp:ListItem>
              <asp:ListItem Value="5">联系电话</asp:ListItem>
              <asp:ListItem Value="6">发布者</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="KeyWord" CssClass="textbox" runat="server" Text="请输入关键字！" onfocus="keyWordFocus();" Width="200" onblur="keyWordBlur();" style="color:#ccc" ></asp:TextBox>
            <span class="link-color" onclick="SetDate()" style="cursor: pointer">日期范围？</span>
            <span id="showdate" <%if (this.TxtBeginDate.Text == "")
             { %> style="display: none" <%} %>>
                <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
               <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
            </span>
            <asp:Button ID="Button2" runat="server" Text=" 搜索 " CssClass="button" onclick="Button2_Click" />
        </div>
        <div class="property">
            <div class="name button ml15">筛选</div>
            <div class="propertyBox">
            	<ul class="tabs clearfix">
                    <span class="screen fl">审核状态：</span>
                    <li <%=KSCMS.S("Type")==""?" class='active'":string.Empty %>><a href="KS.CsTcAccount.Aspx"><span>所有提现</span></a></li>
                    <li <%=KSCMS.S("Type")=="1"?" class='active'":string.Empty %>><a href="KS.CsTcAccount.Aspx?Type=1"><span>未审核</span></a></li>
                    <li <%=KSCMS.S("Type")=="2"?" class='active'":string.Empty %>><a href="KS.CsTcAccount.Aspx?Type=2"><span>已审核</span></a></li>
                    <li <%=KSCMS.S("Type")=="3"?" class='active'":string.Empty %>><a href="KS.CsTcAccount.Aspx?Type=3"><span>未打款</span></a></li>
                    <li <%=KSCMS.S("Type")=="4"?" class='active'":string.Empty %>><a href="KS.CsTcAccount.Aspx?Type=4"><span>已打款</span></a></li>
                    <li <%=KSCMS.S("Type")=="5"?" class='active'":string.Empty %>><a href="KS.CsTcAccount.Aspx?Type=5"><span>已退款</span></a></li>
                </ul>
            </div>
     	</div>
    </div>

      <KS:ksgv id="list" runat="server" AutoGenerateColumns="False"  EmptyDataText="没有添加任何名师提现!" PagerType="CustomNumeric" Width="99%" 
            CssClass="CTable" GridLines="None" OnRowCommand="List_RowCommand" 
            OnRowCreated="List_RowCreated" onrowdatabound="list_RowDataBound" >
        <Columns>
        <asp:TemplateField HeaderText="&lt;input type='checkbox' name='chkall' id='chkall' onClick='CheckAll(this.form);'/&gt;">
                <itemstyle horizontalalign="Center" Height="30px" width="30px" />
                <itemtemplate>
                <input type="checkbox"  name="ids" id="ids" value="<%#Eval("id") %>" style='display: <%# Convert.ToString(Eval("status"))== "1" ||Utils.StrToInt(Eval("verify"))==1? "none" : "inline"%>'/>
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="ID号" DataField="id" Visible="false">
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>

             <asp:TemplateField HeaderText="结算">
                <itemstyle Width="45px" horizontalalign="Center" />
                <itemtemplate>
                    <%# GetVerify(Utils.StrToInt(Eval("verify").ToString())) %>
                </itemtemplate>
            </asp:TemplateField>

            
         
             <asp:TemplateField HeaderText="结算时间">
               <itemstyle horizontalalign="Center"  width="80px"/>
                <itemtemplate>             
                 <%#   Utils.StrToInt(Eval("verify").ToString())==0?"无": Eval("paydate","{0:yyyy-MM-dd}") %>
                </itemtemplate>
            </asp:TemplateField>

              <asp:TemplateField HeaderText="结算方式">
               <itemstyle  horizontalalign="Center" width="80px"/>
                <itemtemplate>             
                  <%#GetWay(Eval("wayType").ToString())%>
                </itemtemplate>
            </asp:TemplateField>
            
            <asp:TemplateField FooterStyle-CssClass="left" HeaderText="结算名称">
               <itemstyle verticalalign="Middle"/>
                <itemtemplate>             
                  <%#Eval("title")%>
                </itemtemplate>
            </asp:TemplateField>

         <asp:TemplateField  HeaderText="结算金额">
               <itemstyle  horizontalalign="Center" width="80px"/>
                <itemtemplate>             
               <%# Utils.StrToFloat( Eval("Money")).ToString("f2")%>元
                </itemtemplate>
            </asp:TemplateField>

            <asp:TemplateField  HeaderText="名师">
               <itemstyle horizontalalign="Center"  width="200px"/>
                <itemtemplate>             
               <%#GetName(Eval("UserName").ToString())%>
                </itemtemplate>
            </asp:TemplateField>


            <asp:BoundField HeaderText="联系电话" DataField="phone">
                <itemstyle verticalalign="Middle" width="60px" horizontalalign="Center"/>
            </asp:BoundField>

            <asp:BoundField HeaderText="发布者" DataField="username">
                <itemstyle verticalalign="Middle" width="50px"  horizontalalign="Center"/>
            </asp:BoundField>

            <asp:TemplateField FooterStyle-CssClass="left" HeaderText="申请时间">
               <itemstyle verticalalign="Middle"  width="80px"/>
                <itemtemplate>             
                 <%# Eval("adddate","{0:yyyy-MM-dd}") %>
                </itemtemplate>
            </asp:TemplateField>
           
             <asp:TemplateField HeaderText="查看">
              <itemstyle width="80px" horizontalalign="Center"/>
              <itemtemplate>
                  <a href="?action=look&id=<%#Eval("id") %>"><span class="plicon"></span></a>
           
             
              </itemtemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="编辑">
              <itemstyle width="80px" horizontalalign="Center"/>
              <itemtemplate>
                 
               <asp:LinkButton ID="LinkButton2" CssClass="edit" ToolTip="编辑"  runat="server" commandargument=<%#Eval("id") %> commandname="modify">编辑</asp:LinkButton>         
             
              </itemtemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="删除">
              <itemstyle width="80px" horizontalalign="Center"/>
              <itemtemplate>
                 
                 <asp:LinkButton  ToolTip="删除" CssClass="delete"  runat="server" Visible='<%# (Utils.StrToInt(Eval("status"))==1||Utils.StrToInt(Eval("verify"))==1) ? false:true %>' id="delete" commandargument=<%#Eval("id") %> commandname="del">删除</asp:LinkButton>
              </itemtemplate>
            </asp:TemplateField>


        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
    </KS:ksgv>
       
    <KS:Page ID="page1" runat="server" />
    	<div class="clear"></div>
         <script type="text/javascript">
             showtips('<span class="state"><strong>操作说明：</strong><br /></span>这里的日期搜索是对<font color="red">申请时间</font>的进行搜索。');
		</script>

    </asp:Panel>

<asp:Panel ID="AddPanel" runat="server" Width="100%">
  <KS:TopNav ID="TopNav1" runat="server" />    	
  
  	<div class="content-area">
  
     <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable"> 

      <tr>
        <td align="right" class="lefttd auto-style1" ><strong>结算状态：</strong></td>
         <td class="auto-style1">
             <asp:RadioButtonList ID="RadioButtonList1" runat="server"  RepeatDirection="Horizontal">
               <asp:ListItem Value="0" Selected>未打款</asp:ListItem>
               <asp:ListItem Value="1" >已打款</asp:ListItem>
               <asp:ListItem Value="2" >已退款</asp:ListItem>
             </asp:RadioButtonList> 
         </td>
     </tr>

     <tr style="display:none">
        <td align="right" class="lefttd auto-style1" ><strong>审核状态：</strong></td>
         <td class="auto-style1">
             <asp:RadioButtonList ID="RadioButtonList2" runat="server" RepeatDirection="Horizontal">
               <asp:ListItem Value="0" Selected>未审核</asp:ListItem>
               <asp:ListItem Value="1" >已审核</asp:ListItem>
             </asp:RadioButtonList> 
         </td>
     </tr>


     <tr>
        <td align="right" class="lefttd auto-style1" ><strong>结算用户：</strong></td>
         <td class="auto-style1">
             <asp:Label ID="Label1" runat="server" Text=""></asp:Label>         
         </td>
     </tr>
     <tr>
     <td class="lefttd" align="right"><strong>结算方式：</strong></td>
      <td class="auto-style2">
          <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
          <input type="hidden" name="waytype" value="<%=wayType %>">
     </td>          
     </tr>
     <tr>
        <td align="right" class="lefttd auto-style1" ><strong>结算标题：</strong></td>
         <td class="auto-style1">
             <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
         </td>
     </tr>
      
      <tr>
        <td align="right" class="lefttd" height="30" ><strong>提现金额：</strong></td>
         <td class="righttd">
             <asp:Label ID="Label4" runat="server" Text=""></asp:Label>         
                 可用金额[<asp:Label ID="Label11" runat="server" ForeColor="Green" Text="0"></asp:Label>]元
              <asp:Label ID="Label10" runat="server" Text=""></asp:Label>         
    
         </td>
     </tr>
      <tr>
        <td align="right" class="lefttd" height="30" ><strong>开户人：</strong></td>
         <td class="righttd">
             <asp:Label ID="Label8" runat="server" Text="Label"></asp:Label>
         </td>
     </tr>
      <tr>
        <td align="right" class="lefttd" height="30" ><strong>联系电话：</strong></td>
         <td class="righttd">
             <asp:Label ID="Label9" runat="server" Text="Label"></asp:Label>
         </td>
     </tr>
       <tr>
        <td align="right" class="lefttd" height="30" ><strong>机构开户银行：</strong></td>
         <td class="righttd">
             <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label>
         </td>
     </tr>
     <tr>
        <td align="right" class="lefttd" height="30" ><strong>开户银行账号：</strong></td>
         <td class="righttd">
             <asp:Label ID="Label6" runat="server" Text="Label"></asp:Label>
         </td>
     </tr>

     <tr>
        <td align="right" class="lefttd" height="30" ><strong>申请备注：</strong></td>
         <td class="righttd">
             <asp:Label ID="Label7" runat="server" Text="Label"></asp:Label>     
        </td>
     </tr>  
   
     <tr>
        <td align="right" class="lefttd" height="30" ><strong>回复：</strong></td>
         <td class="righttd"><asp:TextBox ID="ReRemarks"  TextMode="MultiLine" Width="70%" Height="200px" runat="server"></asp:TextBox>
             <font color="red">请附上转账截图</font>
          <% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.ReRemarks.ClientID, "Basic");%>
        </td>
     </tr>      
  </table>

      <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />

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

