示例#1
0
        /// <summary>
        /// Retorna un LISTA de registros de la Entidad Presupuesto.Partida
        /// En la BASE de DATO la Tabla : [Presupuesto.Partida]
        /// <summary>
        /// <returns>List</returns>
        public List <PartidaEntity> Listar()
        {
            List <PartidaEntity> lstPartidaEntity = new List <PartidaEntity>();

            try
            {
                using (_DBMLPresupuestoDataContext SQLDC = new _DBMLPresupuestoDataContext(conexion))
                {
                    var resul = SQLDC.pa_S_Partida();
                    foreach (var item in resul)
                    {
                        lstPartidaEntity.Add(new PartidaEntity()
                        {
                            Codigo    = item.codPartida,
                            desNombre = item.desNombre,
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error(String.Concat("Listar", " | ", ex.Message.ToString()));
                throw ex;
            }
            return(lstPartidaEntity);
        }
示例#2
0
		/// <summary>
		/// Retorna un LISTA de registros de la Entidad Presupuesto.Partida
		/// En la BASE de DATO la Tabla : [Presupuesto.Partida]
		/// <summary>
		/// <returns>List</returns>
		public List<PartidaEntity> Listar()
		{
            List<PartidaEntity> lstPartidaEntity = new List<PartidaEntity>();
			try
			{
                using (_DBMLPresupuestoDataContext SQLDC = new _DBMLPresupuestoDataContext(conexion))
			{
				var resul = SQLDC.pa_S_Partida();
				foreach (var item in resul)
				{
                    lstPartidaEntity.Add(new PartidaEntity()
					{
					Codigo = item.codPartida,
					desNombre = item.desNombre,
					
					});
				}
			}
		}
		catch (Exception ex)
		{
            log.Error(String.Concat("Listar", " | ", ex.Message.ToString()));
			throw ex;
		}
		return lstPartidaEntity;
}