private void frmOutstationSummary_Load(object sender, EventArgs e) { // dataGridViewTextBoxColumn5.ValueType = typeof(String); _context = new TulipEntities(); _context.Outstations.Load(); _context.Channels.Load(); this.outstationBindingSource.DataSource = _context.Outstations.Local.ToBindingList(); this.channelBindingSource.DataSource = _context.Channels.Local.ToBindingList(); }
public frmPointConfiguration(TulipEntities Context) { InitializeComponent(); this._context = Context; dataGridViewTextBoxColumn7.DataSource = Enum.GetValues(typeof(BasicType)) .Cast<BasicType>() .Select(p => new { Key = (BasicType)p, Value = p.ToString() }) .ToList(); dataGridViewTextBoxColumn7.DisplayMember = "Value"; dataGridViewTextBoxColumn7.ValueMember = "Key"; dataGridViewTextBoxColumn7.ValueType = typeof(BasicType); }
private void frmPointSummary_Load(object sender, EventArgs e) { _context = new TulipEntities(); _context.Channels.Load(); this.channelBindingSource.DataSource = _context.Channels.Local.ToBindingList(); }