Ejemplo n.º 1
0
        private void searchflightBtn_Click(object sender, EventArgs e)
        {
            int x = -1;

            if (flightidTxt.Text != "")
            {
                x = int.Parse(flightidTxt.Text);
            }
            dataView.DataSource = Kontrol_Et.sorguFlight(0, x, departureidTxt.Text, arrivalidTxt.Text, acepilotnameTxt.Text, acepilotidTxt.Text, secondarypilotnameTxt.Text, secondarypilotidTxt.Text, host1nameTxt.Text, host1idTxt.Text, host2nameTxt.Text, host2idTxt.Text, host3nameTxt.Text, host3idTxt.Text);
            dataView.Update();
        }
Ejemplo n.º 2
0
        private void addflightBtn_Click(object sender, EventArgs e)
        {
            int x = -1;

            if (flightidTxt.Text != "")
            {
                x = int.Parse(flightidTxt.Text);
            }
            try
            {
                dataView.DataSource = Kontrol_Et.sorguFlight(2, x, departureidTxt.Text, arrivalidTxt.Text, acepilotnameTxt.Text, acepilotidTxt.Text, secondarypilotnameTxt.Text, secondarypilotidTxt.Text, host1nameTxt.Text, host1idTxt.Text, host2nameTxt.Text, host2idTxt.Text, host3nameTxt.Text, host3idTxt.Text);
                dataView.Update();
                MessageBox.Show("Added succesfully");
            }
            catch (Exception)
            {
                MessageBox.Show("Failed to insert to database");
            }
        }
Ejemplo n.º 3
0
        private void removefligthBtn_Click(object sender, EventArgs e)
        {
            int x = -1;

            if (flightidTxt.Text != "")
            {
                x = int.Parse(flightidTxt.Text);
            }

            try
            {
                dataView.DataSource = Kontrol_Et.sorguFlight(1, x, departureidTxt.Text, arrivalidTxt.Text, acepilotnameTxt.Text, acepilotidTxt.Text, secondarypilotnameTxt.Text, secondarypilotidTxt.Text, host1nameTxt.Text, host1idTxt.Text, host2nameTxt.Text, host2idTxt.Text, host3nameTxt.Text, host3idTxt.Text);
                dataView.Update();
                MessageBox.Show("Deletion Succesfull");
            }
            catch (Exception)
            {
                MessageBox.Show("Deletion failed");
            }
        }