Beispiel #1
0
        // Add new record.
        // New window for data input will pop up.
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            WorkForm workFormCopy = this;
            AddTrain newTrain     = new AddTrain(ref workFormCopy, ref trainDataTable);

            newTrain.Show();
        }
Beispiel #2
0
        // Add new record.
        // New window for data input will pop up.
        private void addNewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WorkForm workFormCopy = this;
            AddTrain newTrain     = new AddTrain(ref workFormCopy, ref trainDataTable);

            newTrain.Show();
        }
Beispiel #3
0
 // Display train number of each train,
 // that satisfies particular statement.
 // In this case station name will
 // be considered.
 private void findNumberOfSpecificTrainsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try {
         if (trainList.trainList.Count == 0)
         {
             throw new InvalidOperationException(OPERATION_ON_EMPTY_LIST);
         }
         WorkForm      workFormCopy = this;
         FindByStation newForm      = new FindByStation(ref workFormCopy);
         newForm.Show();
     }
     catch (InvalidOperationException ex)
     {
         MessageBox.Show(ex.Message,
                         "Empty List",
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Warning);
     }
 }
 public FindByStation(ref WorkForm parent)
 {
     this.mainForm = parent;
     InitializeComponent();
 }
 public FindByStationAndArrivalTime(ref WorkForm parent)
 {
     InitializeComponent();
     this.mainForm = parent;
 }
Beispiel #6
0
 public AddTrain(ref WorkForm wForm, ref DataGridView dataTable)
 {
     parent         = wForm;
     trainDataTable = dataTable;
     InitializeComponent();
 }