Пример #1
0
        protected override void OnLoad(EventArgs e)
        {
            _lstCommandes           = DAL.RécupérerCommandes();
            dgvCommandes.DataSource = _lstCommandes.Select(c => new { c.IdCommande, c.IdClient, c.Date }).ToList();

            #region Paramétrage dgvCommandes
            dgvCommandes.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dgvCommandes.ReadOnly      = true;
            dgvCommandes.MultiSelect   = false;
            #endregion

            #region Paramétrage dgvDetailsCommande
            dgvDetailsCommande.MultiSelect   = false;
            dgvDetailsCommande.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dgvDetailsCommande.ReadOnly      = true;
            #endregion

            DAL.ExporterXmlDatesCommandes(_lstCommandes);

            _lstCommandes = DAL.ImporterXmlAvecLINQ();
            base.OnLoad(e);
        }