-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_ClientInbox.cshtml
183 lines (160 loc) · 6.59 KB
/
_ClientInbox.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
181
182
183
@{
int sno = 1;
}
<form id="frmclient">
<div class="x_content" id="clientlist">
<table class="table table-striped responsive-utilities jambo_table bulk_action customTable" id="tbl_Account">
<thead>
<tr class="heading">
<th><input type="checkbox" name="chemeli" class="checkbox" id="chkqcInboxGroup" /></th>
<th class="sorting"><label>S.No</label></th>
<th style="display:none"><label>Column ID</label></th>
<th><label>CLIENT ID</label>
<th><label>CLIENT NAME</label></th>
<th><label>UPDATED BY</label></th>
<th><label>UPDATED DATE</label></th>
@*<th><label>Edit Column</label></th>
<th><label>Delete Column</label></th>*@
</tr>
</thead>
<tbody>
@foreach (System.Data.DataRow row in Model.Rows)
{
<tr>
<td><input type="checkbox" class="checkbox allotChk [email protected](sno)" id="[email protected](sno)" /></td>
<td [email protected](sno)>@Convert.ToInt32(sno)</td>
@Html.HiddenFor(x => row[0], new { @id = "btId" })
@foreach (var cell in row.ItemArray)
{
<td>@cell.ToString() </td>
}
@*<td><u><a onclick="EditClient('@row[0]')" class="btn btn-success">Edit Column</a></u></td>
<td><u><a class="btn btn-info" onclick="DeleteClient('@row[0]')">Delete Column</a></u></td>*@
</tr>
sno++;
}
</tbody>
</table>
</div>
@*@Html.HiddenFor(x => row[0], new { @id = "btId" })*@
@if (ViewBag.AuthorList == null)
{
}
else
{
@*<div class="x_content" id="clientEdit">
@foreach (System.Data.DataRow row in ViewBag.AuthorList.Rows)
{
<div class="modal-content">
<div class="modal-header">
<button type="button" tabindex="0" class="close" data-dismiss="modal" onclick="CloseModal()">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">Column Details</h4>
</div>
<table>
<tr>
<td>
<label class="control-label col-md-2" id="lblclientid">CID</label>
</td>
<td class="col-md-10">
<input class="form-control" id="txtcid" name="txtcid" type="text" value="@row[0]" />
</td>
</tr>
<tr>
<td>
<label class="control-label col-md-2" id="lblclientid">Client ID</label>
</td>
<td class="col-md-10">
<input class="form-control" id="txtclientid" name="txtclientid" type="text" value="@row[1]" />
</td>
</tr>
<tr>
<td>
<label class="control-label col-md-2" id="lblclientname">Client Name</label>
</td>
<td class="col-md-10">
<input class="form-control" id="txtclientname" name="txtclientname" type="text" value="@row[2]" />
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
<div class="modal-footer" style="text-align:center">
<button type="submit" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="CloseModal()">Close</button>
</div>
}
}
</div>*@
}
</form>
<script>
$(document).ready(function () {
$('#tbl_Account').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false,
"columnDefs": [
{
"targets": [1],
"bSortable": false,
},
{
"targets": [2],
"visible": false
}
]
});
});
function EditClient(ClientID) {
debugger;
$.ajax({
url: '@Url.Action("EditClientList")',
cache: false,
type: 'GET',
dataType: 'html',
data: { CID: ClientID },
beforeSend: function () {
},
success: function (data) {
$('#clientEdit').first().html(data);
//alert('Success');
},
error: function (jXhr) {
alert(jXhr);
}
});
}
function DeleteClient(ClientID) {
debugger;
$.ajax({
url: '@Url.Action("DeleteClientList")',
cache: false,
type: 'POST',
data: { ClientID: ClientID },
dataType: 'JSON',
beforeSend: function () {
},
success: function (data) {
//document.getElementById('txtcname').value = "";
LoadClientInboxGrid()
SuccessMessage("Data has been deleted");
},
error: function (jXhr) {
//LoadClientInboxGrid()
//SuccessMessage("Data has been deleted");
}
});
}
$("#chkqcInboxGroup").click(function () {
$(".allotChk").prop('checked', $(this).prop('checked'));
});
</script>