public BultosApp ActualizarInventarioPaquetes(string Ret_Mensaje, string RES_CODIGO, string SUC_CODIGO, string BLT_CODIGO_BARRA, string BLT_UBICACION, string BLT_ENTREGAR, string LOG_SESSION_ID, string LOG_DIRECCION_IP) { if (CheckInternetConnection() == false) { return(_bultosApp2); } var restPay = @"http://192.168.199.228:3333//app/actualizar_inventario_paquetes?Ret_Mensaje=" + Ret_Mensaje + "&RES_CODIGO=" + RES_CODIGO + "&SUC_CODIGO=" + SUC_CODIGO + "&BLT_CODIGO_BARRA=" + BLT_CODIGO_BARRA + "&BLT_UBICACION=" + BLT_UBICACION + "&BLT_ENTREGAR=" + BLT_ENTREGAR + "&LOG_SESSION_ID=" + LOG_SESSION_ID + "&LOG_DIRECCION_IP=" + LOG_DIRECCION_IP + ""; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(restPay)); //request.ContentType = "application/json"; request.Method = "GET"; using (WebResponse response = request.GetResponse()) { // Get a stream representation of the HTTP web response: using (Stream stream = response.GetResponseStream()) { // Use this stream to build a JSON document object: JsonValue jsonDoc = JsonObject.Load(stream); _bultosApp2 = JsonConvert.DeserializeObject <BultosApp>(jsonDoc.ToString()); } } return(_bultosApp2); }
public void actualizar() { _bultos = _bultosWS.ActualizarInventarioPaquetes("", usuario, "001", txtCodigo.Text.Trim(), txtUbicacion.Text.Trim(), Chequear(), "1", ip); if (_bultos == null) { ReproducirAlertaError(); LimpiarCodigo(); return; } if (_bultos.BltNumero == 0) { ReproducirAlerta(); if (_noDisponibleAlertDialog != null && _noDisponibleAlertDialog.IsShowing) { _noDisponibleAlertDialog.Hide(); } MostrarMensaje(); } else { ReproducirAlertaError(); if (_noDisponibleAlertDialog != null && _noDisponibleAlertDialog.IsShowing) { _noDisponibleAlertDialog.Hide(); } MostrarMensaje(); } LimpiarCodigo(); }