예제 #1
0
        private void SetInterfaceVenda()
        {
            VendaModel = new VendaModel(VendasContext.GetNewId());

            clientComboBox.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            clientComboBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var sourceClientNames = new AutoCompleteStringCollection();

            foreach (var clienteName in ClienteContext.GetClientNames())
            {
                sourceClientNames.Add(clienteName);
            }

            clientComboBox.AutoCompleteCustomSource = sourceClientNames;

            txtIdVenda.Text   = VendaModel.ToString();
            lblDataVenda.Text = VendaModel.DataFormated();
        }