F_PC_0106.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_PC_0106.cs
  5. * 2.功能描述:操作时间及备注录入
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 庄天威 2014/10/18 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.PCModule
  15. {
  16. /// <summary>
  17. /// 操作时间及备注录入
  18. /// </summary>
  19. public partial class F_PC_0106 : FormBase
  20. {
  21. #region 成员变量
  22. // 窗体标题
  23. private string _titleStr = "";
  24. // 实例窗体
  25. private F_PC_0101 _fpc0101;
  26. #endregion
  27. #region 构造函数
  28. public F_PC_0106(F_PC_0101 fpc0101, string titleStr)
  29. {
  30. InitializeComponent();
  31. this._titleStr = titleStr;
  32. this._fpc0101 = fpc0101;
  33. this._fpc0101.SetTimeOrRemarks(null, "");
  34. this.Text = _titleStr;
  35. this.btnSave.Text = ButtonText.BTN_SAVE;
  36. }
  37. #endregion
  38. #region 事件
  39. /// <summary>
  40. /// 保存按钮事件
  41. /// </summary>
  42. /// <param name="sender"></param>
  43. /// <param name="e"></param>
  44. private void btnSave_Click(object sender, EventArgs e)
  45. {
  46. if (Convert.ToDateTime(this.txtDateStart.Text) > DateTime.Now)
  47. {
  48. MessageBox.Show("不可设置今天以后的时间!", this.Text,
  49. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  50. return;
  51. }
  52. if (string.IsNullOrEmpty(this.txtRemarks.Text))
  53. {
  54. MessageBox.Show("说明/备注必须填写", this.Text,
  55. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  56. return;
  57. }
  58. this._fpc0101.SetTimeOrRemarks(Convert.ToDateTime(this.txtDateStart.Text), this.txtRemarks.Text);
  59. this.DialogResult = DialogResult.OK;
  60. }
  61. #endregion
  62. }
  63. }