Example #1
0
        public bool ExisteIdUnidadNegocio(short IdUnidadNegocio, short IdEstado)
        {
            SiniestrosSeguros.DTO.ModelViews.UnidadNegocio UN = null;

            try
            {
                UN = (from t in context.SP_S_UnidadNegocio(IdEstado).ToList()
                      where t.IdUnidadNegocio == IdUnidadNegocio
                      select new SiniestrosSeguros.DTO.ModelViews.UnidadNegocio()
                {
                    IdUnidadNegocio = t.IdUnidadNegocio
                }).FirstOrDefault();

                if (UN != null)
                {
                    retorno = true;
                }
            }
            catch (Exception ex)
            {
                UN = null;
                throw ex;
            }

            return(retorno);
        }