Ejemplo n.º 1
0
        public void loadClients()
        {
            clearClientsCache();
            clearRecipesCache();
            clearGlassesCache();

            grMapper.findCustomers().ForEach(ele => comboBox2.Items.Add(ele));
            if (!isClientEmpty())
            {
                comboBox2.SelectedIndex = comboBox2.Items.Count - 1;
            }
        }
Ejemplo n.º 2
0
        public AbstractVoBox(IPowderModel powderModel, IGlassRecipePowderMapper mapper)
        {
            InitializeComponent();
            this.powderModel = powderModel;
            this.dataMapper  = mapper;
            label5.Visible   = false;

            // comboBox1以其选择的条目作为最终数据
            powderModel.findPowders()
            .ForEach(p => comboBox1.Items.Add(p.PowderName));

            // comboBox2和comboBox3以其text作为最终数据
            dataMapper.findCustomers()
            .ForEach(c => comboBox2.Items.Add(c));
            dataMapper.findGlasses()
            .ForEach(g => comboBox3.Items.Add(g));
        }