/// <summary>
 /// Crea un registro en almacen inventario lote, mandandole todos los parametros sin afectar la tabla Folio Lote Producto
 /// </summary>
 /// <param name="almacenInventarioLoteInfo"></param>
 /// <returns></returns>
 internal int CrearConTodosParametros(AlmacenInventarioLoteInfo almacenInventarioLoteInfo)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxAlmacenInventarioLoteDAL.ObtenerParametrosCrearConTodosParametros(almacenInventarioLoteInfo);
         int result = Create("AlmacenInventarioLote_CrearTodosParametros", parameters);
         return(result);
     }
     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);
     }
 }
 /// <summary>
 /// Obtiene una lista paginada de almaceninventariolote por producto organizacion tipo almacen y que tenga cantidad mayor a cero
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="almacenInventarioLote"></param>
 /// <returns></returns>
 internal ResultadoInfo <AlmacenInventarioLoteInfo> ObtenerAlmacenInventarioLoteAlmacenPaginado(PaginacionInfo pagina, AlmacenInventarioLoteInfo almacenInventarioLote)
 {
     try
     {
         Dictionary <string, object> parameters = AuxAlmacenInventarioLoteDAL.ObtenerParametrosAlmacenInventarioLoteAlmacenPaginado(pagina, almacenInventarioLote);
         DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerLotesPorAlmacen", parameters);
         ResultadoInfo <AlmacenInventarioLoteInfo> lista = null;
         if (ValidateDataSet(ds))
         {
             lista = MapAlmacenInventarioLoteDAL.ObtenerAlmacenInventarioLoteAlmacenPaginado(ds);
         }
         return(lista);
     }
     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);
     }
 }
 /// <summary>
 /// Se obtiene lotes
 /// </summary>
 /// <param name="almacenesInventario"></param>
 /// <returns></returns>
 internal IList <AlmacenInventarioLoteInfo> ObtenerLotesPorAlmacenInventarioXML(List <AlmacenInventarioInfo> almacenesInventario)
 {
     try
     {
         Dictionary <string, object> parameters =
             AuxAlmacenInventarioLoteDAL.
             ObtenerParametrosLotesPorAlmacenInventarioXML(almacenesInventario);
         DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerPorAlmacenInventarioXML", parameters);
         IList <AlmacenInventarioLoteInfo> lista = null;
         if (ValidateDataSet(ds))
         {
             lista = MapAlmacenInventarioLoteDAL.ObtenerLotesPorAlmacenInventarioXML(ds);
         }
         return(lista);
     }
     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);
     }
 }
 /// <summary>
 ///  Actualiza la infomracion del inventario - lote cuando se genera un envio de alimento
 /// </summary>
 /// <param name="almacenInventarioLoteInfo">Información del almácen lote - inventari</param>
 internal void ActualizarInventarioLoteEnvioMercancia(AlmacenInventarioLoteInfo almacenInventarioLoteInfo)
 {
     try{
         Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametrosActualizarEnvioAlimento(almacenInventarioLoteInfo);
         Update("AlmacenInventarioLote_ActualizarEnvioAlimento", parametros);
     }
     catch (Exception ex) {
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <summary>
 /// Actualiza los datos del lote despues de haber guardado la entrada del producto.
 /// </summary>
 /// <returns></returns>
 internal void AjustarAlmacenInventarioLote(List <AlmacenInventarioLoteInfo> listaAlmacenInventarioLote)
 {
     try
     {
         Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametrosAjustarAlmacenInventarioLote(listaAlmacenInventarioLote);
         Update("AlmacenInventarioLote_DescontarCierreDiaInventario", parametros);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <summary>
 /// Actualiza un registro almacen inventario lote
 /// </summary>
 /// <returns></returns>
 internal void DesactivarLote(AlmacenInventarioLoteInfo almacenInventarioLote)
 {
     try
     {
         Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametrosDesactivarLote(almacenInventarioLote);
         Update("AlmacenInventarioLote_DesactivarLote", parametros);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <summary>
 /// Actualiza los datos del lote despues de haber guardado la entrada del producto.
 /// </summary>
 /// <returns></returns>
 internal void DescontarAlmacenInventarioLoteProduccionDiaria(ProduccionDiariaInfo produccionDiaria)
 {
     try
     {
         Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametrosDescontarAlmacenInventarioLoteProduccionDiaria(produccionDiaria);
         Update("AlmacenInventarioLote_DescontarProduccionDiaria", parametros);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
 /// <summary>
 /// Obtiene un almaceninventariolote por lote
 /// </summary>
 /// <param name="almacenInventarioLote"></param>
 /// <returns></returns>
 internal AlmacenInventarioLoteInfo ObtenerAlmacenInventarioLoteAlmacenCodigo(AlmacenInventarioLoteInfo almacenInventarioLote)
 {
     try
     {
         Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametroObtenerAlmacenInventarioLoteAlmacenCodigo(almacenInventarioLote);
         DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerPorAlmacenLote", parametros);
         almacenInventarioLote = null;
         if (ValidateDataSet(ds))
         {
             almacenInventarioLote = MapAlmacenInventarioLoteDAL.ObtenerAlmacenInventarioLotePorLote(ds);
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
     return(almacenInventarioLote);
 }
        /// <summary>
        /// Obtiene los almacenes en base a la organizacion, el tipo de almacen y el producto
        /// </summary>
        /// <returns></returns>
        internal List <AlmacenInventarioLoteInfo> ObtenerListadoLotesPorOrganizacionTipoAlmacenProducto(ParametrosOrganizacionTipoAlmacenProductoActivo datosLotes)
        {
            List <AlmacenInventarioLoteInfo> almacen = null;

            try
            {
                Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametroObtenerListadoLotesPorOrganizacionTipoAlmacenProducto(datosLotes);
                DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerLotesPorOrganizacionProductoTipoAlmacen", parametros);
                if (ValidateDataSet(ds))
                {
                    almacen = MapAlmacenInventarioLoteDAL.ObtenerListadoAlmacenInventarioLoteTipoAlmacen(ds);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(almacen);
        }
예제 #10
0
        /// <summary>
        /// Obtiene una lista de almaceninventariolote donde esten activos y tengan movimientos
        /// </summary>
        /// <param name="almacenInfo"></param>
        /// <param name="productoInfo"></param>
        /// <returns></returns>
        internal List <AlmacenInventarioLoteInfo> ObtenerPorAlmacenProductoEnCeros(AlmacenInfo almacenInfo, ProductoInfo productoInfo)
        {
            List <AlmacenInventarioLoteInfo> lotes = null;

            try
            {
                Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerPorAlmacenProductoEnCeros(almacenInfo, productoInfo);
                DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerPorAlmacenProductoEnCeros", parametros);
                if (ValidateDataSet(ds))
                {
                    lotes = MapAlmacenInventarioLoteDAL.ObtenerPorAlmacenProductoEnCeros(ds);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(lotes);
        }
예제 #11
0
        /// <summary>
        /// Obtiene el almacen inventario lote indicado
        /// </summary>
        /// <returns></returns>
        internal AlmacenInventarioLoteInfo ObtenerAlmacenInventarioLotePorId(int almacenInventarioLoteId)
        {
            AlmacenInventarioLoteInfo almacen = null;

            try
            {
                Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametrosObtenerAlmacenInventarioLotePorId(almacenInventarioLoteId);
                DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerAlmacenPorId", parametros);
                if (ValidateDataSet(ds))
                {
                    almacen = MapAlmacenInventarioLoteDAL.ObtenerAlmacenInventarioLoteId(ds);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(almacen);
        }
예제 #12
0
        /// <summary>
        /// Obtiene la lista de almaceninventariolote
        /// </summary>
        /// <param name="almacenInventario"></param>
        /// <returns></returns>
        internal List <AlmacenInventarioLoteInfo> ObtenerPorAlmacenInventarioID(AlmacenInventarioInfo almacenInventario)
        {
            List <AlmacenInventarioLoteInfo> almacen = null;

            try
            {
                Dictionary <string, object> parametros = AuxAlmacenInventarioLoteDAL.ObtenerParametroObtenerPorAlmacenInventarioID(almacenInventario);
                DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerPorAlmacenInventarioID", parametros);
                if (ValidateDataSet(ds))
                {
                    almacen = MapAlmacenInventarioLoteDAL.ObtenerListadoAlmacenInventarioLote(ds);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(almacen);
        }