/// <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; }
/// <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; }
public CheckoutWindow(RoomModel model, bool IsRechecked = false) { RoomId = model.RoomId; RoomSession = model.OrderSession; if (null != model.PayOrder.tb_orderdetail) { details = model.PayOrder.tb_orderdetail.ToList(); } else { details = new List <OrderDetail>(); } if (null != model.PayOrder.tb_orderpay) { payList = model.PayOrder.tb_orderpay.ToList(); } else { payList = new List <OrderPay>(); } this.tempPayList = payList.ToList(); order = model.PayOrder.FastCopy(); this.IsRechecked = IsRechecked; order.tb_member = model.PayOrder.tb_member; InitializeComponent(); this.Text = Resources.GetRes().GetString("CheckoutOrder"); krplTotalTime.Text = Resources.GetRes().GetString("TotalTime"); krplRemainingTime.Text = Resources.GetRes().GetString("RemainingTime"); krplTotalPrice.Text = Resources.GetRes().GetString("TotalPrice"); krplPaidPrice.Text = Resources.GetRes().GetString("PaidPrice"); krpbCheckout.Text = Resources.GetRes().GetString("CheckoutOrder"); krplBorrowPrice.Text = Resources.GetRes().GetString("OwedPrice"); krplKeepPrice.Text = Resources.GetRes().GetString("KeepPrice"); krplMemberPaidPrice.Text = Resources.GetRes().GetString("MemberPaidPrice"); krplTotalPaidPrice.Text = Resources.GetRes().GetString("TotalPaidPrice"); Assembly asm = Assembly.LoadFrom(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Res.dll")); this.Icon = new Icon(asm.GetManifestResourceStream(@"Oybab.Res.Resources.Images.PC.CheckoutOrder.ico")); krplRoomNo.Text = Resources.GetRes().GetString("RoomNo"); krplRoomPriceValue.Text = string.Format("({1}{0})", order.RoomPrice, Resources.GetRes().PrintInfo.PriceSymbol); krplRoomNoValue.Text = Resources.GetRes().Rooms.Where(x => x.RoomId == RoomId).Select(x => x.RoomNo).FirstOrDefault(); Calc(); payWindow = new PriceCommonChangeWindow("+", order.TotalPrice, tempPayList.Select(x => new CommonPayModel(x)).ToList(), true, true, Recalc); payWindow.StartLoad += (x, y) => { this.StartLoad(x, y); }; payWindow.StopLoad += (x, y) => { this.StopLoad(x, y); }; payWindow.TopLevel = false; pnPrice.Controls.Add(payWindow); payWindow.Show(); // 刷卡 Notification.Instance.NotificationCardReader += Instance_NotificationCardReader; }
public TakeoutCheckoutWindow(Takeout model, bool IsRechecked = false) { if (null != model.tb_takeoutdetail) { details = model.tb_takeoutdetail.ToList(); } else { details = new List <TakeoutDetail>(); } if (null != model.tb_takeoutpay) { payList = model.tb_takeoutpay.ToList(); } else { payList = new List <TakeoutPay>(); } this.tempPayList = payList.ToList(); takeout = model.FastCopy(); this.IsRechecked = IsRechecked; takeout.tb_member = model.tb_member; InitializeComponent(); this.Text = Resources.GetRes().GetString("CheckoutOrder"); krplTotalPrice.Text = Resources.GetRes().GetString("TotalPrice"); krplPaidPrice.Text = Resources.GetRes().GetString("PaidPrice"); krpbCheckout.Text = Resources.GetRes().GetString("CheckoutOrder"); krplBorrowPrice.Text = Resources.GetRes().GetString("OwedPrice"); krplKeepPrice.Text = Resources.GetRes().GetString("KeepPrice"); krplMemberPaidPrice.Text = Resources.GetRes().GetString("MemberPaidPrice"); krplTotalPaidPrice.Text = Resources.GetRes().GetString("TotalPaidPrice"); Assembly asm = Assembly.LoadFrom(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Res.dll")); this.Icon = new Icon(asm.GetManifestResourceStream(@"Oybab.Res.Resources.Images.PC.CheckoutOrder.ico")); payWindow = new PriceCommonChangeWindow("+", takeout.TotalPrice, tempPayList.Select(x => new CommonPayModel(x)).ToList(), true, true, Recalc); payWindow.StartLoad += (x, y) => { this.StartLoad(x, y); }; payWindow.StopLoad += (x, y) => { this.StopLoad(x, y); }; payWindow.TopLevel = false; pnPrice.Controls.Add(payWindow); payWindow.Show(); Calc(); // 刷卡 Notification.Instance.NotificationCardReader += Instance_NotificationCardReader; }
public ImportCheckoutWindow(Import model, bool IsRechecked = false) { if (this.IsRechecked) { this.import.tb_importdetail = null; this.import.tb_importpay = null; } if (null != model.tb_importpay) { payList = model.tb_importpay.ToList(); } else { payList = new List <ImportPay>(); } this.tempPayList = payList.ToList(); this.import = model; this.IsRechecked = IsRechecked; InitializeComponent(); this.Text = Resources.GetRes().GetString("CheckoutImport"); krplTotalPrice.Text = Resources.GetRes().GetString("TotalPrice"); krplPaidPrice.Text = Resources.GetRes().GetString("PaidPrice"); krpbCheckout.Text = Resources.GetRes().GetString("CheckoutImport"); krplBorrowPrice.Text = Resources.GetRes().GetString("BorrowPrice"); krplKeepPrice.Text = Resources.GetRes().GetString("KeepPrice"); krplSupplierPaidPrice.Text = Resources.GetRes().GetString("SupplierPaidPrice"); krplTotalPaidPrice.Text = Resources.GetRes().GetString("TotalPaidPrice"); Assembly asm = Assembly.LoadFrom(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Res.dll")); this.Icon = new Icon(asm.GetManifestResourceStream(@"Oybab.Res.Resources.Images.PC.ExpendCheckout.ico")); payWindow = new PriceCommonChangeWindow("+", import.TotalPrice, tempPayList.Select(x => new CommonPayModel(x)).ToList(), false, true, Recalc); payWindow.StartLoad += (x, y) => { this.StartLoad(x, y); }; payWindow.StopLoad += (x, y) => { this.StopLoad(x, y); }; payWindow.TopLevel = false; pnPrice.Controls.Add(payWindow); payWindow.Show(); Calc(); // 刷卡 Notification.Instance.NotificationCardReader += Instance_NotificationCardReader; }