Ejemplo n.º 1
0
        /// <summary>
        /// 直接输入缺少的金额
        /// </summary>
        public void FinishPaidPrice()
        {
            IsLoading = true;

            Task.Run(async() =>
            {
                await ExtX.WaitForLoading();
                Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
                {
                    oldList = tempPayList.Select(x => new CommonPayModel(x)).ToList();
                    ChangePaidPrice.InitialView(this.import.TotalPrice, oldList, false, true, 3);

                    double lessPrice = Math.Round(import.TotalPrice - import.TotalPaidPrice, 2);

                    if (lessPrice != 0)
                    {
                        if (lessPrice > 0)
                        {
                            ChangePaidPrice.SetChangePrice(lessPrice, "+");
                        }
                        else if (lessPrice < 0)
                        {
                            ChangePaidPrice.SetChangePrice(Math.Abs(lessPrice), "-");
                        }
                    }


                    IsLoading = false;
                });
            });
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 刷卡
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="value"></param>
 /// <param name="args"></param>
 private void Instance_NotificationCardReader(object sender, string value, object args)
 {
     if (ChangePaidPrice.IsShow)
     {
         ChangePaidPrice.OpenMemberByScanner(value);
         return;
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 直接输入缺少的金额
        /// </summary>
        public void FinishPaidPrice()
        {
            double lessPrice = Math.Round(order.TotalPrice - order.TotalPaidPrice, 2);

            if (lessPrice != 0)
            {
                if (lessPrice > 0)
                {
                    ChangePaidPrice.SetChangePrice(lessPrice, "+");
                }
                else if (lessPrice < 0)
                {
                    ChangePaidPrice.SetChangePrice(Math.Abs(lessPrice), "-");
                }
            }
        }