PhotographerPaymentSuperSmallForm.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace LYFZ.Software.MainBusiness.MembershipManage.SuperSmallForm
  10. {
  11. public partial class PhotographerPaymentSuperSmallForm : LYFZ.Software.UI.MembershipManage.SuperSmallForm.PhotographerPaymentSuperSmallForm
  12. {
  13. public PhotographerPaymentSuperSmallForm()
  14. {
  15. }
  16. ///// <summary>
  17. ///// 是否保存
  18. ///// </summary>
  19. //bool IsSaveed = false;
  20. /// <summary>
  21. /// 收款金额
  22. /// </summary>
  23. public string StrPaymentAoumnt = "";
  24. /// <summary>
  25. /// 确定后数据
  26. /// </summary>
  27. LYFZ.Software.MainBusiness.MembershipManage.SuperSmallForm.PhotographerPaymentModel model = null;
  28. /// <summary>
  29. /// 窗体加载事件
  30. /// </summary>
  31. /// <param name="sender"></param>
  32. /// <param name="e"></param>
  33. protected override void PhotographerPaymentSuperSmallForm_Load(object sender, EventArgs e)
  34. {
  35. this.txtPaymentItem.Text = "新摄会办理收款";
  36. this.txtPaymentAoumnt.Text = this.StrPaymentAoumnt;
  37. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_PaymentMethod(this.cmbPaymentMethod, false);
  38. if (!LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.OrdersReceivablesCompetence, LYFZ.CustomAttributes.OperatingAuthority.OrderPaymentMethodSet))
  39. { this.btnSet.Enabled = false; }
  40. }
  41. /// <summary>
  42. /// 设置
  43. /// </summary>
  44. /// <param name="sender"></param>
  45. /// <param name="e"></param>
  46. protected override void btnSet_Click(object sender, EventArgs e)
  47. {
  48. LYFZ.Software.MainBusiness.InitialSet.FrmSystemSet frm = new InitialSet.FrmSystemSet();
  49. frm.TypeName = "BEBACCAFCCEAGAIHH";
  50. frm.Version = "Version";
  51. if (frm.ShowDialog() == DialogResult.OK)
  52. { LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_PaymentMethod(this.cmbPaymentMethod); }
  53. }
  54. /// <summary>
  55. /// 收款并打印单据
  56. /// </summary>
  57. /// <param name="sender"></param>
  58. /// <param name="e"></param>
  59. protected override void btnPaymentPrintSingle_Click(object sender, EventArgs e)
  60. {
  61. if (MessageBoxCustom.Show("您确定要收款吗?", "温馨提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
  62. { return; }
  63. if (this.cmbPaymentMethod.Text.Trim() == "")
  64. { MessageBoxCustom.Show("请选择支付方式"); return; }
  65. model = new PhotographerPaymentModel();
  66. model.PaymentItem = this.txtPaymentItem.Text.Trim();
  67. model.PaymentAoumnt = this.txtPaymentAoumnt.Text.Trim();
  68. model.PaymentMethod = this.cmbPaymentMethod.Tag.ToString().Trim();
  69. model.IsPrintSingle = true;
  70. //IsSaveed = true;
  71. this.Close();
  72. }
  73. /// <summary>
  74. /// 只收款
  75. /// </summary>
  76. /// <param name="sender"></param>
  77. /// <param name="e"></param>
  78. protected override void btnPaymentOnly_Click(object sender, EventArgs e)
  79. {
  80. if (MessageBoxCustom.Show("您确定要收款吗?", "温馨提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
  81. { return; }
  82. if (this.cmbPaymentMethod.Text.Trim() == "")
  83. { MessageBoxCustom.Show("请选择支付方式"); return; }
  84. model = new PhotographerPaymentModel();
  85. model.PaymentItem = this.txtPaymentItem.Text.Trim();
  86. model.PaymentAoumnt = this.txtPaymentAoumnt.Text.Trim();
  87. model.PaymentMethod = this.cmbPaymentMethod.Tag.ToString().Trim();
  88. model.IsPrintSingle = false;
  89. //IsSaveed = true;
  90. this.Close();
  91. }
  92. /// <summary>
  93. /// 取消
  94. /// </summary>
  95. /// <param name="sender"></param>
  96. /// <param name="e"></param>
  97. protected override void btnCancel_Click(object sender, EventArgs e)
  98. {
  99. this.Close();
  100. }
  101. }
  102. public class PhotographerPaymentModel
  103. {
  104. private string _paymentItem;
  105. private string _paymentAoumnt;
  106. private string _paymentMethod;
  107. private bool _isPrintSingle;
  108. /// <summary>
  109. /// 收款项目
  110. /// </summary>
  111. public string PaymentItem
  112. {
  113. get { return _paymentItem; }
  114. set { _paymentItem = value; }
  115. }
  116. /// <summary>
  117. /// 收款金额
  118. /// </summary>
  119. public string PaymentAoumnt
  120. {
  121. get { return _paymentAoumnt; }
  122. set { _paymentAoumnt = value; }
  123. }
  124. /// <summary>
  125. /// 收款方式
  126. /// </summary>
  127. public string PaymentMethod
  128. {
  129. get { return _paymentMethod; }
  130. set { _paymentMethod = value; }
  131. }
  132. /// <summary>
  133. /// 是否打印单据
  134. /// </summary>
  135. public bool IsPrintSingle
  136. {
  137. get { return _isPrintSingle; }
  138. set { _isPrintSingle = value; }
  139. }
  140. }
  141. }