view Agendas/trunk/src/Agendas.Domain/Patrocinador.cs @ 162:557c386fcecc

Ticket 153: UI de Publicar.
author juanjose.montesdeocaarbos
date Fri, 05 Aug 2011 22:02:23 -0300
parents 62dc9fb3a03e
children 5346c0500594
line wrap: on
line source

using System.Drawing;
using System.IO;

namespace AltNetHispano.Agendas.Domain
{
	public class Patrocinador : Identificable
	{
		public virtual string Nombre { get; set; }
		public virtual byte[] Logo { get; set; }

		public Patrocinador(string nombre)
		{
			Nombre = nombre;
		}

		protected Patrocinador()
		{
		}

		public virtual void LoadLogo(string path)
		{
			var image = Image.FromFile(path);
			var ms = new MemoryStream();
			image.Save(ms, image.RawFormat);
			Logo = ms.ToArray();
		}
	}
}