public us_notificacionFallecimiento()
 {
     InitializeComponent();
     __bw = new BackgroundWorker();
     __bw.DoWork += bw_DoWork;
     __bw.RunWorkerCompleted += bw_RunWorkerCompleted;
     this._noti = new Empresa.Docente.NotificadosFallecidos();
     
     But_Recarga_Click(null, null);
 }
Example #2
0
        private void But_NotificarFallecido_Click(object sender, RoutedEventArgs e){
            SIC.Objs.Controles.Dialogos.Dial_DeseaNotificarFallecido __noti = new Objs.Controles.Dialogos.Dial_DeseaNotificarFallecido();
            Empresa.Comun.EnviarEmail __env;
            try
            {
                if (!this.usc_buscardocente.Docente.EsFallecidoMinimo)
                {
                    __noti.ShowDialog();
                    if (__noti.Resultado == MessageBoxResult.Yes)
                    {
                        Empresa.Docente.NotificadosFallecidos __cnoti = new Empresa.Docente.NotificadosFallecidos();
                        Empresa.Docente.TNotificadosFallecidos __tnoti = new Empresa.Docente.TNotificadosFallecidos();

                        __tnoti.Docente = this.usc_buscardocente.Docente;
                        __tnoti.Descripcion = __noti.Txt_Decripcion.Text;
                        __tnoti.CorreoEnvidado = __noti.EnviarNotificacionEmail;
                        __cnoti.Insert(__tnoti);
                        Empresa.RegistroEventos.Evento.Insert(new Empresa.RegistroEventos.tevento(this.CModulo, this.objecto, this.usc_buscardocente.Docente.Cedula, new Empresa.RegistroEventos.ttarea(Empresa.RegistroEventos.EnumIdentificadorTarea.RegistroNotificacionFallecido), Empresa.Usuarios.Seccion.Usuario, GlobalItems.IDProcesor, Environment.MachineName, Environment.UserDomainName));

                        if (__noti.EnviarNotificacionEmail)
                        {
                            try
                            {
                                __env = new Empresa.Comun.EnviarEmail();
                                //
                                __env.Enviar("[email protected],[email protected]", "NOTIFICACION DE FALLECIDO - " + this.usc_buscardocente.Docente.CedulaF + " -", " Notificación de fallecido para el docente " + this.usc_buscardocente.Docente.NombreCompleto + ", con cédula No." + this.usc_buscardocente.Docente.CedulaF);
                            }
                            catch
                            {

                            }
                        }
                    }
                    __noti.Close();
                }
                else {
                    MessageBox.Show("No se puede registrar la notificación, pues el docente esta registrado como fallecido.","No se puee regitrar la notificación.",MessageBoxButton.OK,MessageBoxImage.Warning);
                }
            }
            catch {
                __noti.Close();
            }
        }
Example #3
0
 private void bw_notificaiones_DoWork(object sender, DoWorkEventArgs e) {
     Empresa.Docente.NotificadosFallecidos __noti = new Empresa.Docente.NotificadosFallecidos();
     e.Result = __noti.Cantidad();
 }