Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Html.HiddenFor(model => model.item.lineNum)
- </div>
- <br /><br />
- <h4>Issued Items</h4>
- <hr />
- <div class="form-group">
- <table>
- <tr>
- <th class="col-md-4">Item Number</th>
- <th class="col-md-4">Item Description</th>
- <th class="col-md-4">Expense Account</th>
- <th class="col-md-2">Quantity Requested</th>
- <th class="col-md-2">Quantity Issued</th>
- <th class="col-md-1">UOM</th>
- <th class="col-md-1">Item Price</th>
- </tr>
- @{
- foreach (var issueditem in ViewBag.IssuedItems)
- {
- <tr>
- <td class="col-md-4">@issueditem.itemNumber</td>
- <td class="col-md-4">@issueditem.description</td>
- <td class="col-md-4">@issueditem.expense_account.getDescription</td>
- <td class="col-md-2">@issueditem.quantity.ToString()</td>
- <td class="col-md-2">@issueditem.quantityI.ToString()</td>
- <td class="col-md-1">@issueditem.selecteduomtext </td>
- <td class="col-md-1">@issueditem.price.ToString()</td>
- <td>@Html.ActionLink("Edit", "Edit", new { id = issueditem.lineNum })</td>
- </tr>
- }
- }
- <tr></tr>
- </table>
- public ActionResult Edit(int id)
- {
- getIssue.item = getIssue.items[id - 1];//Returns the requested item for editing
- return View(getIssue);
- }
- /// <summary>
- /// Gets the changes submitted from the user and updates the Item in the List
- /// </summary>
- /// <param name="issue"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Edit(Issue issue)
- {
- int indx = issue.item.lineNum - 1;
- getIssue.items[indx] = issue.item;
- //return View(getIssue);
- return RedirectToAction("IssueItem", "Issue", new { id = indx });
- }
Add Comment
Please, Sign In to add comment