<%@ page language="C#" autoeventwireup="true" inherits="general_Contract_ContrtactList, CrmCommand" %>
<%@ Register TagPrefix="C1WebGrid" Namespace="C1.Web.C1WebGrid" Assembly="C1.Web.C1WebGrid.2" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>合同待审核列表</title>
   <script src="../../Javascript/canlendar.js" type="text/javascript"></script>
                   <script src="../../Javascript/Trim.js" type="text/javascript"></script>
    <script language=javascript type="text/javascript">
    function RLtrim()
    {
       var t1=document.getElementById("Text1").value;
       var t2=document.getElementById("Text2").value;
       if(Trim(t1) && Trim(t2))
       {
         
         return true;
       }
       else
       {
       alert('日期不能为空');
        return false;
       }
    }
    
    </script>
</head>
<body class ="bodycolor" leftmargin="0" topmargin="0">
    <form id="form1" runat="server">
    <div>
    <table align="center" bgcolor="#000000" border="0" cellspacing="1"
                                class="small" style="width: 800px">
                                <tr>
                                    	<td class="TableData" colspan="3" style="width: 800px;">
            
	<table style="width: 100%" cellspacing="0" cellpadding="0">
		<tr>
			<td style="width: 68px">客户名称:</td>
			<td style="width: 128px"><asp:TextBox ID="TxtName" runat="server" CssClass="BigInput"></asp:TextBox>
			</td>
			<td style="width: 69px">签约日期:</td>
			<td style="width: 114px"> 
			<input id="Text1"  runat="server" style="border: 1px solid #C0C0C0; width: 110px" type="text" readonly /></td>
			<td style="width: 12px">
                                    <img border="0" onclick='popUpCalendar(document.getElementById("Text1"), document.getElementById("Text1"), "yyyy-mm-dd")'
                                        src="../../App_Themes/Green/images/Calendar.gif" style="width: 20px; height: 23px" /></td>
			<td style="width: 10px">至</td>
			<td style="width: 113px">
			<input id="Text2" runat="server" style="border: 1px solid #C0C0C0; width: 110px" type="text" readonly /></td>
			<td style="width: 40px">
                                    <img border="0" onclick='popUpCalendar(document.getElementById("Text2"), document.getElementById("Text2"), "yyyy-mm-dd")'
                                        src="../../App_Themes/Green/images/Calendar.gif" style="width: 20px; height: 23px" /></td>
			<td>
                                    <asp:Button
                                        ID="Button7" runat="server" CssClass="BigButton" Height="20px" OnClick="Button7_Click"
                                        Text="合同检索" Width="78px" OnClientClick="return RLtrim()" /></td>
					</tr>
	</table>
	                          </td>
                                </tr>
                                <tr>
                                    <td class="TableData" colspan="3" Height="600px" valign=top  style="width: 800px">
                                                                            <C1WebGrid:C1WebGrid ID="C1WebGrid1" runat="server" AllowPaging="True" AllowSorting="True"
                                        AutoGenerateColumns="False" CallbackOptions="Sorting,Selection" 
                                        DataKeyField="Cl_ContractId"   OnItemCreated="C1WebGrid1_ItemCreated"
                                        OnPageIndexChanging="C1WebGrid1_PageIndexChanging" OnSortingCommand="C1WebGrid1_SortingCommand"
                                        PageSize="20" SkinID="gridviewSkin" Width="800px">
                                            <Columns>
                                                <C1WebGrid:C1BoundColumn DataField="Contract_Num" HeaderText="合同编号" SortExpression="Contract_Num">
                                                </C1WebGrid:C1BoundColumn>
                                                    <C1WebGrid:C1BoundColumn DataField="User_Name" HeaderText="跟踪人" SortExpression="User_Name">
                                            </C1WebGrid:C1BoundColumn>
                                            <C1WebGrid:C1TemplateColumn HeaderText="客户名称" SortExpression="Client_Name">

                <ItemTemplate>
                    <asp:Label    ID="Lkb" Text='<%# Server.HtmlDecode(Eval("Client_Name").ToString()).Length > 10 ? Server.HtmlDecode(Eval("Client_Name").ToString()).Substring(0, 10) + "..." : Server.HtmlDecode(Eval("Client_Name").ToString())%>'  ToolTip='<%#Server.HtmlDecode(Eval("Client_Name").ToString())%>' runat="server"></asp:Label>
 
                								</ItemTemplate>
            </C1WebGrid:C1TemplateColumn>
                                                <C1WebGrid:C1BoundColumn DataField="Product_TotalPrice" DataFormatString="{0:C}"
                                                    HeaderText="合同金额" SortExpression="Product_TotalPrice">
                                                </C1WebGrid:C1BoundColumn>
                                                <C1WebGrid:C1TemplateColumn HeaderText="签约日期" SortExpression="Tracd_Time">
                                                    <ItemTemplate>
                                                        <%#string.Format("{0:d}",Eval("Tracd_Time"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" Wrap="True" />
                                                    <HeaderStyle HorizontalAlign="Center" />
                                                </C1WebGrid:C1TemplateColumn>
                                                <C1WebGrid:C1BoundColumn DataField="Contract_State" HeaderText="合同状态" SortExpression="Contract_State">
                                                </C1WebGrid:C1BoundColumn>
                                                <C1WebGrid:C1TemplateColumn HeaderText="合同审核">
                                                    <ItemTemplate>
                                                        <a href="ContractExamine.aspx?ConId=<%#Eval("Cl_ContractId") %>" >
                                                            合同审核
                                                        </a>
                                                    </ItemTemplate>
                                                </C1WebGrid:C1TemplateColumn>
                                            								</Columns>
                                        </C1WebGrid:C1WebGrid></td></tr></table>
    </div>
    </form>
</body>
</html>
