public void CheckOutVehicle() { if (svDetails != null) { _dbLayerObj = new DALayer(); ParkingBookingHistory pbhObj = new ParkingBookingHistory(); pbhObj = _dbLayerObj.VehicleCheckOut(svDetails); if (ParkingTime.Hours == 0 && svDetails.VehicleTypeID == 1) { Message = "Total Parking Fee is 20 \n" + "Parking Slot : " + ParkingSlot + " is Available"; pbhObj.TotalParkingFee = 20; } else if (ParkingTime.Hours == 0 && svDetails.VehicleTypeID == 2) { Message = "Total Parking Fee is 40 \n" + "Parking Slot : " + ParkingSlot + " is Available"; pbhObj.TotalParkingFee = 40; } else if (ParkingTime.Hours == 1 && svDetails.VehicleTypeID == 1) { Message = "Total Parking Fee is 40 \n" + "Parking Slot : " + ParkingSlot + " is Available"; pbhObj.TotalParkingFee = 40; } else if (ParkingTime.Hours == 1 && svDetails.VehicleTypeID == 2) { Message = "Total Parking Fee is 50 \n" + "Parking Slot : " + ParkingSlot + " is Available"; pbhObj.TotalParkingFee = 50; } else if (ParkingTime.Hours > 1 && svDetails.VehicleTypeID == 1) { Message = "Total Parking Fee is 60 \n" + "Parking Slot : " + ParkingSlot + " is Available"; pbhObj.TotalParkingFee = 60; } else if (ParkingTime.Hours > 1 && svDetails.VehicleTypeID == 2) { Message = "Total Parking Fee is 70 \n" + "Parking Slot : " + ParkingSlot + " is Available"; pbhObj.TotalParkingFee = 70; } pbhObj.TimeOut = TimeOut; pbhObj.OccupancyTime = ParkingTime.ToString(); _dbLayerObj.CheckOutVehicle(pbhObj); } else { Message = "Please Select the Vehicle Number From Dropdown"; } }