Exemplo n.º 1
0
        private void ViewRegions_Load(object sender, EventArgs e)
        {
            // Populate the comboBox
            NorthwindManager manager = new NorthwindManager();
            var data = manager.GetRegions();

            cboRegions.DataSource    = data;
            cboRegions.DisplayMember = "RegionDescription";
            cboRegions.ValueMember   = "RegionID";
        }
Exemplo n.º 2
0
 private void PopulateRegions()
 {
     try
     {
         var controller = new NorthwindManager();
         var data       = controller.GetRegions();
         RegionListView.DataSource = data;
         RegionListView.DataBind();
     }
     catch (Exception ex)
     {
         MessageLabel.Text = ex.Message;
     }
 }