The image should be pristine, any drawn lines not affecting the image itself - you may want to put a transparent canvas over the top of the image to catch any clicks and draw the lines onto this.
Then you're going to want to save start and end points that were clicked by the user for each line into an array and then transfer this array into the database.
When the image is recalled from the database you'll then need to re-render the lines on.
Alternatively you could simply save the second canvas as an image also, but this doesn't give you any editing facility - at least with the previous method you could click near one of the previously rendered points and allow it to be moved (for example).
I'm no GDI programmer, though, but this is more of a design issue than a GDI question.