Beispiel #1
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            var Dsg = new EditKierowcy();

            Dsg.Closed += (s, args) => this.Close();
            Dsg.Show();
        }
Beispiel #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();
            }
        }
Beispiel #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());

                    var          klient = BAZA.KIEROWCies.Where(x => x.K_ID.Equals(t)).FirstOrDefault();
                    EditKierowcy okno   = new EditKierowcy(klient);
                    okno.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Wybierz rekord");
                }
            }
            else
            {
                MessageBox.Show("Wybierz rekord");
            }
        }
Beispiel #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();
            }
        }