Example #1
0
 private void Simple_Read_Load(object sender, EventArgs e)
 {
     BLL.Read_students query = new BLL.Read_students();
     this.dataGridView1.DataSource            = query.ReadNotes();
     this.dataGridView1.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 10);
     this.dataGridView1.Refresh();
 }
Example #2
0
 private void Select_Students()
 {
     BLL.Read_students query = new BLL.Read_students();
     try
     {
         this.dataGridView1.DataSource            = query.ReadStudents();
         this.dataGridView1.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 10);
         this.dataGridView1.Refresh();
     }
     catch (Exception)
     {
         this.dataGridView1.DataSource = null;
         MessageBox.Show("Error in connection");
     }
 }