Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "submitForm", onload = "toggleTable()" }))
- {
- <div class="row">
- @*<input type="text" name="CasinoID" placeholder="Enter Casino ID" id="cIdSearch" />*@
- @*<div>
- @Html.DropDownList("CasinoID", Model.TerminalReceiptPostData.CasinoIdDDL, "Select Casino", new { id = "cIdSearch", @class = "custom-class-for-dropdown card" })
- </div>*@
- <div>
- @Html.DropDownList("CasinoID", Model.TerminalReceiptPostData.CasinoIdDDL, "Select Casino", new { id = "cIdSearch", @class = "custom-class-for-dropdown card" })
- </div>
-
- <div>
- <input id="datepicker" class="datepicker-base card" name="Date" placeholder="MM/DD/YYY" type="text" />
- </div>
-
- <div>
- <button type="submit" class="btn btn-sm btn-primary" id="search" onclick="toggleTable()" > Search Transactions</button>
- </div>
- </div>
- }
- <hr />
- <div class="row " id="ReceiptsMainDiv">
- <div class="col-md-12" style="overflow-y:scroll">
- <table class="table table-striped table-hover table-bordered" id="terminalReceipts">
- <thead>
- <tr>
- <th>Terminal ID</th>
- <th>Local Transaction Time</th>
- <th>Amount</th>
- <th>Receipt</th>
- <td class="hidden"></td>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model.TransactionsTests)
- {
- <tr id="@String.Concat("rowIndex", Model.TransactionsTests.IndexOf(item))">
- <td>@item.TerminalID</td>
- <td>@item.TransactionTime</td>
- <td>@item.Amount</td>
- @*<td>@Html.ActionLink("View Receipt", "ViewReceipt", new { id = item.Id }, new { @class = "btn btn-primary btn-sm" }) <br /></td>*@
- <td class="transactionID hidden">@item.Id</td>
- <td>
- @if (item.ReceiptData == null)
- {
- <button class="btn btn-sm btn-primary viewReceipt" disabled>View Receipt</button>
- }
- else
- {
- <button class="btn btn-sm btn-primary viewReceipt" data-rowindex="@String.Concat("rowIndex", Model.TransactionsTests.IndexOf(item))">View Receipt</button>
- }
- </td>
- </tr>
- }
- </tbody>
- </table>
- </div>
- </div>
- [HttpPost]
- public ActionResult Index(string CasinoID, DateTime Date)
- {
- //var id = Int32.Parse(Request.Form["CasinoID"].ToString());
- var Cid = Request.Form["CasinoID"];
- Cid = GetNumbers(Cid);
- var id = Int32.Parse(Cid);
- var model = TRBL.GetTransactionTestsData(id, Date);
- model.TerminalReceiptPostData = TRBL.GetCasinosDDL();
- return View(model);
- }
- function toggleTable() {
- $("#ReceiptsMainDiv").toggle();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement