Exemplo n.º 1
0
        public ReservationForm(Business.BusinessLayer businessLayer)
        {
            InitializeComponent();


            var list = new List <string>()
            {
                ""
            };

            list.AddRange(businessLayer.GestionClients.ListeNomsClients());

            comboBox1.TextChanged += (src, evt) =>
            {
                var txt  = comboBox1.Text.ToUpper();
                var copy = (from i in list where i.ToUpper().Contains(txt) select i).ToList();
                copy.Insert(0, comboBox1.Text);
                comboBox1.DataSource     = copy;
                comboBox1.SelectionStart = txt.Length;
                if (copy.Count > 1)
                {
                    comboBox1.DroppedDown = true;
                }
            };
        }
Exemplo n.º 2
0
        public PlanningForm(Business.BusinessLayer businessLayer)
        {
            InitializeComponent();
            this.businessLayer = businessLayer;

            // Ajustement des colonnes en largeur
            dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;

            // Gestionnaire d'event
            monthCalendar1.DateSelected += this.DateSelectionChanged;

            // Max de jour sélectionnables
            monthCalendar1.MaxSelectionCount = 15;

            // On affiche au début les 7 prochains jours
            monthCalendar1.SelectionRange = new SelectionRange(DateTime.Now, DateTime.Now.AddDays(7));
        }