Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            NurseForm form = new NurseForm();

            form.ShowDialog();
            dataGridView2.DataSource = ConnectDb.GetNurses();
        }
Beispiel #2
0
 public Dashboard(int key)
 {
     InitializeComponent();
     this.key  = key;
     dtDoctors = new DataTable();
     dtNurses  = new DataTable();
     dtDoctors = ConnectDb.GetDoctors();
     dtNurses  = ConnectDb.GetNurses();
     dataGridView1.DataSource = dtDoctors;
     dataGridView2.DataSource = dtNurses;
     dataGridView2.Columns["Type"].Visible     = false;
     dataGridView2.Columns["Password"].Visible = false;
     dataGridView1.Columns["Type"].Visible     = false;
     dataGridView1.Columns["Password"].Visible = false;
     dataGridView2.Columns["PwzNo"].Visible    = false;
     btnNewDoctor.Visible = false;
     btnNewNurse.Visible  = false;
     btnNewAdmin.Visible  = false;
     if (key == 1)
     {
         dataGridView1.ContextMenuStrip = contextMenuStrip1;
         dataGridView2.ContextMenuStrip = contextMenuStrip2;
         btnNewDoctor.Visible           = true;
         btnNewNurse.Visible            = true;
         btnNewAdmin.Visible            = true;
     }
 }