Esempio n. 1
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            var Dsg = new EditTrasy();

            Dsg.Closed += (s, args) => this.Close();
            Dsg.Show();
        }
Esempio n. 2
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            if (this.stan == 0)
            {
                this.Hide();
                var EK = new EditKierowcy();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 1)
            {
                this.Hide();
                var EK = new EditAutokary();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 2)
            {
                this.Hide();
                var EK = new EditKierunek();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 3)
            {
                this.Hide();
                var EK = new EditMsc();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 4)
            {
                this.Hide();
                var EK = new EditKursy();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 5)
            {
                this.Hide();
                var EK = new EditTrasy();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }
        }
Esempio n. 3
0
 private void EditBtn_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedCells.Count != 0)
     {
         if (dataGridView1.SelectedCells.Count > 0)
         {
             int       t    = Int32.Parse(dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[0].Value.ToString());
             int       t2   = Int32.Parse(dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[1].Value.ToString());
             var       trs  = BAZA.TRASAs.Where(x => x.KU_ID.Equals(t) && x.M_ID.Equals(t2)).FirstOrDefault();
             EditTrasy okno = new EditTrasy(trs);
             okno.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Wybierz rekord");
         }
     }
     else
     {
         MessageBox.Show("Wybierz rekord");
     }
 }
Esempio n. 4
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            if (this.stan == 0)
            {
                this.Hide();
                var EK = new EditKierowcy();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 1)
            {
                if (dataGridView1.SelectedCells.Count != 0)
                {
                    if (dataGridView1.SelectedCells.Count > 0)
                    {
                        int t = Int32.Parse(dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[0].Value.ToString());

                        var          BUS  = BAZA.AUTOKARies.Where(x => x.A_ID.Equals(t)).FirstOrDefault();
                        EditAutokary okno = new EditAutokary(BUS);
                        okno.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("Wybierz rekord");
                    }
                }
                else
                {
                    MessageBox.Show("Wybierz rekord");
                }
            }

            if (this.stan == 2)
            {
                this.Hide();
                var EK = new EditKierunek();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 3)
            {
                this.Hide();
                var EK = new EditMsc();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 4)
            {
                this.Hide();
                var EK = new EditKursy();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }

            if (this.stan == 5)
            {
                this.Hide();
                var EK = new EditTrasy();
                EK.Closed += (s, args) => this.Close();
                EK.Show();
            }
        }