This commit is contained in:
mumana 2018-06-14 21:58:13 +00:00
parent e6cac49bed
commit 714483b3b3
3 changed files with 12 additions and 8 deletions

View file

@ -243,12 +243,13 @@ this.CargarTablaPantallas = function (data) {
$.each(lista, function (key, item) {
var pantallas = $("#ucbtnCheck").html();
var id = item.IdPantalla;
var checkbox = $("#ucbtnCheck").html();
checkbox = replaceAll("[$id]", item.IdPantalla, checkbox);
checkbox = replaceAll("[$check]", item.Estado != true ? "" : "checked", checkbox);
TableItems.row.add([id,
item.Descripcion,
'<input type="checkbox" id="chkSeleccionar_' + id + '" >']).draw();
TableItems.row.add([item.IdPantalla,
item.Pantallas.Descripcion,
checkbox]).draw();
});
ENDREQUEST();

View file

@ -128,10 +128,10 @@
</thead>
</table>
</div>
@*<div id="ucbtnCheck" style="display:none;" class="checkbox">
<input type="checkbox" id="chkSeleccionar" value="true">
</div>*@
<div id="ucbtnCheck" style="display:none;">
<input type="checkbox" id="chkSeleccionar_[$id]" [$check]>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success btn-sm" onclick="javascript: GuardarRolesPantallas()">Guardar</button>

View file

@ -108,6 +108,9 @@ namespace Atesa.Utilitarios
{
byte[] body;
var serializer = new JsonSerializer();
serializer.Formatting = Newtonsoft.Json.Formatting.Indented;
serializer.PreserveReferencesHandling = PreserveReferencesHandling.Objects;
serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false });
Message replyMessage = null;
try