Exemplo n.º 1
0
 private void ComboBoxLoad2(ref List <WellPad> pads)
 {//loading Well Combo Box depending on what WellPad is selected
     if (pads != null)
     {
         selectedWP = this.WellPadcomboBox.GetItemText(this.WellPadcomboBox.SelectedItem);
         wellPad    = pads.Find(s => s.DisplayComboBox == selectedWP); //Lambda
         if (wellPad != null)
         {
             var filtered = from f in wellPad.Wells //LINQ
                            where (f is ProdWell)
                            select f;
             WellComboBox.DataSource    = filtered.ToList <IWell>();
             WellComboBox.DisplayMember = "Id";
         }
     }
 }
Exemplo n.º 2
0
        private void ComboBoxLoad2(ref List<WellPad> pads)
        {
            //loading Well Combo Box depending on what WellPad is selected
            if (pads != null)
            {
                selectedWP = this.WellPadcomboBox.GetItemText(this.WellPadcomboBox.SelectedItem);
                wellPad = pads.Find(s => s.DisplayComboBox == selectedWP); //Lambda
                if (wellPad != null)
                {
                    var filtered = from f in wellPad.Wells //LINQ
                                   where (f is ProdWell)
                                   select f;
                    WellComboBox.DataSource = filtered.ToList<IWell>();
                    WellComboBox.DisplayMember = "Id";

                }
            }
        }