Created
May 7, 2013 00:00
-
-
Save yesez/5529277 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<PartialView_Ajax.Models.VentasMes> | |
@{ | |
ViewBag.Title = "Resumen"; | |
} | |
<h2>Resumen Ventas</h2> | |
<table> | |
<tr> | |
<th> | |
@Html.DisplayNameFor(model => model.Mes) | |
</th> | |
<th> | |
@Html.DisplayNameFor(model => model.Valor) | |
</th> | |
<th></th> | |
</tr> | |
@foreach (var item in Model) { | |
<tr> | |
<td> | |
@Html.DisplayFor(modelItem => item.Mes) | |
</td> | |
<td> | |
@Html.DisplayFor(modelItem => item.Valor) | |
</td> | |
<td> | |
@Ajax.ActionLink("Detalles", "ViewDetails", new { id = item.Id}, new AjaxOptions { UpdateTargetId="divDetails" }, new {@class = "linkDetail" }) | |
</td> | |
</tr> | |
} | |
</table> | |
<div id="divDetails"></div> | |
<button id="btnOcultar">Ocultar</button> | |
@section scripts | |
{ | |
<script> | |
$(document).ready(function () { | |
$('#btnOcultar').click(function () { | |
$('#divDetails').hide(); | |
}); | |
$('.linkDetail').click(function () { | |
$('#divDetails').show(); | |
}); | |
}); | |
</script> | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment