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

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

                    var     MSC  = BAZA.MIEJSCOWOSCs.Where(x => x.M_ID.Equals(t)).FirstOrDefault();
                    EditMsc okno = new EditMsc(MSC);
                    okno.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Wybierz rekord");
                }
            }
            else
            {
                MessageBox.Show("Wybierz rekord");
            }
        }
Ejemplo 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();
            }
        }