コード例 #1
0
        public void LoadLabels()
        {
            SchoolVanModule module = new SchoolVanModule();

            labelTitle.Text       = module.Name;
            labelDescription.Text = module.Description;
        }
コード例 #2
0
 private void buttonLookRoutes_Click(object sender, EventArgs e)
 {
     if (IsListSelected(listSchoolVans))
     {
         SchoolVanModule module = new SchoolVanModule();
         try
         {
             routesBox.Clear();
             module.LoadRoutesBySchoolVan(listSchoolVans.SelectedItem, routesBox);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
コード例 #3
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            SchoolVanModule module = new SchoolVanModule();

            try
            {
                module.ModifySchoolVan(selectedObject, textIdSchoolVan, numericMaxCapacity, numericFuel);
                MessageBox.Show("Camioneta modificada con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                mainPanel.Controls.Clear();
                SchoolVanMenu backMenu = new SchoolVanMenu(mainPanel);
                mainPanel.Controls.Add(backMenu);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #4
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            SchoolVanModule module = new SchoolVanModule();

            try
            {
                module.AddNewSchoolVan((int)numericMaxCapacity.Value, (int)numericFuel.Value);
                MessageBox.Show("Camioneta ingresada con Exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                mainPanel.Controls.Clear();
                SchoolVanMenu backMenu = new SchoolVanMenu(mainPanel);
                mainPanel.Controls.Add(backMenu);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #5
0
 private void confirmRemoveButton_Click(object sender, EventArgs e)
 {
     if (listSchoolVansSelected.Items.Count != 0)
     {
         foreach (Object item in listSchoolVansSelected.Items)
         {
             SchoolVanModule module = new SchoolVanModule();
             module.RemoveSchoolVan(item);
         }
         MessageBox.Show("Camioneta(s) Eliminada(s) con Exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
         mainPanel.Controls.Clear();
         SchoolVanMenu backMenu = new SchoolVanMenu(mainPanel);
         mainPanel.Controls.Add(backMenu);
     }
     else
     {
         MessageBox.Show("No se han seleccionado Camionetas para borrar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #6
0
        private void Load()
        {
            SchoolVanModule module = new SchoolVanModule();

            module.LoadAllSchoolVans(listSchoolVans);
        }
コード例 #7
0
        private void Load()
        {
            SchoolVanModule module = new SchoolVanModule();

            module.LoadFields(selectedObject, textIdSchoolVan, numericMaxCapacity, numericFuel);
        }