コード例 #1
0
        private void QuerySellingBySalesForm_Load(object sender, EventArgs e)
        {
            var service   = new SalesManService();
            var viewModel = service.GetSalesMen();

            listBox1.DataSource    = viewModel.Item;
            listBox1.DisplayMember = "Name";
            listBox1.ValueMember   = "JobNumber";
        }
コード例 #2
0
        private void BindSalesManListBox()
        {
            var service   = new SalesManService();
            var viewModel = service.GetSalesMen();

            listBox1.DataSource    = viewModel.Items;
            listBox1.DisplayMember = "Name";
            listBox1.ValueMember   = "JobNumber";
        }