-
Notifications
You must be signed in to change notification settings - Fork 0
/
_ReleaseInbox.cshtml
180 lines (156 loc) · 6.59 KB
/
_ReleaseInbox.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
@model List<Denial_Coding.BAL.ViewModels.TransactionModel>
@{
int sno = 1;
}
<form id="frmcolumn">
<div class="x_content">
<input type="button" class="col-md-2 col-sm-2 col-lg-2 btn btn-primary" id="btncompleted" style="width: 12%;" onclick="return Release()" value="Release" />
</div>
<table id="periCoderInbox" class="table table-striped responsive-utilities jambo_table bulk_action customTable" style="width:100%">
<thead>
<tr>
<th><input type="checkbox" name="chemeli" class="checkbox" id="chkqcInboxGroup" /></th>
<th class="sorting"><label>S.No</label></th>
<th style="display:none">ID</th>
<th>Client #</th>
<th>Account Number</th>
<th>DOS</th>
<th>Denial Worked Date</th>
<th>Denial Type</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@for (int i = 0; i < @Model.Count; i++)
{
if (Model[i].ACCOUNT_NO != null && Model[i].ACCOUNT_NO != "")
{
<tr>
<td>
<input type="checkbox" class="checkbox allotChk chk_@Convert.ToInt32(sno)" id="chk_@Convert.ToInt32(sno)" onclick="TestClick()" />
@Html.Hidden("IMP_ID",@Model[i].IMPORT_ID, new { @id = "btId" })
</td>
<td class="col-md-1 col-sm-1 col-lg-1" id=@Convert.ToInt32(sno)>@Convert.ToInt32(sno)</td>
<td class="col-md-2 col-sm-2 col-lg-2" style="display:none">@Model[i].IMPORT_ID</td>
<td class="col-md-2 col-sm-2 col-lg-2">@Model[i].CLIENT_ID</td>
<td class="col-md-2 col-sm-2 col-lg-2">@Model[i].ACCOUNT_NO</td>
@if (Model[i].DOS == null)
{
<td class="col-md-2 col-sm-2 col-lg-2"></td>
}
else
{
<td class="col-md-2 col-sm-2 col-lg-2">@Convert.ToDateTime(@Model[i].DOS).ToShortDateString()</td>
}
<td class="col-md-3 col-sm-3 col-lg-2">@Convert.ToDateTime(@Model[i].DENIAL_WORKED_DT).ToShortDateString()</td>
<td class="col-md-3 col-sm-3 col-lg-2">@Model[i].DENIAL_TYPE</td>
<td class="col-md-3 col-sm-3 col-lg-2"><u><a onclick="EditCol(@Model[i].IMPORT_ID)" class="btn btn-success">Edit Column</a></u></td>
<td class="col-md-3 col-sm-3 col-lg-2"><u><a class="btn btn-info" onclick="DeleteCol(@Model[i].IMPORT_ID)">Delete Column</a></u></td>
</tr>
}
sno++;
}
</tbody>
</table>
<label style="display:none" id="inLblCount">@Model.Count</label>
<input type="text" value="" id="txtHidden" style="display:none" />
</form>
<script>
$(document).ready(function () {
table = $('#periCoderInbox').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false
});
});
$("#chkqcInboxGroup").click(function () {
$(".allotChk").prop('checked', $(this).prop('checked'));
TestClick();
});
function TestClick() {
debugger;
var countImagesWithoutSrc = 0;
var all = new Array();
var tableControl = document.getElementById('periCoderInbox');
$('input:checkbox:checked', tableControl).each(function () {
//checkList.push($(this).attr("id"));
all[countImagesWithoutSrc] = $(this).closest('tr').find('#btId').val();
++countImagesWithoutSrc;
}).get();
$('#txtHidden').val(0 + all);
//alert($('#txtHidden').val());
//alert($('#txtHidden').val());
}
function Release() {
debugger;
var IMPID = $("#txtHidden").val();
if (!confirm("Are you sure? Do you want to Release this accounts ?")) {
return false;
}
else {
$.ajax({
url: '@Url.Action("ReleaseTransaction")',
cache: false,
type: 'POST',
data: { IMPID: IMPID },
dataType: 'JSON',
beforeSend: function () {
},
success: function (data) {
LoadreleasedInboxGrid();
SuccessMessage('Released Successfully');
},
error: function (jXhr) {
alert(jXhr);
}
});
}
}
function EditCol(IMPORT_ID) {
debugger;
$.ajax({
url: '@Url.Action("EditTransactionList","Transaction")',
cache: false,
type: 'GET',
dataType: 'html',
data: { IMPORT_ID: IMPORT_ID },
beforeSend: function () {
},
success: function (data) {
$('#divEDITCol').first().html(data);
//alert('Success');
},
error: function (jXhr) {
alert('Failure');
}
});
}
function DeleteCol(ImportID) {
if (!confirm("Are you sure? Do you want to Delete this account ?")) {
return false;
}
else {
$.ajax({
url: '@Url.Action("DeleteReleasedList")',
cache: false,
type: 'POST',
data: { IMPORT_ID: ImportID },
dataType: 'JSON',
beforeSend: function () {
},
success: function (data) {
//document.getElementById('txtcname').value = "";
LoadreleasedInboxGrid();
SuccessMessage("Data has been deleted");
},
error: function (jXhr) {
alert('Failure');
}
});
}
}
</script>