示例#1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (IsCorrectData())
            {
                using (LeaveApplicationBalance lb = new LeaveApplicationBalance())
                {
                    lb.Username      = _strUsername;
                    lb.LeaveTypeCode = _strLeaveTypeCode;
                    lb.Balance       = clsValidator.CheckFloat(txtBalance.Text);
                    lb.Entitlement   = clsValidator.CheckFloat(txtEntitlement.Text);
                    lb.Status        = (chkStatus.Checked ? "1" : "0");
                    lb.Update();

                    if (_FormCaller == FormCallers.EmployeeDetails)
                    {
                        _frmEmployeeDetails.LoadLeaveEntitlement();
                    }
                    else if (_FormCaller == FormCallers.LeaveEntitlementList)
                    {
                        _frmLeaveEntitlementList.BindLeaveBalanceList();
                    }

                    _frmMdiCaller.DSGZeroEL();
                    _frmMdiCaller.DSGZeroVL();
                    _frmMdiCaller.DSGZeroSL();

                    this.Close();
                }
            }
        }
示例#2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     using (clsLeaveSetting objFill = new clsLeaveSetting())
     {
         objFill.LeaveName = LeaveName;
         objFill.LeaveCode = cmbELwp.SelectedValue.ToString();
         objFill.Update();
         _frmCaller.LoadLeaveSetting();
     }
     _frmMdiCaller.DSGZeroEL();
     _frmMdiCaller.DSGZeroSL();
     _frmMdiCaller.DSGZeroVL();
     this.Close();
 }