private List <IntershopWebService.MiscCharge> ExtractMiscCharges(Axapta ax, string itemId, string custAccount, double salesPrice, int qty, string inventSizeId, string unit)
        {
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            IEnumerator enumerator1 = ((AxaptaContainer)ax.CallStaticClassMethod("BTX_ISHItemDescriptionProxy", "GetMiscCharges", new object[6]
            {
                (object)custAccount,
                (object)itemId,
                (object)salesPrice,
                (object)qty,
                (object)inventSizeId,
                (object)unit
            })).GetEnumerator();
            List <IntershopWebService.MiscCharge> miscChargeList = new List <IntershopWebService.MiscCharge>();

            if (enumerator1.MoveNext())
            {
                double current = (double)enumerator1.Current;
            }
            if (enumerator1.MoveNext())
            {
                IEnumerator enumerator2 = ((AxaptaContainer)enumerator1.Current).GetEnumerator();
                IntershopWebService.MiscCharge miscCharge = new IntershopWebService.MiscCharge();
                while (enumerator2.MoveNext())
                {
                    IEnumerator enumerator3 = ((AxaptaContainer)enumerator2.Current).GetEnumerator();
                    int         num         = 0;
                    while (enumerator3.MoveNext())
                    {
                        switch (num++)
                        {
                        case 0:
                            miscCharge.code = (string)enumerator3.Current;
                            break;

                        case 1:
                            miscCharge.description = (string)enumerator3.Current;
                            break;

                        case 2:
                            miscCharge.value = Math.Round(Convert.ToDouble(enumerator3.Current), 2);
                            break;

                        case 3:
                            miscCharge.currency = (string)enumerator3.Current;
                            break;
                        }
                    }
                    miscChargeList.Add(miscCharge);
                }
            }
            stopwatch.Stop();
            MessageLogger.info(string.Format("ExtractMiscCharges({0}, {1}, {2}, {3}, {4}, {5}) -> {6} ms", (object)itemId, (object)custAccount, (object)salesPrice, (object)qty, (object)inventSizeId, (object)unit, (object)stopwatch.ElapsedMilliseconds));
            return(miscChargeList);
        }
        private List <IntershopWebService.MiscCharge> ExtractMiscChargesTotal(Axapta ax, AxaptaContainer miscChargeCont)
        {
            List <IntershopWebService.MiscCharge> miscChargeList = new List <IntershopWebService.MiscCharge>();
            IEnumerator enumerator1 = miscChargeCont.GetEnumerator();

            while (enumerator1.MoveNext())
            {
                IntershopWebService.MiscCharge miscCharge = new IntershopWebService.MiscCharge();
                IEnumerator enumerator2 = ((AxaptaContainer)enumerator1.Current).GetEnumerator();
                int         num         = 0;
                while (enumerator2.MoveNext())
                {
                    switch (num++)
                    {
                    case 0:
                        miscCharge.code = Convert.ToString(enumerator2.Current);
                        break;

                    case 1:
                        miscCharge.description = Convert.ToString(enumerator2.Current);
                        break;

                    case 2:
                        miscCharge.value = Math.Round(Convert.ToDouble(enumerator2.Current), 2);
                        break;

                    case 3:
                        miscCharge.currency = Convert.ToString(enumerator2.Current);
                        break;
                    }
                }
                if (num > 0)
                {
                    miscChargeList.Add(miscCharge);
                }
            }
            return(miscChargeList);
        }