Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Domain/Patrocinador.cs @ 285:c8f378272407
#123: Patrocinadores de las vans.
author | juanjose.montesdeocaarbos |
---|---|
date | Sat, 31 Dec 2011 14:45:55 -0300 |
parents | 6f5ab71614d4 |
children | 9bc60d166c8a |
rev | line source |
---|---|
138
62791999ad01
Agregando relación entre Evento y Patrocinador
nelopauselli
parents:
137
diff
changeset
|
1 using System.Drawing; |
62791999ad01
Agregando relación entre Evento y Patrocinador
nelopauselli
parents:
137
diff
changeset
|
2 using System.IO; |
137 | 3 |
4 namespace AltNetHispano.Agendas.Domain | |
5 { | |
274
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
6 public class Patrocinador : Identificable |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
7 { |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
8 public virtual string Nombre { get; set; } |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
9 public virtual byte[] Logo { get; set; } |
137 | 10 |
274
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
11 public Patrocinador(string nombre) |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
12 { |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
13 Nombre = nombre; |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
14 } |
137 | 15 |
274
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
16 protected Patrocinador() |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
17 { |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
18 } |
138
62791999ad01
Agregando relación entre Evento y Patrocinador
nelopauselli
parents:
137
diff
changeset
|
19 |
274
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
20 public virtual void LoadLogo(string path) |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
21 { |
278 | 22 using (var image = Image.FromFile(path)) |
23 { | |
24 var ms = new MemoryStream(); | |
25 image.Save(ms, image.RawFormat); | |
26 Logo = ms.ToArray(); | |
27 } | |
274
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
28 } |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
29 } |
137 | 30 } |