Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Domain/Patrocinador.cs @ 274:72a96459f910
Ticket #123: Patrocinadores de las vans.
author | juanjose.montesdeocaarbos |
---|---|
date | Wed, 30 Nov 2011 08:56:01 -0300 |
parents | 5346c0500594 |
children | 6f5ab71614d4 |
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 { |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
22 var image = Image.FromFile(path); |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
23 var ms = new MemoryStream(); |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
24 image.Save(ms, image.RawFormat); |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
25 Logo = ms.ToArray(); |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
26 } |
72a96459f910
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
200
diff
changeset
|
27 } |
137 | 28 } |