コード例 #1
0
        private void ArrivalDeparture_Load(object sender, EventArgs e)
        {
            numericUpDown1.Minimum = 10;
            numericUpDown1.Maximum = 999;
            dateTimePicker2.Value = dateTimePicker1.Value.AddDays(15);

            ArrivalDepartureQueries q = new ArrivalDepartureQueries();
            q.comboShip(comboBox1);
            q.comboCountries(comboBox2);
            q.comboCaptain(comboBox4);
            q.displayRecord(listView1);
            q.displayArrival(listView2);
        }
コード例 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox3.Text != String.Empty)
                {
                    ArrivalDepartureQueries q = new ArrivalDepartureQueries();
                    q.markArrived(int.Parse(textBox3.Text), dateTimePicker3.Text, textBox2.Text, comboBox6.Text, textBox4.Text);
                    button5_Click(sender, e);
                }
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
            
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (comboBox4.Text != String.Empty && textBox1.Text != String.Empty && comboBox2.Text != String.Empty)
                {
                    ArrivalDepartureQueries q = new ArrivalDepartureQueries();
                    q.addRecord(int.Parse(comboBox1.Text), comboBox2.Text, dateTimePicker1.Text, dateTimePicker2.Text, comboBox3.Text, textBox1.Text, int.Parse(numericUpDown1.Value.ToString()), comboBox4.Text);
                    button5_Click(sender, e);
                }

                else
                {
                    MessageBox.Show("Please fill all required fields", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                }
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
           
        }
コード例 #4
0
 private void button5_Click(object sender, EventArgs e)
 {
     ArrivalDepartureQueries q = new ArrivalDepartureQueries();
     q.displayRecord(listView1);
     q.displayArrival(listView2);
 }