Exemplo n.º 1
0
        /// <summary>
        /// 修改付款价格
        /// </summary>
        /// <param name="mark"></param>
        private void ChangePaidPrice(string mark, double price = 0)
        {
            double totalPrice = double.Parse(krplTotalPriceValue.Text);

            List <CommonPayModel> oldList = tempPayList.Select(x => new CommonPayModel(x)).ToList();

            PriceCommonChangeWindow window = new PriceCommonChangeWindow(mark, totalPrice, oldList.ToList());

            payWindow         = window;
            window.StartLoad += (x, y) =>
            {
                this.StartLoad(x, y);
            };
            window.StopLoad += (x, y) =>
            {
                this.StopLoad(x, y);
            };



            if (window.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                Recalc();
            }

            payWindow = null;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 修改付款价格
        /// </summary>
        /// <param name="mark"></param>
        private void ChangePaidPrice(string mark, double price = 0)
        {
            double totalPrice = double.Parse(krplTotalPriceValue.Text);

            List <CommonPayModel> oldList = tempPayList.Select(x => new CommonPayModel(x)).ToList();

            PriceCommonChangeWindow window = new PriceCommonChangeWindow(mark, totalPrice, oldList.ToList());

            payWindow         = window;
            window.StartLoad += (x, y) =>
            {
                this.StartLoad(x, y);
            };
            window.StopLoad += (x, y) =>
            {
                this.StopLoad(x, y);
            };

            if (window.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                // 如果跟订单上次保存的不一样,就提示未保存提示
                if (oldList.All(window.PayModel.Contains) && oldList.Count == window.PayModel.Count)
                {
                }
                else
                {
                    tempPayList = window.PayModel.Select(x => x.GetTakeoutPay()).ToList();
                    Calc();
                }
            }

            payWindow = null;
        }