Beispiel #1
0
 public Egreso(Bomba bomba, Camion camion, Chofer chofer, Operador operador, float litros_egreso)
 {
     this.bomba = bomba;
     this.camion = camion;
     this.chofer = chofer;
     this.operador = operador;
     this.litros_egreso = litros_egreso;
 }
        private void btnCrear_Click(object sender, EventArgs e)
        {
            try
            {
                Empresa empresa = (Empresa)ddlEmpresas.SelectedItem;
                int rut = int.Parse(txtRut.Value.ToString());
                string nombre = txtNombre.Text.Trim();

                Chofer chofer = new Chofer(empresa, rut, nombre);
                if (edicion)
                    chofer.Guardar();
                else
                    chofer.Crear();

                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 public ChoferCrear(Chofer chofer)
     : this(chofer.Empresa, chofer.Rut, chofer.Nombre)
 {
 }