/// <summary> /// Obtiene una lista de Almacen Inventario Lote /// </summary> /// <param name="filtroAyudaLote"></param> /// <returns></returns> public IList <AlmacenInventarioLoteInfo> ObtenerAlmacenInventarioLotePorLote(FiltroAyudaLotes filtroAyudaLote) { IList <AlmacenInventarioLoteInfo> result; try { Logger.Info(); var almacenInventarioLoteBl = new AlmacenInventarioLoteBL(); result = almacenInventarioLoteBl.ObtenerAlmacenInventarioLotePorLote(filtroAyudaLote); } catch (ExcepcionGenerica) { throw; } catch (Exception ex) { Logger.Error(ex); throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex); } return(result); }
public static IList <AlmacenInventarioLoteInfo> ObtenerLotes(FiltroAyudaLotes filtroLote) { IList <AlmacenInventarioLoteInfo> listaAlmacenInventarioLote = null; try { var seguridad = HttpContext.Current.Session["Seguridad"] as SeguridadInfo; if (seguridad != null) { var almacenPL = new AlmacenPL(); List <AlmacenInfo> almacenesOrganizacion = almacenPL.ObtenerAlmacenesPorOrganizacion(seguridad.Usuario.Organizacion.OrganizacionID); AlmacenInfo almacenPlantaAlimentos = almacenesOrganizacion.FirstOrDefault( alm => alm.TipoAlmacenID == TipoAlmacenEnum.PlantaDeAlimentos.GetHashCode()); if (almacenPlantaAlimentos != null) { filtroLote.AlmacenID = almacenPlantaAlimentos.AlmacenID; } filtroLote.OrganizacionID = seguridad.Usuario.Organizacion.OrganizacionID; var almacenInventarioLotePL = new AlmacenInventarioLotePL(); listaAlmacenInventarioLote = almacenInventarioLotePL.ObtenerAlmacenInventarioLotePorLote(filtroLote); return(listaAlmacenInventarioLote); } } catch (ExcepcionDesconocida ex) { Logger.Error(ex); throw; } catch (Exception ex) { Logger.Error(ex); } return(listaAlmacenInventarioLote); }
/// <summary> /// Obtiene un diccionario con los parametros necesarios para /// la ejecucion del procedimiento almacenado AlmacenInventarioLote_ObtenerLotesProducto /// </summary> /// <param name="filtroAyudaLote"></param> /// <returns></returns> internal static Dictionary <string, object> ObtenerAlmacenInventarioLotePorLote(FiltroAyudaLotes filtroAyudaLote) { try { Logger.Info(); var parametros = new Dictionary <string, object> { { "@OrganizacionID", filtroAyudaLote.OrganizacionID }, { "@Lote", filtroAyudaLote.Lote }, { "@ProductoID", filtroAyudaLote.ProductoID }, { "@AlmacenID", filtroAyudaLote.AlmacenID }, }; return(parametros); } catch (Exception ex) { Logger.Error(ex); throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex); } }
/// <summary> /// Obtiene una lista de Almacen Inventario Lote /// </summary> /// <param name="filtroAyudaLote"></param> /// <returns></returns> internal IList <AlmacenInventarioLoteInfo> ObtenerAlmacenInventarioLotePorLote(FiltroAyudaLotes filtroAyudaLote) { try { Dictionary <string, object> parameters = AuxAlmacenInventarioLoteDAL. ObtenerAlmacenInventarioLotePorLote(filtroAyudaLote); DataSet ds = Retrieve("AlmacenInventarioLote_ObtenerLotesProducto", parameters); IList <AlmacenInventarioLoteInfo> lista = null; if (ValidateDataSet(ds)) { lista = MapAlmacenInventarioLoteDAL.ObtenerAlmacenInventarioPorLote(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); } }