コード例 #1
0
 public Form1(clsResVol vol, clsResHotel hotel)
 {
     InitializeComponent();
     this.volSelectionne.Text   = vol.ToString();
     this.hotelSelectionne.Text = hotel.ToString();
     volCourant   = vol;
     hotelCourant = hotel;
 }
コード例 #2
0
        private void enregistrerVol(object sender, EventArgs e)
        {
            volCourant = new clsResVol();
            int id = int.Parse(((Button)sender).Name);

            for (int i = 0; i < this.vols.Count; i++)
            {
                if (vols[i].idVol == id)
                {
                    volCourant = vols[i];
                }
            }
            volSelectionne.Text = volCourant.ToString();
            if (this.volSelectionne.Text.Length > 0 && this.hotelSelectionne.Text.Length > 0)
            {
                this.button2.Enabled = true;
            }
            else
            {
                this.button2.Enabled = false;
            }
        }