private void buttonGuardar_Click(object sender, EventArgs e) { if (!validaciones()) { return; } if ((txtEncomienda.Text == "" || txtEncomienda.Text == "0") && cmbPasaje.Items.Count == 0) { MessageBox.Show("Debe agregar pasajes o encomiendas"); return; } Compra.compra = this; Compra.pagaEnEfectivo = false; if (Sesion.Usuario.nombreRol == "Administrador General") { if (MessageBox.Show("¿Desea abonar en efectivo ?", "Confirmar", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Compra.pagaEnEfectivo = true; } } datosPasajeroForm compradorF = new datosPasajeroForm(this, 0); compradorF.Show(); this.Hide(); }
private void btEncomienda_Click(object sender, EventArgs e) { int espacioDisponible = kgsEncomiendasDisponible(); if (espacioDisponible <= 0) { MessageBox.Show("No queda mas espacio para encomiendas en este viaje"); return; } datosPasajeroForm encomiendaF = new datosPasajeroForm(this, 2); encomiendaF.Show(); }
private void btPasaje_Click(object sender, EventArgs e) { int espacioDisponible = Convert.ToInt32(viaje.butacas_disponibles) - pasajes.Count(); if (espacioDisponible < 0) { MessageBox.Show("No quedan mas pasajes para este vuelo"); return; } datosPasajeroForm pasajeF = new datosPasajeroForm(this, 1); pasajeF.Show(); }
private void buttonGuardar_Click(object sender, EventArgs e) { if (!validaciones()) return; if ((txtEncomienda.Text == "" || txtEncomienda.Text == "0") && cmbPasaje.Items.Count == 0) { MessageBox.Show("Debe agregar pasajes o encomiendas"); return; } Compra.compra = this; Compra.pagaEnEfectivo = false; if(Sesion.Usuario.nombreRol=="Administrador General"){ if (MessageBox.Show("¿Desea abonar en efectivo ?", "Confirmar", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Compra.pagaEnEfectivo = true; } } datosPasajeroForm compradorF = new datosPasajeroForm(this, 0); compradorF.Show(); this.Hide(); }
private void btPasaje_Click(object sender, EventArgs e) { int espacioDisponible = Convert.ToInt32(viaje.butacas_disponibles)- pasajes.Count(); if (espacioDisponible < 0) { MessageBox.Show("No quedan mas pasajes para este vuelo"); return; } datosPasajeroForm pasajeF = new datosPasajeroForm(this,1); pasajeF.Show(); }