
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ENControl.ascx.cs" Inherits="MkSun.Ke_System.Control_Product_ENControl" %>
<script language="JavaScript">
var flag=false;
function DrawImage(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 174/104){
if(image.width>174){ 
ImgD.width=174;
ImgD.height=(image.height*174)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
else{
if(image.height>104){ 
ImgD.height=104;
ImgD.width=(image.width*104)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
}
} 
</script>
<table style="width: 100%">
    <tr>
        <td >
              <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False"
                BorderStyle="None" Width="100%" GridLines="None" ShowHeader="False">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <table align="center" border="0" cellpadding="0" cellspacing="0" width="88%">
                                    <tr>
                                        <td align="center" background="images/product1_bj.gif" height="165" rowspan="2" valign="middle"
                                            width="205">
                                            <a href="ShowProduct.aspx?ID=<%#Eval("ProductID") %>"><img  src="<%#Eval("ProductPhoto") %>"  onload="javascript:DrawImage(this);"  border="0"/></a></td>
                                        <td height="135" style="width: 322px">

                                            Name：<%#Eval("ProductName") %>
                                            <br />
                                            Models：<%#Eval("ProductModel") %>
                                            <br />
                                            Brand：<%#Eval("productBrand")%><br />
                                            Characteristics:<br />
                                            <%#GetStr(Eval("productWeight").ToString(), 100)%></td>
                                    </tr>
                                    <tr>
                                        <td bgcolor="#e5f0fa" height="30" style="width: 322px">
                                            【<a href="ShowProduct.aspx?ID=<%#Eval("ProductID") %>">details&gt;&gt;</a>】</td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
             
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td >
                        <table align="center" cellpadding="3" cellspacing="2">
                <tr>
                    <td style="height: 24px">
                        All Records<asp:Label ID="LabelRecordCount" runat="server">0</asp:Label></td>
                    <td style="height: 24px">
                        </td>
                    <td style="height: 24px">
                        Current Page<asp:Label ID="LabelPageCurrent" runat="server" Text="0"></asp:Label></td>
                    <td style="height: 24px">
                        All Page</td>
                    <td style="height: 24px">
                        <asp:Label ID="LabelPageCount" runat="server">0</asp:Label>
                    </td>
                    <td style="height: 24px">
                        <asp:LinkButton ID="btnPageFirst" runat="server" OnClick="btnPageFirst_Click">FRIST</asp:LinkButton>
                    </td>
                    <td style="height: 24px">
                        <asp:LinkButton ID="btnPageNext" runat="server" OnClick="btnNext_Click">NEXT</asp:LinkButton>
                    </td>
                    <td style="height: 24px">
                        <asp:LinkButton ID="btnPagePre" runat="server" OnClick="btnPre_Click">PROV</asp:LinkButton>
                    </td>
                    <td style="height: 24px">
                        <asp:LinkButton ID="btnPageLast" runat="server" OnClick="btnLast_Click">LAST</asp:LinkButton>
                    </td>
                    <td style="height: 24px">
                        GO TO </td>
                    <td style="width: 85px; height: 24px">
                        <asp:DropDownList ID="DropDownListPage" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownListPage_SelectedIndexChanged">
                        </asp:DropDownList>Page
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
