private void _vista_UsuarioDeseaAgregarEtiquetaACliente(object sender, ScoutingArgumento e) { try { var resultado = ScoutingServicio.GrabarEtiqueta(e); if (resultado.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(resultado.Mensaje, sender); } else { var cliente = new ClienteArgumento(); cliente.Data = e.Cliente; _vista.EtitquetasAsociadas = EtiquetaServicio.ObtenerEtiquetasPorCliente(e.Cliente); _vista.EtitquetasDisponibles = EtiquetaServicio.ObtenerEtiquetasDisponiblesPorScouting(e.Cliente); } } catch (Exception ex) { var grid = sender; _vista.EstablecerError(ex.Message, grid); } }
private void _vista_UsuarioDeseaObtenerClientes(object sender, ClienteArgumento e) { try { _vista.Clientes = ScoutingServicio.ObtenerClientesNuevos(e.Data); } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
private void _vista_UsuarioDeseaObtenerScoutingDeCliente(object sender, ClienteArgumento e) { try { var listaDeScouting = ScoutingServicio.ObtenerScouting(e.Data); _vista.Scouting = (listaDeScouting.Count >= 1) ? listaDeScouting[0] : new Scouting(); } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
private void _vista_UsuarioDesesaGuardarDetalle(object sender, Argumentos.ScoutingArgumento e) { var op = ScoutingServicio.Guardar(e.ClienteDetalle); if (op.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(op.Mensaje, sender); } else { _vista.TirminoDeGrabar("Grabar|0", sender); } }
private void _vista_UsuarioDeseaGrabarScouting(object sender, ScoutingArgumento e) { try { var op = ScoutingServicio.Guardar(e.ClienteDetalle); if (op.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(op.Mensaje, sender); } } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
void _vista_UsuarioDeseaGuardarDatosAdicionalesDeScouting(object sender, ScoutingArgumento e) { try { var resultado = ScoutingServicio.GuardarDatosAdicionalesDeScouting(e); if (resultado.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(resultado.Mensaje, sender); } } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
private void _vista_UsuarioDeseaEliminarEtiquetaAsociadaACliente(object sender, ScoutingArgumento e) { try { var resultado = ScoutingServicio.BorrarEtiqueta(e); if (resultado.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(resultado.Mensaje, sender); } } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
private void _vista_UsuarioSeleccionoScouting(object sender, ScoutingArgumento e) { try { _vista.CargarDatosAdicionalesDeScouting(ScoutingServicio.ObtenerDatosAdicionalesScouting(e)); _vista.EtitquetasAsociadas = EtiquetaServicio.ObtenerEtiquetasPorCliente(e.Cliente); _vista.EtitquetasDisponibles = EtiquetaServicio.ObtenerEtiquetasDisponiblesPorScouting(e.Cliente); _vista.FrecuenciaDeCliente = ScoutingServicio.ObtenerFrecuenciaDeScouting(e.Cliente); _vista.TerminoDeCargarDatos("cpCargarFrecuenciaDeCliente", _vista.FrecuenciaDeCliente, sender); _vista.TerminoDeCargarDatos("cpCargarDatos", "Enabled", sender); } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
private void _vista_UsuarioDesaaGuardarFrecuencia(object sender, ScoutingArgumento e) { try { var resultado = ScoutingServicio.ActualizarFrecuenciaDeScouting(e.FrecuenciaDeCliente); if (resultado.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(resultado.Mensaje, sender); } else { _vista.TerminoDeActualizarDatos(); } } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
private void _vista_UsuarioDeseaGrabarFrecuenciaDeCliente(object sender, ScoutingArgumento e) { try { var op = ScoutingServicio.ActualizarFrecuenciaDeScouting(e.FrecuenciaDeCliente); if (op.Resultado == ResultadoOperacionTipo.Exito) { _vista.FrecuenciaDeCliente = e.FrecuenciaDeCliente; } else { _vista.EstablecerError(op.Mensaje, sender); } } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }
void _vista_UsuarioDeseaCambiarEstadoDeScouting(object sender, ScoutingArgumento e) { try { var resultado = ScoutingServicio.CambiarEstadoDeScouting(e); if (resultado.Resultado == ResultadoOperacionTipo.Error) { _vista.EstablecerError(resultado.Mensaje, sender); } else { _vista.TerminoDeActualizarDatos(); } } catch (Exception ex) { _vista.EstablecerError(ex.Message, sender); } }