Beispiel #1
0
        private int ObtenerIdSexo()
        {
            Datos.BeLifeEntities bbdd    = new Datos.BeLifeEntities();
            Datos.Sexo           sexoDes = bbdd.Sexo.First(s => s.Descripcion == IdSexo);
            int Id = sexoDes.IdSexo;

            return(Id);
        }
Beispiel #2
0
        /// <summary>
        /// Copia los valores de base de datos a este objeto en base al ID
        /// </summary>
        /// <returns>True si se logro una copia. False de lo contrario</returns>
        public bool Read()
        {
            Datos.BeLifeEntities bbdd = new Datos.BeLifeEntities();

            try
            {
                Datos.Sexo sex = bbdd.Sexo.First(s => s.IdSexo == this.IdSexo);
                CommonBC.Syncronize(sex, this);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }