Esempio n. 1
0
        ////////////////////////////////////////////////////////////
        // Opens Form that allows user to see Create Manifest Page
        private void btnAddShipment_Click(object sender, EventArgs e)
        {
            AddCargo ad = new AddCargo();

            Hide();
            ad.Show();
        }
 ////////////////////////////////////////////////////////////
 // Opens the Add Cargo Piece window for the user
 // so that they can add additional cargo pieces
 private void btnAddCargo_Click(object sender, EventArgs e)
 {
     if (_dt.Rows.Count >= 1)
     {
         DialogResult result =
             MessageBox.Show(@"Would you like to add more cargo pieces to the manifest?"
                             , @"Add Additional Cargo",
                             MessageBoxButtons.YesNo);
         if (result == DialogResult.Yes)
         {
             _dt.Clear();
             Form addCargo = new AddCargo(_rollingstock, _container);
             addCargo.Show();
             Close();
         }
     }
     else
     {
         Form addCargo = new AddCargo();
         addCargo.Show();
         Close();
     }
 }