Al guardar un tiempo no trabajado me manda este mensaje
La acción 'Create' del controlador 'TiempoNoTrabajado' ha lanzado la excepción 'NullReferenceException' con el mensaje: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Aseinfo.VH4.Infraestructura.Services.Calculos.CalculosTiempoService.<>c__DisplayClass4f.<GetJornadasAsignadasEmpleoEntreFechasJornadasFechas>b__37(JornadaEmpleo jpe) in c:\BuildAgent\work\89066541112bb801\VH4\Infraestructura\Services\Calculos\CalculosTiempoService.cs:line 975
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Aseinfo.VH4.Infraestructura.Services.Calculos.CalculosTiempoService.GetJornadasAsignadasEmpleoEntreFechasJornadasFechas(Empleo empleo, DateTime fechaInicial, DateTime fechaFinal, Boolean incluyeAsuetos) in c:\BuildAgent\work\89066541112bb801\VH4\Infraestructura\Services\Calculos\CalculosTiempoService.cs:line 957
at Aseinfo.VH4.Infraestructura.Services.Calculos.CalculosTiempoService.GetFechaFinalTiempoNoTrabajado(Empleo empleo, TipoTiempoNoTrabajado tipoTiempoNoTrabajado, DateTime fechaInicio, Int32 dias, Int32 horas, Int32 minutos) in c:\BuildAgent\work\89066541112bb801\VH4\Infraestructura\Services\Calculos\CalculosTiempoService.cs:line 595
at Aseinfo.VH4.Salarios.Controllers.TiempoNoTrabajadoController.SaveTiempoNoTrabajado(TiempoNoTrabajado entity, Nullable`1 codigoEmpleo, Nullable`1 codigoEmpleoSolicita, String codigoTipo, String codigoVisualTipoPlanilla, String codigoVisualPlanilla, Nullable`1 horaInicio, Nullable`1 horaFinal, Boolean inserting, Nullable`1 iniciaFlujo) in c:\BuildAgent\work\89066541112bb801\VH4\Salarios\Controllers\TiempoNoTrabajadoController.cs:line 461
at Aseinfo.VH4.Salarios.Controllers.TiempoNoTrabajadoController.Create(TiempoNoTrabajado entity, Nullable`1 codigoEmpleo, Nullable`1 codigoEmpleoSolicita, String codigoTipo, String codigoVisualTipoPlanilla, String codigoVisualPlanilla, Nullable`1 horaInicio, Nullable`1 horaFinal, Nullable`1 iniciaFlujo) in c:\BuildAgent\work\89066541112bb801\VH4\Salarios\Controllers\TiempoNoTrabajadoController.cs:line 267
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
asked
04 Jun '15, 09:03
ohernandez
206●15●15●15
accept rate:
0%
Encende el MiniProfiler y monitorea las instrucciones select que ejecuta.
La instrucción donde da el error involucra la asignación de la Jornada al empleo, el detalle de horario para la jornada, y la especificación de jornada en fechas especificas para la persona (tabla: sal.jpe).
Con esto podrías tener una idea de donde está la nulidad no esperada