Beispiel #1
0
        private void UnpackBundle(Bundle bundle)
        {
            try
            {
                manualInputConf = WSWmsHelper.LoadConfiguration(TRANSPORT, MANUAL_LEVEL_INPUT).Equals("1");
                if (bundle == null)
                {
                    bundle = Intent.GetBundleExtra("b");
                }

                from      = bundle.GetString("from");
                trId      = bundle.GetInt("trid");
                leId      = bundle.GetInt("leid");
                leNummer  = bundle.GetString("lenum");
                leTyp     = bundle.GetString("letyp");
                sourceBin = bundle.GetString("sourceBin");
                targetBin = bundle.GetString("targetBin");
                if (from == FROM_TRANSPORT && manualInputConf)
                {
                    digitsToCutFromTargetBin = bundle.GetInt("digitsToCutFromTargetBin");
                    shortenedTargetBin       = bundle.GetString("targetBin").Substring(0, bundle.GetString("targetBin").Length - digitsToCutFromTargetBin);
                }
                priority            = bundle.GetInt("priority");
                transportOrderAidID = bundle.GetInt("transportAidId");

                if (from == CONST_SHIPMENT)
                {
                    shipmentID = bundle.GetInt("shipmentId");
                    places     = bundle.GetInt("places");

                    fotoButton.Enabled   = false;
                    wiegenButton.Enabled = false;

                    if (int.Parse(WSWmsHelper.LoadConfiguration(TRANSPORT, SCALES_INTERFACE_ACTIVE)) != 0)
                    {
                        wiegenButton.Visibility         = ViewStates.Visible;
                        gewichtLabelTextView.Visibility = ViewStates.Visible;
                        gewichtTextView.Visibility      = ViewStates.Visible;
                    }
                    if (int.Parse(WSWmsHelper.LoadConfiguration(TRANSPORT, PHOTOGATE_ACTIVE)) != 0)
                    {
                        fotoButton.Visibility = ViewStates.Visible;
                    }
                }
                if (from == FROM_PROD_PALLET)
                {
                    leNummer2 = bundle.GetString("lenum2");
                    thisLayout.SetBackgroundColor(Color.ParseColor("#00FFFF"));
                }
            }
            catch
            {
                Utility.ShowErrorMessage(this, GetString(Resource.String.msgTitleError));
            }
        }
Beispiel #2
0
 private void AssignValues(int index)
 {
     if (dt.Rows.Count > 0)
     {
         DataRow dr = dt.Rows[index];
         trId      = int.Parse(dr[FieldNames.TrId].ToString());
         leId      = int.Parse(dr[FieldNames.LeId].ToString());
         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());
         if (from == "Transport" && int.Parse(WSWmsHelper.LoadConfiguration(TRANSPORT, MANUAL_LEVEL_INPUT)) != 0)
         {
             digitsToCutFromTargetBin = int.Parse(dr[FieldNames.LevelDigits].ToString());
         }
     }
 }