<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Import Namespace="Hishop.SystemServices" %>

<!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>
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
    <script type="text/javascript" src="../../utility/Calendar/WdatePicker.js" ></script>
</head>
<body>
    <form id="form1" runat="server">
    
        <div>
           

            <div class="PageTitleArea">
                <div class="PageTitle">
                    <asp:Literal ID="lblPageTitle" runat="server" Text="<%$ Resources:BalanceDetailsStatistics, IDS_PageTitle %>"></asp:Literal>
                </div>
                <div style="width: 80%;">
                    <asp:Literal ID="lblPageDesc" runat="server" Text="<%$ Resources:BalanceDetailsStatistics, IDS_PageDesc %>"></asp:Literal>
                </div>
            </div>
            
    <Hishop:BalanceDetailsStatistics ID="BalanceDetailsStatistics" runat="server">
        <SkinTemplate>

 <script type="text/javascript">
 
    
    function ResetPager(sender, eventArgs) {
        PagerCallBack.callback();
    }              
      
    $(document).ready(function(){
        var $_txtUserName=$('#BalanceDetailsStatistics_txtUserName');
            
        jQuery.myfn={
           OpenWindow: function(UserName)
           {
             if (dialogMessage.get_isShowing()) {
                dialogMessage.Close();			
             }
             else {  
                
                $_txtUserName.attr({'value':UserName});       
                CB_cbGrdBalanceDetailList.callback("ShowWindow",UserName);
                dialogMessage.Show();
             }
           }
        };
    }
  );

	
