frmPlusPickDescription.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace LYFZ.Software.MainBusiness.DoorCityProcess
  6. {
  7. public partial class frmPlusPickDescription: LYFZ.Software.UI.DoorCityProcess.frmPlusPickDescription
  8. {
  9. decimal mySumMoney = 0;
  10. public string PickInfo
  11. {
  12. get { return this.tx_PickupProduct.Text.Trim(); }
  13. }
  14. public decimal PickMoney
  15. {
  16. get { return this.nb_thisMoney.Value; }
  17. }
  18. public frmPlusPickDescription(decimal sumMoney)
  19. {
  20. this.mySumMoney = sumMoney;
  21. this.nb_totalMoney.Value = sumMoney;
  22. this.nb_thisMoney.ValueChanged += Nb_thisMoney_ValueChanged;
  23. this.btn_Cancel.Click += Btn_Cancel_Click;
  24. this.btn_save.Click += Btn_save_Click;
  25. }
  26. private void Btn_save_Click(object sender, EventArgs e)
  27. {
  28. if (this.tx_PickupProduct.Text.Length > 0)
  29. {
  30. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  31. }
  32. else
  33. {
  34. ExMessageBoxCustom.Show("当前加挑商品不能为空");
  35. }
  36. }
  37. private void Btn_Cancel_Click(object sender, EventArgs e)
  38. {
  39. this.Close();
  40. }
  41. private void Nb_thisMoney_ValueChanged(object sender, EventArgs e)
  42. {
  43. this.nb_totalMoney.Value = this.mySumMoney + this.nb_thisMoney.Value;
  44. }
  45. }
  46. }