-
Notifications
You must be signed in to change notification settings - Fork 0
/
FrmMain.cs
184 lines (162 loc) · 5.35 KB
/
FrmMain.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
using RentCarGonzalez.Clientes;
using RentCarGonzalez.Devoluciones;
using RentCarGonzalez.Empleados;
using RentCarGonzalez.Inspeccion;
using RentCarGonzalez.Marcas;
using RentCarGonzalez.Modelos;
using RentCarGonzalez.Rentas;
using RentCarGonzalez.Reportes;
using RentCarGonzalez.TiposCombustible;
using RentCarGonzalez.TiposdeVehiculo;
using RentCarGonzalez.Vehiculos;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RentCarGonzalez
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
}
private void label2_Click(object sender, EventArgs e)
{
label2.Text = comboBox1.Text;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
btnClientes.Visible = false;
btnCombustible.Visible = false;
btndevolucion.Visible = false;
btnEmpleado.Visible = false;
btnMarcas.Visible = false;
btnModelo.Visible = false;
btnRenta.Visible = false;
btnReportes.Visible = false;
btnTipoVehiculo.Visible = false;
btnVehiculos.Visible = false;
btnInspeccion.Visible = false;
if (comboBox1.SelectedItem.ToString() == "Modelos")
{
btnModelo.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Inspección")
{
btnInspeccion.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Clientes")
{
btnClientes.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Tipos de combustibles")
{
btnCombustible.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Devolucion")
{
btndevolucion.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Empleados")
{
btnEmpleado.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Marcas")
{
btnMarcas.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Renta de vehiculo")
{
btnRenta.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Reportes")
{
btnReportes.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Tipos de vehiculo")
{
btnTipoVehiculo.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Vehiculos")
{
btnVehiculos.Visible = true;
}
if (comboBox1.SelectedItem.ToString() == "Todos")
{
btnClientes.Visible = true;
btnCombustible.Visible = true;
btndevolucion.Visible = true;
btnEmpleado.Visible = true;
btnMarcas.Visible = true;
btnModelo.Visible = true;
btnRenta.Visible = true;
btnReportes.Visible = true;
btnTipoVehiculo.Visible = true;
btnVehiculos.Visible = true;
btnInspeccion.Visible = true;
}
groupBox2.Text = "Hacer gestion de "+comboBox1.Text;
}
private void button1_Click(object sender, EventArgs e)
{
FrmMarcas fed = new FrmMarcas();
fed.ShowDialog();
}
private void button2_Click(object sender, EventArgs e)
{
FrmClientes fed = new FrmClientes();
fed.ShowDialog();
}
private void button3_Click(object sender, EventArgs e)
{
FrmTipoVehiculo fed = new FrmTipoVehiculo();
fed.ShowDialog();
}
private void button5_Click(object sender, EventArgs e)
{
FrmTipoCombustible fed = new FrmTipoCombustible();
fed.ShowDialog();
}
private void button6_Click(object sender, EventArgs e)
{
FrmVehiculos fed = new FrmVehiculos();
fed.ShowDialog();
}
private void button4_Click(object sender, EventArgs e)
{
FrmRenta fed = new FrmRenta();
fed.ShowDialog();
}
private void button8_Click(object sender, EventArgs e)
{
FrmEmpleado fed = new FrmEmpleado();
fed.ShowDialog();
}
private void button7_Click(object sender, EventArgs e)
{
ReportesRentCar fed = new ReportesRentCar();
fed.ShowDialog();
}
private void btnModel_Click(object sender, EventArgs e)
{
FrmModelo fed = new FrmModelo();
fed.ShowDialog();
}
private void btndevolucion_Click(object sender, EventArgs e)
{
btnBack fed = new btnBack();
fed.ShowDialog();
}
private void btnInspeccion_Click(object sender, EventArgs e)
{
FrmInspeccion frm = new FrmInspeccion();
frm.ShowDialog();
}
}
}