private void SetNewOrderFromProdPallet() { try { dt = WSWmsHelper.GetTransport(trId); } catch (Exception ex) { Utility.ShowErrorMessage(this, ex.Message); Log.Write(this, "Problem at SetNewOrderFromProdPallet in TransportOrderDetails, transportOrderAidID = " + transportOrderAidID, Log.DebugLevels.ERROR); } if (dt != null && dt.Rows.Count == 0) { OnBackPressed(); } try { DataRow dr = dt.Rows[0]; if (!string.IsNullOrEmpty(leNummer)) { foreach (DataRow drSearch in dt.Rows) { if (leNummer.Equals(drSearch[FieldNames.LeNummer].ToString())) { dr = drSearch; break; } } } leNummer = dr[FieldNames.LeNummer].ToString(); le2TextView.Text = leNummer2; leTyp = dr[FieldNames.LeTyp].ToString(); sourceBin = dr[FieldNames.SourceBin].ToString(); targetBin = dr[FieldNames.TargetBin].ToString(); priority = int.Parse(dr[FieldNames.Priority].ToString()); trId = int.Parse(dr[FieldNames.TrId].ToString()); leId = int.Parse(dr[FieldNames.LeId].ToString()); gewichtTextView.Text = string.Empty; hintTextView.Text = GetString(Resource.String.scanLe); if (from == FROM_TRANSPORT && manualInputConf) { digitsToCutFromTargetBin = int.Parse(dr[FieldNames.LevelDigits].ToString()); shortenedTargetBin = targetBin.Substring(0, targetBin.Length - digitsToCutFromTargetBin); } } catch (Exception e) { Utility.ShowErrorMessage(this, e.Message); Log.Write(this, "Get order info from datatable for transportOrderAidID = " + transportOrderAidID, Log.DebugLevels.ERROR); } }
private bool ExistsStartedOrder() { try { if (from == CONST_SHIPMENT) { dt = WSWmsHelper.LoadShipmentTransportOrders(transportOrderAidID, shipmentID); } else { if (from.Equals(FROM_PROD_PALLET)) { dt = WSWmsHelper.GetTransport(trId); } else { dt = WSWmsHelper.LoadTransportOrders(transportOrderAidID); } } foreach (DataRow row in dt.Rows) { if (from == FROM_PROD_PALLET) { if (row[FieldNames.transpStatus].ToString() == "PICKED" && row[FieldNames.LeNummer].ToString() == leNummer) { return(true); } } else { if (row[FieldNames.transpStatus].ToString() == "PICKED") { leNummer = row[FieldNames.LeNummer].ToString(); secondLeLayout.Visibility = ViewStates.Gone; return(true); } } } } catch (Exception e) { Utility.ShowErrorMessage(this, e.Message); } return(false); }