S_CMN_011.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:S_CMN_011.cs
  5. * 2.功能描述:审批页面
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 张国印 2014/09/15 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Windows.Forms;
  12. using Dongke.IBOSS.PRD.Basics.BaseControls;
  13. using Dongke.IBOSS.PRD.Basics.BaseResources;
  14. namespace Dongke.IBOSS.PRD.Client.Controls
  15. {
  16. /// <summary>
  17. /// 审批页面
  18. /// </summary>
  19. public partial class S_CMN_011 : FormBase
  20. {
  21. #region 成员变量
  22. //审批状态 True 通过 False 不通过
  23. private bool _hrApprovalState;
  24. //审批意见
  25. private string _approvalMemo;
  26. #endregion
  27. #region 构造函数
  28. /// <summary>
  29. /// 构造函数
  30. /// </summary>
  31. public S_CMN_011()
  32. {
  33. InitializeComponent();
  34. this.Text = FormTitles.S_CMN_011;
  35. this.btnPass.Text = ButtonText.BTN_PASS;
  36. this.btnNotPass.Text = ButtonText.BTN_NOTPASS;
  37. this.btnClose.Text = ButtonText.BTN_CLOSE;
  38. }
  39. #endregion
  40. #region 属性
  41. /// <summary>
  42. /// 审批状态 True 通过 False 不通过
  43. /// </summary>
  44. public bool HRApprovalState
  45. {
  46. get { return _hrApprovalState; }
  47. }
  48. /// <summary>
  49. /// 审批意见
  50. /// </summary>
  51. public string ApprovalMemo
  52. {
  53. get { return _approvalMemo; }
  54. }
  55. #endregion
  56. #region 事件
  57. /// <summary>
  58. /// 审批通过
  59. /// </summary>
  60. /// <param name="sender"></param>
  61. /// <param name="e"></param>
  62. private void btnPass_Click(object sender, EventArgs e)
  63. {
  64. if (string.IsNullOrEmpty(this.txtRecordDate.Text))
  65. {
  66. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "审批意见"),
  67. this.Text,MessageBoxButtons.OK,MessageBoxIcon.Warning,MessageBoxDefaultButton.Button1);
  68. return;
  69. }
  70. this._hrApprovalState = true;
  71. this._approvalMemo = this.txtRecordDate.Text;
  72. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  73. }
  74. /// <summary>
  75. /// 审批不通过
  76. /// </summary>
  77. /// <param name="sender"></param>
  78. /// <param name="e"></param>
  79. private void btnNotPass_Click(object sender, EventArgs e)
  80. {
  81. if (string.IsNullOrEmpty(this.txtRecordDate.Text))
  82. {
  83. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "审批意见"),
  84. this.Text,MessageBoxButtons.OK,MessageBoxIcon.Warning,MessageBoxDefaultButton.Button1);
  85. return;
  86. }
  87. this._hrApprovalState = false;
  88. this._approvalMemo = this.txtRecordDate.Text;
  89. this.DialogResult = System.Windows.Forms.DialogResult.OK;
  90. }
  91. /// <summary>
  92. /// 关闭按钮
  93. /// </summary>
  94. /// <param name="sender"></param>
  95. /// <param name="e"></param>
  96. private void btnClose_Click(object sender, EventArgs e)
  97. {
  98. this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  99. }
  100. #endregion
  101. }
  102. }