ReasonForUseN.cs 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. using System;
  2. using System.Windows.Forms;
  3. namespace CLIP.eForm.Consent.UI
  4. {
  5. /// <summary>
  6. /// 동의서목록 > 동의서 삭제 사유등록 팝업창 클래스
  7. /// </summary>
  8. /// <remarks>
  9. /// <p>[설계자]</p>
  10. /// <p> 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)</p>
  11. /// <p>[원본 작성자]</p>
  12. /// <p> 클립소프트 기술부 이창훈 (chlee@clipsoft.co.kr)</p>
  13. /// <p>[수정 작성자]</p>
  14. /// <p> 클립소프트 기술부 이인희</p>
  15. /// <p>----------------------------------------------------------------------------------------</p>
  16. /// <p>[HISTORY]</p>
  17. /// <p> 2016-07-11 : 최초작성</p>
  18. /// <p>----------------------------------------------------------------------------------------</p>
  19. /// </remarks>
  20. public partial class ReasonForUseN : Form
  21. {
  22. public ReasonForUseN(bool bDel)
  23. {
  24. InitializeComponent();
  25. // 삭제 종류에 따라 동의서 기록 삭제에 대한 메시지, 동의서 출력물 삭제에 대한 메시지를 보여준다
  26. if (bDel)
  27. {
  28. this.labelReasonForUseN.Text = string.Format(Properties.Resources.msg_show_consent_record_deleted);
  29. }
  30. else
  31. {
  32. this.labelReasonForUseN.Text = string.Format(Properties.Resources.msg_show_paper_out_consent_record_deleted);
  33. }
  34. }
  35. private void btnOK_Click(object sender, EventArgs e)
  36. {
  37. //if (!string.IsNullOrEmpty(this.textBoxReasonForUseN.Text))
  38. //{
  39. // this.DialogResult = System.Windows.Forms.DialogResult.OK;
  40. //}
  41. }
  42. /// <summary>
  43. /// 사용자가 선택 혹은 입력한 삭제사유를 반환한다
  44. /// </summary>
  45. /// <returns></returns>
  46. public string GetReasonForUseN()
  47. {
  48. if (this.comboReason.SelectedItem.ToString() == "(직접입력)")
  49. return this.textBoxReasonForUseN.Text.ToString();
  50. else
  51. return this.comboReason.SelectedItem.ToString();
  52. }
  53. /// <summary>
  54. /// ReasonForUseN 폼 로딩 이벤트
  55. /// comboReason 의 선택된 인덱스를 0 으로 초기화 하여 준다
  56. /// </summary>
  57. /// <param name="sender">The source of the event.</param>
  58. /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  59. private void ReasonForUseN_Load(object sender, EventArgs e)
  60. {
  61. this.comboReason.SelectedIndex = 0;
  62. }
  63. /// <summary>
  64. /// comboReason 콤보 컨트롤 아이템 변경 이벤트
  65. /// 사용자가 직접입력을 선택 한 경우 textBoxReasonForUseN 컨트롤을 활성화 아닐경우 비활성화 하여 준다
  66. /// </summary>
  67. /// <param name="sender">The source of the event.</param>
  68. /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  69. private void comboReason_SelectedIndexChanged(object sender, EventArgs e)
  70. {
  71. if (this.comboReason.SelectedItem.ToString() == "(직접입력)")
  72. {
  73. this.textBoxReasonForUseN.Enabled = true;
  74. this.textBoxReasonForUseN.TabIndex = 0;
  75. }
  76. else
  77. {
  78. this.textBoxReasonForUseN.Text = "";
  79. this.textBoxReasonForUseN.Enabled = false;
  80. }
  81. }
  82. }
  83. }