git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C177
This commit is contained in:
parent
42f99696a0
commit
daff486e3d
3 changed files with 11 additions and 6 deletions
|
|
@ -307,7 +307,7 @@ this.GuardarRolesPantallas = function () {
|
|||
if (!confirm("Va registrar las opciones asociadas.\n ¿Desea continuar?"))
|
||||
{ return; }
|
||||
|
||||
GridRolesOpciones = $('#GridRolesUsuarios').DataTable();
|
||||
GridRolesOpciones = $('#GridRolesOpciones').DataTable();
|
||||
var IdRoles = $('#hiddenIdRol').val();
|
||||
var ArrayRolesOpciones= [];
|
||||
var data = GridRolesOpciones
|
||||
|
|
@ -316,12 +316,15 @@ this.GuardarRolesPantallas = function () {
|
|||
|
||||
$.each(data, function (key, item) {
|
||||
|
||||
|
||||
var estado = item[1] == 0 ? true : false
|
||||
|
||||
RolesPantallas = {
|
||||
|
||||
IdRolesPantallas: item[1],
|
||||
IdRol: IdRoles,
|
||||
Descripcion: item[2],
|
||||
Estado: true
|
||||
IdPantalla: item[2],
|
||||
Estado: estado
|
||||
|
||||
}
|
||||
ArrayRolesOpciones.push(RolesPantallas);
|
||||
|
|
@ -329,7 +332,7 @@ this.GuardarRolesPantallas = function () {
|
|||
|
||||
var uri = CatalogosWCF + '/api/InsertarActualizarRolesPantallas';
|
||||
var model = {
|
||||
ListaRolesPantallas: ArrayRolesPantallas
|
||||
ListaRolesPantallas: ArrayRolesOpciones
|
||||
};
|
||||
|
||||
AjaxPostData(uri, model, false, true, null, null, null);
|
||||
|
|
@ -363,7 +366,7 @@ this.HabilitarOpcion = function (id, value) {
|
|||
ArrayRolesPantallas.push(RolesPantallas);
|
||||
|
||||
var model = {
|
||||
ListaRolesPantallas: RolesPantallas
|
||||
ListaRolesPantallas: ArrayRolesPantallas
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@
|
|||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="javascript: GuardarRolesOpciones()">Guardar</button>
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="javascript: GuardarRolesPantallas()">Guardar</button>
|
||||
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
model.FechaModificacion = DateTime.Now;
|
||||
model.FechaCreacion = Actual.FechaCreacion;
|
||||
model.UsuarioCreacion = Actual.UsuarioCreacion;
|
||||
model.IdPantalla = Actual.IdPantalla;
|
||||
model.IdRol = Actual.IdRol;
|
||||
Conn.Entry(Actual).State = System.Data.Entity.EntityState.Detached;
|
||||
Conn.RolesPantallas.Attach(model);
|
||||
Conn.Entry(model).State = System.Data.Entity.EntityState.Modified;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue