Necesito configurar el botón de "Autorizar" en la pantalla de administración instancias. Para configurarlo, hice lo siguiente:

1. Modificar el smartlists "General.FlujosAutorizacion" para agregar el botón "Autorizar"

alt text

2.Modificar el archivo "Admin.aspx" de la ruta "C:\ASEINFO\Evolution Components 1.19.1.0\wwwEvolution\Areas\General\Views\FlujosAutorizacion" agregando una nueva función que se llama "AutorizarInstancia" el cual tiene la siguiente definición:

function AutorizarInstancia(sender, e) {
var comentarios = prompt('<%=this.GetLocalized("lblComentarios.Text") %>');
if (comentarios != null) {
$.post('<%= Url.Action("Autorizar") %>', e.QueryString.replace("codigos", "id") + "&" + utils.getValidationTokensFormData() + "&comentarios=" + comentarios + "&areaOrigen=<%= ViewContext.ControllerArea() %>&controllerOrigen=<%= ViewContext.RouteData.Values["controller"] %>&actionOrigen=<%= ViewContext.RouteData.Values["action"] %>", function(response) {
$('#<%=Constants.MessagesDivName%>').html(response);
});
}

alt text

 3.En el mismo archivo modifiqué la línea Html.SmartList quedando de la siguiente manera: <% Html.SmartList("smlInstancias", "General.FlujosAutorizacion", new Dictionary<string, string> { { "anular", "AnularInstancia" },{ "autorizar", "AutorizarInstancia" } }); %>

4.Al intentar autorizar un registro me devuelve un error de "NullReferenceException"

alt text

**

System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
en Aseinfo.VH4.General.Controllers.FlujosAutorizacionController.Autorizar(List`1 codigosActividades, String comentarios, String areaOrigen, String controllerOrigen, String actionOrigen, String filtro, String returnAction) en C:\vh4\VH4\General\Controllers\FlujosAutorizacionController.cs:línea 670
en lambda_method(Closure , ControllerBase , Object[] )
en System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
en System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_6.<BeginInvokeAction>b__4()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)

**

¿Qué hace falta para que pueda autorizar?

asked 18 Apr '22, 16:39

Lester%20Jimenez's gravatar image

Lester Jimenez
561613
accept rate: 33%

edited 19 Apr '22, 14:18

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Evolution en BitBucket

En este sitio puede acceder al código fuente, centro de descargas y reportar bugs, propuestas y mejoras para Evolution.

Evolution en JIRA

En este sitio puedes sugerir nueva funcionalidad para Evolution, o puedes votar por la funcionalidad ya propuesta por otros usuarios.

Tags:

×47
×5
×3

Asked: 18 Apr '22, 16:39

Seen: 542 times

Last updated: 19 Apr '22, 14:18

[Acerca de] [Preguntas Frecuentes] [Privacidad] [Soporte] [Contacto]
Copyright 2013-2018. Asesores en Informática