Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model IEnumerable<EditInventoryHistoryModel>
- @{
- Layout = "~/Views/TankCommand/_TankLayout.cshtml";
- }
- <table class="standard">
- <thead>
- <tr>
- <th>Date</th>
- <th>Reading Date</th>
- <th>Ambient Volume</th>
- <th>Standard Volume</th>
- <th>Options</th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model)
- {
- @Html.Action("Edit", "InventoryHistory", new { id = item.Id })
- }
- </tbody>
- </table>
- <div class="clear"></div>
- <script type="text/javascript">
- $(document).ready(function () {
- $('.fetchFromDevice').click(function () {
- alert("fetch from device");
- $.ajax({
- url: '@Url.Action("FetchFromDevice", "InventoryHistory")',
- data: JSON.stringify({ id: model.id, model: model }),
- type: 'POST',
- contentType: 'application/json; charset=utf-8;',
- success: function (response) {
- },
- error: function (xhr, status, error) {
- alert(error);
- }
- });
- });
- $('.fetchFromIR').click(function () {
- alert("fetch from IR");
- $.ajax({
- url: '@Url.Action("FetchFromInventoryReconciliation", "InventoryHistory")',
- data: JSON.stringify({ id: model.Id, model: model }),
- type: 'POST',
- contentType: 'application/json; charset=utf-8;',
- success: function (response) {
- },
- error: function (xhr, status, error) {
- alert(error);
- }
- });
- });
- $('.set').click(function () {
- var row = $(this).closest('tr');
- var itemId = row.data("itemid");
- var model = { "Id": itemId };
- data.Volume = row.find('#Volume').val();
- data.Date = row.find('#Date').val();
- data.TemperatureCompensatedVolume = row.find('#TemperatureCompensatedVolume').val();
- alert(model);
- $.ajax({
- url: '@Url.Action("Edit", "InventoryHistory")',
- data: { id: itemId, model: model },
- type: 'POST',
- contentType: 'application/json; charset=utf-8;',
- success: function (response) {
- },
- error: function (xhr, status, error) {
- alert(error);
- }
- });
- });
- });
- </script>
Add Comment
Please, Sign In to add comment