コード例 #1
0
ファイル: KierunkiUpForm.cs プロジェクト: BPietru/KursyPKSr
        private void AddBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            var Dsg = new EditKierunek();

            Dsg.Closed += (s, args) => this.Close();
            Dsg.Show();
        }
コード例 #2
0
ファイル: LookUpForm.cs プロジェクト: BPietru/KursyPKSr
        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();
            }
        }
コード例 #3
0
ファイル: KierunkiUpForm.cs プロジェクト: BPietru/KursyPKSr
        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          Kierunek = BAZA.KIERUNEKs.Where(x => x.ID_KIERUNKU.Equals(t)).FirstOrDefault();
                    EditKierunek okno     = new EditKierunek(Kierunek);
                    okno.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Wybierz rekord");
                }
            }
            else
            {
                MessageBox.Show("Wybierz rekord");
            }
        }
コード例 #4
0
ファイル: LookUpForm.cs プロジェクト: BPietru/KursyPKSr
        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();
            }
        }