Ejemplo n.º 1
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            dbContext = new CTestEntities();
            dbContext.ProgramMains.Load();

            programMainsBindingSource.DataSource = dbContext.ProgramMains.Local;
            gridControl1.Refresh();
        }
Ejemplo n.º 2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            //string[] ports = SerialPort.GetPortNames();
            //cbxPort.Properties.Items.AddRange(ports);
            //cbxPort.SelectedIndex = 0;
            dbContext = new CTestEntities();
            dbContext.ProgramMains.Load();

            programMainsBindingSource.DataSource = dbContext.ProgramMains.Local;
            gridControl1.Refresh();
        }