private void CarDidLeaveDefault(VideoInterpreter sender) { /* * using (SqlConnection connection = new SqlConnection(SQLConnection.ConnString("ParkingLotDB"))) * { * * try * { * using (SqlCommand command = new SqlCommand("spCarLeft", connection)) * { * command.CommandType = CommandType.StoredProcedure; * command.Parameters.Add(new SqlParameter("@ParkingLotID", sender.getParkingLotId())); * connection.Open(); * command.ExecuteNonQuery(); * connection.Close(); * System.Console.Out.Write("Success"); * } * } * catch (Exception e) * { * System.Console.Out.Write(e.ToString()); * } * } */ }
/* * Examples of delegate usage... * * public void CarDidLeave(DateTime timeCarLeft, VideoInterpreter sender) * { * timeCarLeft is the time this was called * use the sender object to get attributes such as the lot id and lot name * } * * public void CarDidEnter(DateTime timeCarEntered, VideoInterpreter sender) * { * timeCarLeft is the time this was called * use the sender object to get attributes such as the lot id and lot name * } * */ private void CarProcessingDoneDefault(VideoInterpreter sender) { }