public void LoadLabels() { SchoolVanModule module = new SchoolVanModule(); labelTitle.Text = module.Name; labelDescription.Text = module.Description; }
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); } } }
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); } }
private void Load() { SchoolVanModule module = new SchoolVanModule(); module.LoadAllSchoolVans(listSchoolVans); }
private void Load() { SchoolVanModule module = new SchoolVanModule(); module.LoadFields(selectedObject, textIdSchoolVan, numericMaxCapacity, numericFuel); }