public DataSet ObtenerKardexPieza(int?iCodigoPieza, string sCodigoBarras) { try { if (common.EstaServicioDisponible()) { if (!iCodigoPieza.HasValue && string.IsNullOrEmpty(sCodigoBarras)) { throw new Exception("Debe proporcionar un valor por lo menos para realizar la consulta."); } HHsvc.SCPP_HH proxy = ConfigDataAccess.ObtenerServiceProxy(); DataSet dsKardex = proxy.ObtenerKardexPieza(iCodigoPieza, true, sCodigoBarras); if (dsKardex.Tables.Count < 2) { throw new Exception("No se pudo obtener la informacion de esta pieza"); } if (dsKardex.Tables[0] == null || dsKardex.Tables[0].Rows.Count < 1) { throw new Exception("No se pudo obtener la informacion hacerca de esta pieza"); } return(dsKardex); } else { throw new Exception("No se tiene conexion a la red, intente mas tarde."); } } catch (Exception ex) { throw ex; } }
public DataTable Obtener(int iCodigoOperador, int iCodigoProceso) { HHsvc.SCPP_HH proxy = null; try { if (iCodigoOperador == 0) { throw new Exception("Valor de parametro Usuario incorrecto."); } if (common.EstaServicioDisponible()) { proxy = ConfigDataAccess.ObtenerServiceProxy(); return(proxy.ObtenerProduccion(iCodigoOperador, true, iCodigoProceso, true)); } else { throw new Exception("No es posible establecer comunicación."); } } catch (Exception ex) { throw ex; } finally { if (proxy != null) { proxy.Dispose(); } } }
public DataTable ObtenerCarroPendienteSecadorDetalle(int iCarro) { try { if (common.EstaServicioDisponible()) { HHsvc.SCPP_HH proxy = ConfigDataAccess.ObtenerServiceProxy(); DataTable dtCarrosPendientesDetalle = proxy.ObtenerCarrosPendientesSecadorDetalle(iCarro, true); return(dtCarrosPendientesDetalle); } else { throw new Exception("No se tiene conexion a la red, intente mas tarde."); } } catch (Exception ex) { throw ex; } }