Personally, I think of this in terms of major and minor being modes (because they are), and then modify major or minor into the various major family or minor family modes: 

Major (ionian)

 - raise the `^4` degree to get lydian
 - lower the `^7` degree to get mixolydian

Minor (aeolian)

  - raise the `^6` degree to get dorian
  - lower the `^2` degree to get phrygian
  - lower the `^2` and `^5` to get locrian

The practical application of that is some thing like this: 

  - start with the given tonic (this is the likely scenario, someone says, for example, _play in `F#` dorian_)
  - the the major/minor key signature, so by "family" start with `F#` minor, key signature of three sharps, `F# C# G#`
  - the `^6` degree, relative to tonic `F#` that will be some kind of `D`, specifically by the key signature it is a `D` natural, raise `D` natural to `D#`
  - `F#` dorian's key signature is four sharps `F# C# G# D#`

Your examples of... 

> Dorian who have 5 flats

...and... 

> which Locrian's signature is 7#

...seem more like music theory quiz questions, and not so practical. Who says _play in the dorian mode with five flats?_

Nevertheless, the way to answer those questions is still easiest, IMO, by reference to major key signatures first, then the various rotations of the major scale to the diatonic modes. 

For example... 

  - five flats is `Db` major, the dorian mode tonic is the `^2` degree of `Db` major, which is tone `Eb`, so `Eb` dorian has five sharps.
  - seven sharps is `C#` major, the locian mode tonic is the `^7` degree of `C#` major, which is tone `B#`, so `B#` locrian has seven sharps.

-----

One comment on your method. I may be misuderstanding it but, this part... 

<pre>
C = 0
D = 2#
E = 4#
</pre>

...will tell you how to get the _major key signature_ on those given tonics. `C` major is zero sharps/flats, `D` major is two sharps, `E` major is four sharps, etc.

But, your mistake seems to be here... 

<pre>
Ionian NO-CHANGE
Dorain +2#
Phrygian +4#
</pre>

...moving to relative terms raising two degrees (adding two sharps as you describe it) does not give us the dorian mode, it gives us _the major scale_ on the second scale degree of the starting scale. So, if we were starting on `Eb` major, for example, `F` natural is the second scale degree, raising two tones, the `Ab` and `Eb` to `A` natural and `E` natural, leaving only the `B`, gives us `F` major.

If we look at it as `Eb` major, called `Eb` ionian, and we want to the dorian scale/key signature on the second scale degree of `Eb` ionian, _there is no change to the scale/key signature._ `Eb` ionian and `F` dorian are the same collection of tones, just starting on different points. The key signature is three flats, `Bb Eb Ab`, and the scales are `Eb F G Ab Bb C D Eb` and merely its rotation `F G Ab Bb C D Eb F`.

Your second chart would really be... 

<pre>Ionian NO-CHANGE
Ionian transposed up M2 +2#
Ionian transposed up M3 +4#
</pre>