annotate Agendas/trunk/src/Agendas.Domain/Patrocinador.cs @ 195:4d0b2552edb2

Ticket 170: Cuando se agenda o confirma un evento, verificar que no existan otros dentro del rango horario en que se desarrollará el evento actual.
author juanjose.montesdeocaarbos
date Sat, 13 Aug 2011 01:01:54 -0300
parents 62dc9fb3a03e
children 5346c0500594
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
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
3
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
4 namespace AltNetHispano.Agendas.Domain
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
5 {
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
6 public class Patrocinador : Identificable
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
7 {
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
8 public virtual string Nombre { get; set; }
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
9 public virtual byte[] Logo { get; set; }
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
10
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
11 public Patrocinador(string nombre)
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
12 {
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
13 Nombre = nombre;
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
14 }
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
15
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
16 protected Patrocinador()
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
17 {
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
18 }
138
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
19
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
20 public virtual void LoadLogo(string path)
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
21 {
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
22 var image = Image.FromFile(path);
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
23 var ms = new MemoryStream();
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
24 image.Save(ms, image.RawFormat);
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
25 Logo = ms.ToArray();
62791999ad01 Agregando relación entre Evento y Patrocinador
nelopauselli
parents: 137
diff changeset
26 }
137
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
27 }
2d1adbaf0373 CRUD de Patrocinador
nelopauselli
parents:
diff changeset
28 }