예제 #1
0
        public CreerClient()
        {
            InitializeComponent();

            // ajout des valeurs

            try
            {
                List <ComboxItem> data = new List <ComboxItem>();

                foreach (Client unClient in BDDExterne.GetAllClients())
                {
                    data.Add(new ComboxItem()
                    {
                        Value = unClient.cliId, Text = unClient.cliNom + " " + unClient.cliPrenom
                    });
                }

                comboBoxListeClient.DisplayMember = "Text";
                comboBoxListeClient.DataSource    = data;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
        }
예제 #2
0
        public OuvrirProjet()
        {
            InitializeComponent();

            List <ComboxItem> data = new List <ComboxItem>();

            foreach (Client item in BDDExterne.GetAllClients())
            {
                data.Add(new ComboxItem()
                {
                    Value = item.cliId, Text = item.cliNom + " " + item.cliPrenom
                });
            }



            listBoxClient.DisplayMember = "Text";
            listBoxClient.DataSource    = data;
        }
예제 #3
0
        void refresh()
        {
            try
            {
                List <ComboxItem> data = new List <ComboxItem>();

                foreach (Client unClient in BDDExterne.GetAllClients())
                {
                    data.Add(new ComboxItem()
                    {
                        Value = unClient.cliId, Text = unClient.cliNom + " " + unClient.cliPrenom
                    });
                }

                comboBoxListeClient.DisplayMember = "Text";
                comboBoxListeClient.DataSource    = data;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
        }