</script>

            <fieldset class="AdminSearchform">
                <legend><asp:Literal ID="litSearchTitle" Text="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Search %>" runat="server"></asp:Literal></legend>         
                <table width="55%" border="0" cellspacing="0" cellpadding="0" style="margin-left:18px">	      		 
                    <tr>
	                    <td class="searchTableLeftTD">
	                        <nobr><asp:Literal Text="<%$ Resources:BalanceDetailsStatistics,IDS_Field_DateStart %>" runat="server"></asp:Literal></nobr>
	                    </td>
	                    <td class="searchTableControlTD" >
	                        <Hishop:Calendar ID="calendarStart" runat="server" CssClass="Wdate"/>
	                    </td>
	                    <td class="searchTableLeftTD">
	                        <nobr><asp:Literal Text="<%$ Resources:BalanceDetailsStatistics,IDS_Field_DateEnd %>" runat="server"></asp:Literal></nobr>
	                    </td>
	                    <td class="searchTableControlTD" colspan="2">
	                        <Hishop:Calendar ID="calendarEnd" runat="server" CssClass="Wdate"/>
	                     </td>	
                        <td >
	                        <asp:Button ID="btnQueryBalanceDetails" runat="server" Text="<%$ Resources:Resources, IDS_Button_Search %>" CssClass="inp_L1"/>
	                     </td>
	                     <td style="padding-left:8px;">
                            <asp:Button ID="btnCreateReport" runat="server" Text="<%$ Resources:Resources ,IDS_Button_CreateReport %>" CssClass="inp_L1"/>	                     
	                     </td>       
                    </tr>
                </table>            
            </fieldset>

            <div class="grdGroupFormList">     

                    <div class="grdGroupList">          			
                        <div class="grdGroupListLi">
                          <Hishop:CustomGridView ID="grdBalanceDetails" runat="server" AutoGenerateColumns="false" CssClass="GridViewStyle" GridLines="None" ShowHeader="true" AllowSorting="true" RowStyle-CssClass="grdrow" HeaderStyle-CssClass="GridViewHeaderStyle" SortOrder="DESC">
                            <Columns>
                                <asp:TemplateField HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_UserName %>">
                                    <ItemTemplate>
                                        <%#Eval("UserName")%>
                                        <div class="row-actions">
                                            <span>
                                            </span>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>		                		    			      
			                    <asp:TemplateField HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_TradeDate %>">
                                    <ItemTemplate>
                                        <%#Eval("TradeDate")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
			                    <asp:TemplateField HeaderText = "<%$ Resources:BalanceDetailsStatistics,IDS_Field_TradeType %>" >
			                        <ItemTemplate>			               
			                            <Hishop:TradeTypeNameLabel ID="lblTradeType" runat="server"  TradeType='<%# Bind("TradeType") %>' />			         
			                        </ItemTemplate>
			                    </asp:TemplateField>
			                    <Hishop:MoneyColumnForAdmin HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Income %>" DataField="Income"/>
			                    <Hishop:MoneyColumnForAdmin HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Expenses %>" DataField="Expenses" />
			                    <Hishop:MoneyColumnForAdmin HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Balance %>" DataField="Balance"  />	       			      	        
                                <asp:TemplateField HeaderText="<%$ Resources:Resources, IDS_Header_Options %>">
                                    <ItemStyle/>
                                    <ItemTemplate>
                                       <a href="#" class="SmallCommonTextButton" onclick="$.myfn.OpenWindow('<%# Eval("UserName")%>');" >查看</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
	                        </Columns> 
	                      </Hishop:CustomGridView>			    
                      </div>
                  </div>
                  <!--翻页-->
                  <div class="grdGroupTabhead">
                     <UI:Pager runat="server" RunningMode="PostBack" ID="pager" />
                  </div>


            </div>             

        <UI:Dialog AnimationType="Live" ShowTransition="Fade" AnimationSlide="ExponentialDecelerate"
            CloseTransition="Fade" AnimationDuration="600" Modal="false"
            AllowDrag="true" Alignment="MiddleCentre" Title="<%$ Resources:BalanceDetailsStatistics,IDS_Title_Dialog %>"
            ID="dialogMessage" runat="server" Width="740" >
            <Content>
                <div style="padding:6px;">
                        <input type="text" id="txtUserName" runat="server" style="display:none;" />
                        <UI:CallBack id="CB_cbGrdBalanceDetailList" ClientSideOnCallbackComplete="ResetPager" CacheContent="false" runat="server" PostState="true" Debug="false">
                        <Content>
                            <UI:Grid ID="cbGrdBalanceDetailList" runat="server" AutoGenerateColumns="False" CssClass="GridNoBorder" 
                                        CellPadding="4" ForeColor="#333333" GridLines="None" AllowSorting="false" HeaderStyle-CssClass="GridViewHeaderStyle"
                                        Width="100%" RunningMode="Callback" >
                                        <Columns>
			                                <asp:TemplateField HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_TradeDate %>">
                                                <ItemTemplate>
                                                    <%#Eval("TradeDate")%>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_UserName %>">
                                                <ItemTemplate>
                                                    <%#Eval("UserName")%>
                                                </ItemTemplate>
                                            </asp:TemplateField>		                		    			      
			                                <asp:TemplateField HeaderText = "<%$ Resources:BalanceDetailsStatistics,IDS_Field_TradeType %>" >
			                                    <ItemTemplate>			               
			                                        <Hishop:TradeTypeNameLabel ID="lblTradeType" runat="server"  TradeType='<%# Bind("TradeType") %>' />			         
			                                    </ItemTemplate>
			                                </asp:TemplateField>
			                                <Hishop:MoneyColumnForAdmin HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Income %>" DataField="Income"/>
			                                <Hishop:MoneyColumnForAdmin HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Expenses %>" DataField="Expenses" />
			                                <Hishop:MoneyColumnForAdmin HeaderText="<%$ Resources:BalanceDetailsStatistics,IDS_Field_Balance %>" DataField="Balance"  />
			                                <asp:TemplateField HeaderText = "<%$ Resources:BalanceDetailsStatistics,IDS_Field_Remark %>" ItemStyle-Width="60">
			                                    <ItemTemplate>			               
			                                        <span style="word-break:break-all" ><%#Eval("Remark") %></span>		         
			                                    </ItemTemplate>
			                                </asp:TemplateField>
                                        </Columns>
                                        <RowStyle CssClass="grdrow" ForeColor="#333333" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#EEF8FF" Height="25" CssClass="GridViewHeaderStyle" Font-Bold="True"
                                            ForeColor="#314E9F" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </UI:Grid>
                                 </Content>
                                 </UI:CallBack>
                                 
                                 <div style="text-align:left">
                                    <UI:CallBack id="PagerCallBack" CacheContent="false" PostState="true" Debug="false" runat="server">
                                    <Content>
                                        <UI:Pager runat="server" ListToPaging="cbGrdBalanceDetailList" ListToCallBackID="CB_cbGrdBalanceDetailList" RunningMode="Callback" ID="cbpager" />
                                    </Content>
                                    </UI:CallBack>
                                </div>
               
                </div>
            </Content>
        </UI:Dialog>

        </SkinTemplate>
    </Hishop:BalanceDetailsStatistics>
            
        </div>
        <br />
        <div style="text-align:center">
            <hr style="width:500px;" />
            <Hishop:SiteCopyright runat="server" />
        </div>
        <br />
        <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
    </form>
</body>
</html>
