예제 #1
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            Class_Contrato Contr = new Class_Contrato();

            Contr.Destino        = TXT_Destino.Text;
            Contr.Escuela        = TXT_Escuela.Text;
            Contr.ID_Contrato    = TXT_IdContrato.Text;
            Contr.Run_Emp        = TXT_RunEmpleado.Text;
            Contr.Valor_Contrato = TXT_VALORTOTAL.Text;
            Contr.Fecha_Salida   = DATETIME_FECHA_IDA.SelectedDate;
            Contr.Fecha_llegada  = DATETIME_FECHA_VUELTA.SelectedDate;
            Contr.N_alumnos      = int.Parse(TXT_NUmAlumnos.Text);
            Contr.ID_seguro      = TXT_ID_seguro.Text;

            if (Contr.Actualizar())
            {
                if (MessageBox.Show("Proceso completado", "seguro incorporado de manera exitosa",
                                    MessageBoxButton.OK, MessageBoxImage.Exclamation) == MessageBoxResult.OK)
                {
                    this.Hide();
                }
                Ejecutivo_Ventas MainEjecutivo = new Ejecutivo_Ventas();
                Login            Log           = new Login();
                MainEjecutivo.Show();
                MainEjecutivo.Closed += Log.Logout;
                this.Hide();
            }
            else
            {
                this.ShowMessageAsync("ERROR AL INGRESAR DATOS", "Los datos no han sido actualizados, Intente nuevamente");
            }
        }
예제 #2
0
 private void Inicio_click(object sender, RoutedEventArgs e)
 {
     if (TXT_user.Text != "")
     {
         if (TXT_contra.Password != "")
         {
             Class_Empleado emp        = new Class_Empleado();
             var            validlogin = emp.Logear(TXT_user.Text, TXT_contra.Password);
             if (validlogin == true)
             {
                 Ejecutivo_Ventas MainEjecutivo = new Ejecutivo_Ventas();
                 UserLoginCache.validarlogin = validlogin;
                 MainEjecutivo.Show();
                 MainEjecutivo.Closed += Logout;
                 this.Hide();
             }
             else
             {
                 this.ShowMessageAsync("Error de ingreso", "Usuario o contraseña invalido");
                 TXT_contra.Clear();
                 TXT_user.Focus();
             }
         }
         else
         {
             this.ShowMessageAsync("Error de ingreso", "Ingrese la contraseña");
         }
     }
     else
     {
         this.ShowMessageAsync("Error de ingreso", "Ingrese el nombre de usuario");
     }
 }
예제 #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
            Ejecutivo_Ventas MainEjecutivo = new Ejecutivo_Ventas();
            Login            Log           = new Login();

            MainEjecutivo.Show();
            MainEjecutivo.Closed += Log.Logout;
            this.Hide();
        }
예제 #4
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (UserLoginCache.validarlogin == true)
     {
         this.Hide();
         Ejecutivo_Ventas MainEjecutivo = new Ejecutivo_Ventas();
         Login            Log           = new Login();
         MainEjecutivo.Show();
         MainEjecutivo.Closed += Log.Logout;
         this.Hide();
     }
     else
     {
         this.Hide();
         MainWindow Login = new MainWindow();
         Login.Show();
     }
 }
예제 #5
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            Class_Contrato Contr = new Class_Contrato();

            Contr.Destino        = TXT_Destino_ACTUALIZAR.Text;
            Contr.Escuela        = TXT_Escuela_ACTUALIZAR.Text;
            Contr.ID_Contrato    = TXT_IDcontrato_ACTUALIZAR.Text;
            Contr.Run_Emp        = TXT_RUNEMP_ACTUALIZAR.Text;
            Contr.Valor_Contrato = TXT_VALOR_CONTRATO_ACTUALIZAR.Text;
            Contr.Fecha_Salida   = DATETIME_FECHA_IDA_ACTUALIZAR.SelectedDate;
            Contr.Fecha_llegada  = DATETIME_FECHA_VUELTA_ACTUALIZAR.SelectedDate;
            Contr.N_alumnos      = int.Parse(TXT_NUM_ALUMNOS_ACTUALIZAR.Text);
            if (TXT_IDseguro_ACTUALIZAR.Text == "")
            {
                Contr.ID_seguro = null;
            }
            else
            {
                Contr.ID_seguro = TXT_IDseguro_ACTUALIZAR.Text;
            }

            if (Contr.Actualizar())
            {
                this.ShowMessageAsync("PROCESO COMPLETADO", "Datos Actualizados de manera exitosa");
                GRID_BUSCAR_ACT.Visibility = System.Windows.Visibility.Visible;
                GRID_ACTUALIZAR.Visibility = System.Windows.Visibility.Hidden;
                this.Hide();
                Ejecutivo_Ventas MainEjecutivo = new Ejecutivo_Ventas();
                Login            Log           = new Login();
                MainEjecutivo.Show();
                MainEjecutivo.Closed += Log.Logout;
                this.Hide();
            }
            else
            {
                this.ShowMessageAsync("ERROR AL INGRESAR DATOS", "Los datos no han sido actualizados, Intente nuevamente");
            }
        }