示例#1
0
 public Encomienda(int Cod_Encomiendas, int Precio_Encomienda, int Kgs_A_Enviar, DateTime Fecha_Compra, Viaje viaje, Cliente cliente )
 {
     this.Cod_Encomiendas = Cod_Encomiendas;
     this.Precio_Encomienda = Precio_Encomienda;
     this.Kgs_A_Enviar = Kgs_A_Enviar;
     this.Fecha_Compra = Fecha_Compra;
     this.viaje = viaje;
     this.cliente = cliente;
 }
示例#2
0
 public Pasaje( int Cod_Pasaje, DateTime Fecha_Viaje, Viaje viaje, int Butaca_Asociada, Cliente cliente, int Pasaje_Precio )
 {
     this.Cod_Pasaje = Cod_Pasaje;
     this.Fecha_Viaje = Fecha_Viaje;
     this.viaje = viaje;
     this.Butaca_Asociada = Butaca_Asociada;
     this.cliente = cliente;
     this.Pasaje_Precio = Pasaje_Precio;
 }
示例#3
0
 private void Apellido_TextChanged(object sender, EventArgs e)
 {
     if (dni.Text.Length == 7 && Apellido.Text != "")
     {
         if (DBAdapter.executeProcedureWithReturnValue("Verificar_Cliente", Convert.ToInt32(dni.Text), Apellido.Text) == -1)
         {
             cl = new ClientesRepository().getCliente(Convert.ToInt32(dni.Text), Apellido.Text);
             Nombre.Text = cl.Cliente_Nombre;
             Direccion.Text = cl.Cliente_Direccion;
             Telefono.Text = cl.Cliente_Telefono.ToString();
             Mail.Text = cl.Cliente_Mail;
             fecha.Value = cl.Cliente_Fecha_Nacimiento;
         }
     }
 }
示例#4
0
 public Encomienda(int Kgs_A_Enviar, int codViaje, Cliente cliente )
 {
     this.Kgs_A_Enviar = Kgs_A_Enviar;
     this.codViaje = codViaje;
     this.cliente = cliente;
 }
示例#5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (Validacion.validarInputs(this.Controls) &&
         Validacion.soloLetras(this.Apellido, Apellido.Name) &&
         Validacion.soloNumeros(this.dni, dni.Name) &&
         Validacion.soloLetras(this.Nombre, Nombre.Name) &&
         Validacion.soloNumeros(this.Telefono, Telefono.Name) &&
         Validacion.emailValido( this.Mail )
         // && Validacion.fechaMenorAlDiaDeHoy( fecha, "Fecha de Nacimiento" )
         // validar butaca y encomienda ?
         )
         {
             if ( cl == null ) cl = new Cliente(
                 Convert.ToInt32( dni.Text ),
                 Nombre.Text,
                 Apellido.Text,
                 Direccion.Text,
                 Convert.ToInt32( Telefono.Text ),
                 Mail.Text,
                 Convert.ToDateTime( fecha.Value ),
                 0 );
             if (butaca != -1)
             {
                 pasaje = new Pasaje(
                     codViaje,
                     fechaSalida,
                     new ViajesRepository().getViaje(codViaje),
                     butaca,
                     cl,
                     0 // Precio
                 );
             }
             if (kgs != -1)
             {
                 encomienda = new Domain.Encomienda(kgs, codViaje, cl);
             }
             this.Close();
         }
 }