using ButcherFactory.BO; using ButcherFactory.BO.LocalBL; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ButcherFactory.Utils { public static class ControlsUtil { public static void EBindComboBox(this ComboBox box) where T : BaseInfo, new() { box.DisplayMember = "Name"; box.ValueMember = "ID"; box.DataSource = BaseInfoBL.GetList(); box.Refresh(); } } }