Пример #1
0
        //planowanie wizyty
        private void button3_Click_1(object sender, EventArgs e)
        {
            DodajWizyte dodawanie = new DodajWizyte();

            dodawanie.TypOsoby = UserType;
            dodawanie.ShowDialog();
        }
Пример #2
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            DodajWizyte wizyta = new DodajWizyte();

            wizyta.VisitId  = int.Parse(dataGridView1.Rows[e.RowIndex].Cells["Id"].Value.ToString());
            wizyta.TypOsoby = TypOsoby;
            var dr = wizyta.ShowDialog();

            if (dr == DialogResult.OK)
            {
                dataGridView1.DataSource = null;
                dataGridView1.Rows.Clear();
                dataGridView1.Columns.Clear();
                Wizyty_Load(null, null);
            }
        }
Пример #3
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns["wizyta"].Index)
     {
         DodajWizyte dodawanie = new DodajWizyte();
         dodawanie.ForPersonName = dataGridView1.Rows[e.RowIndex].Cells["Name"].Value + " " + dataGridView1.Rows[e.RowIndex].Cells["Surname"].Value;
         dodawanie.ShowDialog();
         //MessageBox.Show("Możliwość planowania wizyty z tego widoku! - " + dataGridView1.Rows[e.RowIndex].Cells["Id"].Value);
     }
     else
     {
         DodajOsobe osoba = new DodajOsobe();
         osoba.PersonId = int.Parse(dataGridView1.Rows[e.RowIndex].Cells["Id"].Value.ToString());
         var dr = osoba.ShowDialog();
         if (dr == DialogResult.OK)
         {
             dataGridView1.DataSource = null;
             dataGridView1.Rows.Clear();
             dataGridView1.Columns.Clear();
             Osoby_Load(null, null);
         }
     }
 }