CEL_Payroll/Payroll.UI/Payroll.UI/Bonus/fBonusSLength.cs
2025-08-06 14:31:52 +06:00

73 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Payroll.BO;
using Ease.CoreV35.Model;
namespace Payroll.UI
{
public partial class fBonusSLength : BaseFormTest
{
Payroll.BO.BonusParameter.BonusServiceLength _BonusSLength = null;
bool _bCanceled = true;
public fBonusSLength()
{
InitializeComponent();
}
public bool ShowDlg(Payroll.BO.BonusParameter.BonusServiceLength oBonusSLength)
{
_BonusSLength = oBonusSLength;
RefreshValue();
this.ShowDialog();
return !_bCanceled;
}
private void RefreshValue()
{
numMonth.Value = _BonusSLength.LengthOfService;
numPerEntitle.Value = _BonusSLength.EntitlePercent;
}
private void RefreshObject()
{
_bCanceled = false;
_BonusSLength.LengthOfService =Convert.ToInt32(numMonth.Value);
_BonusSLength.EntitlePercent =Convert.ToInt32(numPerEntitle.Value);
}
private void RefreshControl()
{
numMonth.Value = 0;
numPerEntitle.Value =0;
}
private void btnOK_Click(object sender, EventArgs e)
{
RefreshObject();
RefreshControl();
this.Close();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void fBonusSLength_Load(object sender, EventArgs e)
{
}
private void groupBox2_Enter(object sender, EventArgs e)
{
}
}
}