Exemplo n.º 1
0
        public un_egntypes Id_Type(int id)
        {
            un_egntypes result  = new un_egntypes();
            var         type    = ID_Type.GetAll();
            var         id_card = identity_cards.GetAll();
            var         query   = id_card.FirstOrDefault(f => f.id_person == id);

            return(result = type.FirstOrDefault(s => s.id_egntype == query.id_egnType));
        }
Exemplo n.º 2
0
        public List <ComboBoxModel> Id_Types()
        {
            var gen = ID_Type.GetAll();
            List <ComboBoxModel> result = new List <ComboBoxModel>();

            result = gen.Select(s => new ComboBoxModel {
                id = s.id_egntype, Name = s.Name
            }).ToList();
            return(result);
        }