Example #1
0
 public Usuario(Contato c)
 {
     this.IDContato = c.IDContato;
     this.Nome = c.Nome;
     this.Foto = c.Foto;
     this.Inativo = c.Inativo;
     Texto_Status = "";
     Contatos = new List<Contato>();
     Email = "";
     Senha = "";
 }
Example #2
0
 public static Contato MontaVO(DataRow registro)
 {
     Contato retorno = new Contato();
     retorno.IDContato = (int)registro["cont_id"];
     retorno.Nome = registro["cont_nome"].ToString();
     using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
     {
         byte[] a = (byte[])registro["cont_foto"];
         ms.Write(a, 0, a.Length);
         retorno.Foto = System.Drawing.Image.FromStream(ms);
     }
     retorno.Inativo = (bool)registro["cont_inativo"];
     return retorno;
 }