コード例 #1
0
        /// <summary>
        /// Retorna de la base de datos la lista con los lotes disponibles para programar reimplante
        /// </summary>
        /// <param name="organizacionId">Id de la organizacion</param>
        /// <returns>Lista con la informacion de lotes disponibles para reimplante</returns>
        internal ResultadoInfo <OrdenReimplanteInfo> ObtenerLotesDisponiblesReimplante(int organizacionId)
        {
            var retValue = new ResultadoInfo <OrdenReimplanteInfo>();

            try
            {
                Dictionary <string, object> parameters =
                    AuxProgramacionReimplanteDAL.ObtenerParametrosPorOrganizacionId(organizacionId);
                DataSet ds = Retrieve("[dbo].[OrdenReimplante_ObtenerCorralesProgramar]", parameters);
                if (ValidateDataSet(ds))
                {
                    retValue = MapProgramacionReimplanteDAL.ObtenerLotesDisponiblesReimplante(ds);
                }
            }
            catch (SqlException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (DataException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(retValue);
        }
コード例 #2
0
        /// <summary>
        /// Retorna de la base de datos la lista de programacion reimplante por LoteID
        /// </summary>
        /// <param name="organizacionId">Id de la organizacion</param>
        /// <returns>Lista con la informacion de la tabla ProgramacionReinplante</returns>
        internal List <ProgramacionReinplanteInfo> ObtenerProgramacionReimplantePorLoteID(LoteInfo lote)
        {
            var retValue = new List <ProgramacionReinplanteInfo>();

            try
            {
                Dictionary <string, object> parameters =
                    AuxProgramacionReimplanteDAL.ObtenerParametrosProgramacionReimplantePorLoteID(lote);
                DataSet ds = Retrieve("[dbo].[ProgramacionReimplante_ObtenerPorLoteID]", parameters);
                if (ValidateDataSet(ds))
                {
                    retValue = MapProgramacionReimplanteDAL.ObtenerProgramacionReimplantePorLoteID(ds);
                }
            }
            catch (SqlException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (DataException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(retValue);
        }