private void btnBack_Click(object sender, EventArgs e) { switch (this.indexform) { case 0: { fVehicle f = new fVehicle(formQuanLyXeGui); formQuanLyXeGui.openChildForm(f); break; } case 1: { fotherServices_Park f = new fotherServices_Park(formQuanLyXeGui); formQuanLyXeGui.openChildForm(f); break; } case 2: { fotherServices_Fix f = new fotherServices_Fix(formQuanLyXeGui); formQuanLyXeGui.openChildForm(f); break; } case 3: { fotherServices_Wash f = new fotherServices_Wash(formQuanLyXeGui); formQuanLyXeGui.openChildForm(f); break; } } }
private void btnOK_Click(object sender, EventArgs e) { this.vel.typeGui = this.cbLoaiGui.SelectedIndex; this.vel.ngayGui = DateTime.Now; if (this.vehParkBus.insertVehicle(this.vel) && this.vehicleBUS.UpdateStatusVehicle(this.vel.id, "PARK", 1)) { MessageBox.Show("Insert Successfully"); this.cbLoaiGui.SelectedIndex = -1; fVehicle f = new fVehicle(formQuanLyXeGui); formQuanLyXeGui.openChildForm(f); } else { MessageBox.Show("Insert Failed"); } }