public static IList <IntegracionNetShip> ObtieneValoresNetShip(string NumMaster, string StoreProcedureName) { List <IntegracionNetShip> lista = new List <IntegracionNetShip>(); try { //Abrir Conexion conn = BaseDatos.NuevaConexion(); objParams = SqlHelperParameterCache.GetSpParameterSet(conn, StoreProcedureName); objParams[0].Value = NumMaster; SqlCommand command = new SqlCommand(StoreProcedureName, conn); command.Parameters.AddRange(objParams); command.CommandType = CommandType.StoredProcedure; dreader = command.ExecuteReader(); IntegracionNetShip netShip = null; while (dreader.Read()) { netShip = new IntegracionNetShip(); netShip.Consolidada = dreader["Consolidada"].ToString(); netShip.HouseBl = dreader["House BL"].ToString(); netShip.Rut = dreader["RUT"].ToString(); netShip.Cliente = dreader["Cliente"].ToString(); netShip.TipoCliente = dreader["Tipo Cliente"].ToString(); if (!string.IsNullOrEmpty(dreader["Ruteado"].ToString())) { netShip.Ruteado = dreader["Ruteado"].ToString().Equals("1"); } netShip.ShippingInstruction = dreader["Shipping Instruction"].ToString(); netShip.Puerto = dreader["Puerto"].ToString(); Base.Log.Log.EscribirLog(netShip.HouseBl); lista.Add(netShip); } } catch (Exception ex) { Base.Log.Log.EscribirLog(ex.Message); } finally { conn.Close(); } return(lista); }
private void GuardaRegLogCarga(Int32 idPaperless, string valorPaperless, string valorNetShip, string mensaje, Int32 idPaperlessTipoError) { IntegracionNetShip logCarga = new IntegracionNetShip(); logCarga.IdPaperless = idPaperless; logCarga.ValorPaperless = valorPaperless; logCarga.ValorNetShip = valorNetShip; logCarga.Mensaje = mensaje; logCarga.IdPaperlessTipoError = idPaperlessTipoError; LogicaNegocios.Integracion.Integracion.GuardaLogProceso(logCarga); }
public static void GuardaLogProceso(IntegracionNetShip _int) { try { //Abrir Conexion conn = BaseDatos.NuevaConexion(); objParams = SqlHelperParameterCache.GetSpParameterSet(conn, "SP_N_Paperless_IntegracionNetship"); objParams[0].Value = _int.IdPaperless; if (_int.ValorPaperless != null) { objParams[1].Value = _int.ValorPaperless; } else { objParams[1].Value = null; } if (_int.ValorNetShip != null) { objParams[2].Value = _int.ValorNetShip; } else { objParams[2].Value = null; } if (_int.Mensaje != null) { objParams[3].Value = _int.Mensaje; } else { objParams[3].Value = null; } if (_int.Mensaje != null) { try { objParams[4].Value = _int.IdPaperlessTipoError; } catch (Exception) { } } else { objParams[4].Value = null; } SqlCommand command = new SqlCommand("SP_N_Paperless_IntegracionNetship", conn); command.Parameters.AddRange(objParams); command.CommandType = CommandType.StoredProcedure; //dreader = command.ExecuteReader(); var idRetorno = Convert.ToInt64(command.ExecuteScalar()); } catch (Exception ex) { Base.Log.Log.EscribirLog(ex.Message); } finally { conn.Close(); } }
public static void GuardaLogProceso(IntegracionNetShip _int) { AccesoDatos.Integracion.IntegracionADO.GuardaLogProceso(_int); }
public static void GuardaLogProceso(IntegracionNetShip _int) { AccesoDatos.Integracion.IntegracionADO.GuardaLogProceso(_int); }
private void GeneraDummy(PaperlessUsuario1HousesBL house, int i) { var item = new IntegracionNetShip(); item.HouseBl = "hblsDummy" + i; item.Rut = i.ToString(); item.Cliente = "ClienteDummy"; item.TipoCliente = "Directo"; item.Ruteado = true; item.ShippingInstruction = ""; item.Puerto = ""; return; }