private void AsignarDatosControl() { int usuarioID = AuxConfiguracion.ObtenerUsuarioLogueado(); Contexto.UsuarioCreacionID = usuarioID; var loteProyeccionPL = new LoteProyeccionPL(); LoteProyeccionInfo loteProyeccionOriginal = loteProyeccionPL.ObtenerPorLoteCompleto(Contexto.Lote); if (loteProyeccionOriginal != null) { bool proyeccionIgual = Extensor.CompararObjetos(Contexto.LoteProyeccion, loteProyeccionOriginal, false); if (!proyeccionIgual) { Contexto.LoteProyeccion.AplicaBitacora = true; } LoteProyeccionInfo proyeccionBitacora = loteProyeccionPL.ObtenerBitacoraPorLoteProyeccionID(Contexto.LoteProyeccion.LoteProyeccionID); if (proyeccionBitacora == null) { Contexto.LoteProyeccion.AplicaBitacora = true; } } DateTime fecha = dtpFechaDisponible.SelectedDate.HasValue ? dtpFechaDisponible.SelectedDate.Value : DateTime.MinValue; Contexto.LoteProyeccion.FechaSacrificio = fecha; Contexto.FechaDisponible = fecha; if (Contexto.LoteProyeccion.LoteProyeccionID == 0) { Contexto.LoteProyeccion.DiasEngorda = Contexto.TotalDias; Contexto.LoteProyeccion.UsuarioCreacionID = usuarioID; } else { Contexto.LoteProyeccion.UsuarioModificacionID = usuarioID; } if (Contexto.LoteProyeccion.ListaReimplantes != null && Contexto.LoteProyeccion.ListaReimplantes.Any()) { Contexto.LoteProyeccion.ListaReimplantes.ToList().ForEach(reimp => reimp.UsuarioCreacionID = usuarioID); } }