Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            mainPanel.Controls.Clear();
            SchoolVanMenu theSchoolVanMenu = new SchoolVanMenu(mainPanel);

            mainPanel.Controls.Add(theSchoolVanMenu);
        }
Exemplo n.º 2
0
        private void backButton_Click(object sender, EventArgs e)
        {
            mainPanel.Controls.Clear();
            SchoolVanMenu backSchoolVanMenu = new SchoolVanMenu(mainPanel);

            mainPanel.Controls.Add(backSchoolVanMenu);
        }
Exemplo n.º 3
0
 public ConsultSchoolVans(Panel mainPanel)
 {
     InitializeComponent();
     try
     {
         Load();
         this.mainPanel = mainPanel;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         UserControl baCkMenu = new SchoolVanMenu(mainPanel);
         mainPanel.Controls.Add(baCkMenu);
     }
 }
Exemplo n.º 4
0
 public ModifySchoolVanSelectList(Panel mainPanel)
 {
     InitializeComponent();
     try
     {
         LoadSchoolVan();
         this.mainPanel = mainPanel;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         UserControl backMenu = new SchoolVanMenu(mainPanel);
         mainPanel.Controls.Add(backMenu);
     }
 }
Exemplo n.º 5
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);
            }
        }
Exemplo n.º 6
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);
            }
        }
Exemplo n.º 7
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);
     }
 }