<%@ Page Title= "" Language="C# " MasterPageFile="~/Views/Shared/Site.Master " Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcApplication1.Controllers.Movies>>" %>
<asp:Content ID= "Content1" ContentPlaceHolderID= "TitleContent" runat= "server">
</asp:Content>
<asp:Content ID= "Content3" ContentPlaceHolderID= "HeadContent" runat= "server">
<link href= "../../Scripts/DataPicker/css/ui.all.css" />
<script src= "../../Scripts/jquery-1.3.2.js" type= "text/javascript"></script>
<script src= "../../Scripts/DataPicker/js/jquery-ui-1.7.1.custom.min.js" type= "text/javascript"></script>
<script src= "../../Scripts/DataPicker/js/ui.datepicker-zh-CN.js" type= "text/javascript"></script>
<script src= "../../Scripts/JS1/Common.js" type= "text/javascript"></script>
<script language= "Javascript" type= "text/javascript">
function setColor() {
var table1 = document.getElementById('table1');
for (i = 0; i < table1.rows.length; i++) {
(i % 2 == 0) ? (table1.rows[i].className = "t1") : (table1.rows[i].className = "t2");
}
}
</script>
<script type= "text/javascript">
$(function () {
$('#startTime').datepicker({
changeMonth: true,
changeYear: true
});
$('#endTime').datepicker({
changeMonth: true,
changeYear: true
});
});
</script>
</asp:Content>
<asp:Content ID= "Content2" ContentPlaceHolderID= "MainContent" runat= "server">
<h2>
ShowDB</h2>
<% using (Html.BeginForm( "Search", "Test"))
{%>
<table id= "table1">
<tr>
<td colspan= "2">
按时间从
</td>
<td colspan= "2">
<input type= "text" id= "startTime" name= "startTime" /> 至 <input type= "text"
id= "endTime" name= "endTime" />
<input type= "submit" id= "btnSearch" value= "查询" />
</td>
</tr>
<tr>
<th>
</th>
<th>
ID
</th>
<th>
MoviewName
</th>
<th>
RealeaseDate
</th>
</tr>
<% foreach (var item in Model)
{ %>
<tr onmouseover= "SetNewColor(this);" onmouseout= "SetOldColor(this);" style= "cursor: hand">
<td>
<%: item.ID%>
</td>
<td>
<%: item.Movie_Name%>
</td>
<td>
<%: item.Realease_Date%>
</td>
<td style= "width: 100%">
<%: Html.ActionLink( "Edit", "Edit", new { id = item.ID })%>
|
<%: Html.ActionLink( "Details", "Details", new { id = item.ID })%>
|
<%: Html.ActionLink( "Delete", "Delete", new { id = item.ID })%>
</td>
</tr>
<% } %>
</table>
<p>
<%: Html.ActionLink( "Create New", "Create")%>
</p>
<div>
</div>
<%} %>
</asp:Content>