/*******************************************************************************
* Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
* 类的信息:
* 1.程序名称:S_CMN_011.cs
* 2.功能描述:审批页面
* 编辑履历:
* 作者 日期 版本 修改内容
* 张国印 2014/09/15 1.00 新建
*******************************************************************************/
using System;
using System.Windows.Forms;
using Dongke.IBOSS.PRD.Basics.BaseControls;
using Dongke.IBOSS.PRD.Basics.BaseResources;
namespace Dongke.IBOSS.PRD.Client.Controls
{
///
/// 审批页面
///
public partial class S_CMN_011 : FormBase
{
#region 成员变量
//审批状态 True 通过 False 不通过
private bool _hrApprovalState;
//审批意见
private string _approvalMemo;
#endregion
#region 构造函数
///
/// 构造函数
///
public S_CMN_011()
{
InitializeComponent();
this.Text = FormTitles.S_CMN_011;
this.btnPass.Text = ButtonText.BTN_PASS;
this.btnNotPass.Text = ButtonText.BTN_NOTPASS;
this.btnClose.Text = ButtonText.BTN_CLOSE;
}
#endregion
#region 属性
///
/// 审批状态 True 通过 False 不通过
///
public bool HRApprovalState
{
get { return _hrApprovalState; }
}
///
/// 审批意见
///
public string ApprovalMemo
{
get { return _approvalMemo; }
}
#endregion
#region 事件
///
/// 审批通过
///
///
///
private void btnPass_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtRecordDate.Text))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "审批意见"),
this.Text,MessageBoxButtons.OK,MessageBoxIcon.Warning,MessageBoxDefaultButton.Button1);
return;
}
this._hrApprovalState = true;
this._approvalMemo = this.txtRecordDate.Text;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
///
/// 审批不通过
///
///
///
private void btnNotPass_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtRecordDate.Text))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "审批意见"),
this.Text,MessageBoxButtons.OK,MessageBoxIcon.Warning,MessageBoxDefaultButton.Button1);
return;
}
this._hrApprovalState = false;
this._approvalMemo = this.txtRecordDate.Text;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
///
/// 关闭按钮
///
///
///
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
}
#endregion
}
}