Example #1
0
        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);
        }
Example #2
0
 private bool GetDatatable()
 {
     try
     {
         if (shipmentID == 0)
         {
             dt = WSWmsHelper.LoadTransportOrders(transportAidID);
         }
         else
         {
             dt = WSWmsHelper.LoadShipmentTransportOrders(transportAidID, shipmentID);
         }
     }
     catch (Exception e)
     {
         Utility.ShowErrorMessage(this, e.Message + "Load orders exception: transpAidID = " + transportAidID);
         return(false);
     }
     return(true);
 }
Example #3
0
        private void SetNewOrder()
        {
            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);
                    }
                }
            }
            catch (Exception e)
            {
                Utility.ShowErrorMessage(this, e.Message);
                Log.Write(this, "Problem at SetNewOrder 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();
                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);

                btnBinEmpty.Visibility = BUTTON_INVISIBLE;
                btnBinFull.Visibility  = BUTTON_INVISIBLE;

                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);
            }
        }