Created
January 7, 2014 08:31
-
-
Save housemeow/8296301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IEnumerable<MvcApplication1.Models.UnitCounter> | |
@{ | |
ViewBag.Title = "公部門函轉統計資料庫"; | |
} | |
@section Scripts{ | |
@Scripts.Render("~/bundles/jqueryui") | |
@Styles.Render("~/Content/themes/base/css", "~/Content/css") | |
<script type="text/javascript"> | |
$(function () { | |
function startDateChanged(e) { | |
e.preventDefault(); | |
if ($('#endDateString').val() == "") { | |
$('#endDateString').val($('#startDateString').val()); | |
} | |
var startDate = $('#startDateString').datepicker("getDate"); | |
var endDate = $('#endDateString').datepicker("getDate"); | |
if (startDate > endDate) { | |
alert("結束日期不得早於起始日期"); | |
$('#startDateString').val($('#endDateString').val()); | |
} | |
}; | |
function endDateChanged() { | |
if ($('#startDateString').val() == "") { | |
$('#startDateString').val($('#endDateString').val()); | |
} | |
var startDate = $('#startDateString').datepicker("getDate"); | |
var endDate = $('#endDateString').datepicker("getDate"); | |
if (startDate > endDate) { | |
alert("結束日期不得早於起始日期"); | |
$('#startDateString').val($('#endDateString').val()); | |
} | |
}; | |
$.datepicker.setDefaults({ | |
dateFormat: "yy/mm/dd" | |
}); | |
$('#startDateString').datepicker(); | |
$('#startDateString').change(startDateChanged); | |
$('#endDateString').datepicker(); | |
$('#endDateString').change(endDateChanged); | |
}); | |
</script> | |
} | |
<div class="sub_header"> | |
<div class="sub_header_title"> | |
<h2>公部門函轉統計資料庫</h2> | |
</div> | |
</div> | |
@using (Html.BeginForm("List", "CaseAnalysis", FormMethod.Post)) | |
{ | |
<section id="contentcenterfordate"> | |
<p> | |
StartDate:<input type="text" name="startDateString" id="startDateString" value="@ViewBag.StartDate.ToShortDateString()"/> | |
End Date:<input type="text" name="endDateString" id="endDateString" value="@ViewBag.EndDate.ToShortDateString()"/> | |
</p> | |
</section> | |
<section id="contentforselect"> | |
<p> | |
@* <input type="checkbox" name="selectAllUnit" />全選*@ | |
@Html.Label("請選擇單位:") | |
<select name="selectedUnits" multiple size="10"> | |
@foreach (var o in ViewBag.UnitList) | |
{ | |
<option value="@o.ID">@o.Name</option> | |
} | |
</select> | |
</p> | |
<p> | |
@* <input type="checkbox" name="selectAllIP" />全選*@ | |
@Html.Label("請選擇IP:") | |
<select name="selectedIPs" multiple size="3"> | |
@foreach (var o in ViewBag.IPList) | |
{ | |
<option value="@o.ID">@o.Name</option> | |
} | |
</select> | |
</p> | |
<p> | |
@* <input type="checkbox" name="selectAllCaseType" />全選*@ | |
@Html.Label("請選擇案件型態:") | |
<select name="selectedCaseTypes" multiple size="10"> | |
@foreach (var o in ViewBag.CaseTypeList) | |
{ | |
<option value="@o.ID">@o.ID @o.Name</option> | |
} | |
</select> | |
</p> | |
<input type="submit" value="送出" /> | |
<input type="reset" value="重設" /> | |
</section> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment