private void button4_Click(object sender, EventArgs e) { mainPanel.Controls.Clear(); SchoolVanMenu theSchoolVanMenu = new SchoolVanMenu(mainPanel); mainPanel.Controls.Add(theSchoolVanMenu); }
private void backButton_Click(object sender, EventArgs e) { mainPanel.Controls.Clear(); SchoolVanMenu backSchoolVanMenu = new SchoolVanMenu(mainPanel); mainPanel.Controls.Add(backSchoolVanMenu); }
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); } }
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); } }
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); } }
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); } }
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); } }