private void MenuPerfilesEmpleados_Click(object sender, RoutedEventArgs e) { BusquedaEmpleados _busEmple = new BusquedaEmpleados(); _busEmple.InitializeComponent(); this.Close(); _busEmple.Show(); }
private void lab_menuCreacionPerf_MouseDown(object sender, MouseButtonEventArgs e) { //EVENTO PARA REDIRECCIONAR AL FORMULARIO DE EMPLEADO BusquedaEmpleados _busEmple = new BusquedaEmpleados(); _busEmple.InitializeComponent(); this.Close(); _busEmple.Show(); }
private void Label_MouseDown_1(object sender, MouseButtonEventArgs e) { BusquedaEmpleados _busEmple = new BusquedaEmpleados(); _busEmple.InitializeComponent(); this.Close(); _busEmple.Show(); }
private void btn_ActualizarInfoBasica_Click(object sender, RoutedEventArgs e) { if (!(string.IsNullOrEmpty(txtNombreInfBasica.Text) || string.IsNullOrEmpty(DateFechNacInfoBasica.Text) || string.IsNullOrEmpty(txtNombreInfBasica.Text) || (string.IsNullOrEmpty(cbDeptos.Text)) || (string.IsNullOrEmpty(cbMunic.Text)) || (string.IsNullOrEmpty(cb_profesionesIB.Text)) || (string.IsNullOrEmpty(cbSitLab.Text)) || (string.IsNullOrEmpty(txtTeNocelularInfBasica.Text)) || (string.IsNullOrEmpty(txtCorreoInfBasica.Text)) || (string.IsNullOrEmpty(txtNoduiInfBasica.Text)) || (string.IsNullOrEmpty(txtNnitInfBasica.Text)) )) { if (DateTime.Compare(DateTime.Now.Date, DateFechNacInfoBasica.SelectedDate.Value.Date) > 0) { InfoBasicaE _InfoBasicaE = new InfoBasicaE(); DateTime edad = DateFechNacInfoBasica.SelectedDate.Value; _InfoBasicaE.id_candidato = int.Parse(idCandidato); _InfoBasicaE.nombre = txtNombreInfBasica.Text.ToUpper(); _InfoBasicaE.nacionalidad = txtNacionalidadInfBasica.Text.ToUpper(); _InfoBasicaE.telefono_celular = txtTeNocelularInfBasica.Text.ToUpper(); _InfoBasicaE.telefono_fijo = txtTelefonoCasaInfBasica.Text.ToUpper(); //_InfoBasicaE.profesiones = cb_profesionesIB.Text.ToUpper(); _InfoBasicaE.id_profesiones = Convert.ToInt32(cb_profesionesIB.SelectedValue); _InfoBasicaE.correo = txtCorreoInfBasica.Text; _InfoBasicaE.fecha_nacimiento = DateFechNacInfoBasica.SelectedDate.Value; _InfoBasicaE.direccion = txtLugarResidenciaInfBasica.Text.ToUpper(); _InfoBasicaE.FotoCandidato = _Imagen.OnlyName; if (rbsexoM.IsChecked == true) { _InfoBasicaE.id_genero = 1; } else if (rbsexoF.IsChecked == true) { _InfoBasicaE.id_genero = 2; } _InfoBasicaE.DUI = txtNoduiInfBasica.Text; _InfoBasicaE.NIT = txtNnitInfBasica.Text; _InfoBasicaE.AFP = txtNafpInfBasica.Text; _InfoBasicaE.ISSS = txtNiss.Text; _InfoBasicaE.id_municipio = Convert.ToInt32(cbMunic.SelectedValue); _InfoBasicaE.id_situacionProfesional = Convert.ToInt32(cbSitLab.SelectedValue); string oerro = ""; int returinfobasica = 0; #region Capturar imagen por genero switch (_InfoBasicaE.id_genero) { case 1: pMensaje = "el candidato"; pURL = string.IsNullOrEmpty(_Imagen.OnlyName) ? @"C:\Imagenes\Fotos\User_default\Userman.png" : @"C:\Imagenes\Fotos\" + _Imagen.OnlyName; break; case 2: pMensaje = "la candidata"; pURL = string.IsNullOrEmpty(_Imagen.OnlyName) ? @"C:\Imagenes\Fotos\User_default\userwoman.png" : @"C:\Imagenes\Fotos\" + _Imagen.OnlyName; break; } #endregion /*proceso de eliminacion de imagen*/ if (pCapturaImagen == true) { ControlImagen.GuardarImagenEnRuta(_Imagen); // returinfobasica = _InfobasicaBL.ActualizarInfBasica(_InfoBasicaE, _InfoBasicaE.id_candidato, ref oerro); } else { returinfobasica = _InfobasicaBL.ActualizarInfBasica(_InfoBasicaE, _InfoBasicaE.id_candidato, ref oerro); } if (returinfobasica <= 0) { MessageBox.Show("Ocurrio un error y no se pudo actualizar al candidato", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } else { #region Mostrar mensaje personalizado SimpleAlert simpleAlert = new SimpleAlert(); simpleAlert.Title = "Nuevo Registro"; simpleAlert.NamePeople = txtNombreInfBasica.Text; simpleAlert.Url = pURL; simpleAlert.Message = "Se ha modificado " + pMensaje; simpleAlert.ShowDialog(); #region Redireccionamiento BusquedaEmpleados _menusBusqueda = new BusquedaEmpleados(); _menusBusqueda.InitializeComponent(); this.Close(); _menusBusqueda.Show(); #endregion #endregion } } else { MessageBox.Show("La fecha de nacimiento debe ser menor a la fecha actual.", "Error", MessageBoxButton.OK, MessageBoxImage.Information); } //MessageBox.Show("El empleado "+_InfoBasicaE.nombre+ " fue actualizado", "Exito", MessageBoxButton.OK, MessageBoxImage.None); } else { MessageBox.Show("Asegurese de que los campos obligatorios no esten vacíos.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void lab_menuCreacionPerf_MouseDown(object sender, MouseButtonEventArgs e) { BusquedaEmpleados _busEmple = new BusquedaEmpleados(); _busEmple.InitializeComponent(); this.Close(); _busEmple.Show(); }
private void Label_MouseDown_2(object sender, MouseButtonEventArgs e) { //EVENTO PARA REDIRECCIONAR AL FORMULARIO DE MAINWINDOW BusquedaEmpleados _busEmple = new BusquedaEmpleados(); _busEmple.InitializeComponent(); this.Close(); _busEmple.Show(); ; }
private void btnRegresar_Click(object sender, RoutedEventArgs e) { BusquedaEmpleados busqueda = new BusquedaEmpleados(); busqueda.InitializeComponent(); busqueda.Show(); this.Close(); }
private void Button_Click(object sender, RoutedEventArgs e) { sendEmail enviarCorreo = new sendEmail(); string error = ""; if (opcion == 1) { bool result = enviarCorreo.EnviarDatosCorreo(txt_destinatario.Text, txt_subject.Text, txt_message.Text,txt_cc.Text, ventanaCurriculum.ReportViewerCurriculumEmp, ref error); if (!result) { MessageBox.Show("Ocurrio un error al adjuntar y enviar el correo" + error); } else { MessageBoxResult MsCorreo = MessageBox.Show("EL CURRICULUM DEL EMPLEADO FUE ENVIADO CON EXITO..", "MENSAJE DE CONFIRMACION", MessageBoxButton.OK, MessageBoxImage.Information); if (MsCorreo == MessageBoxResult.OK) { BusquedaEmpleados _menusBusqueda = new BusquedaEmpleados(); _menusBusqueda.InitializeComponent(); this.Close(); _menusBusqueda.Show(); } } } else { bool result = enviarCorreo.EnviarDatosCorreo(txt_destinatario.Text, txt_subject.Text, txt_message.Text,txt_cc.Text, ventanaCurruculumCandidatos.ReportViewerCurriculum, ref error); if (!result) { MessageBox.Show("Ocurrio un error al adjuntar y enviar el correo" + error); } else { MessageBoxResult MsCorreo = MessageBox.Show("El curriculum fue enviado con éxito.", "MENSAJE DE CONFIRMACION", MessageBoxButton.OK, MessageBoxImage.Asterisk); if (MsCorreo == MessageBoxResult.OK) { Busqueda _menusBusqueda = new Busqueda(); _menusBusqueda.InitializeComponent(); this.Close(); _menusBusqueda.Show(); } } } }