/// <summary> /// 保存 /// </summary> private bool Save() { bool flag = false; try { List <SMT.SaaS.FrameworkUI.Validator.ValidatorBase> validators = Group1.ValidateAll(); if (validators.Count > 0) { return(false); } CheckSubmitForm(out flag); if (!flag) { return(false); } if (FormType == FormTypes.New) { if (aanudLeaveDays.Value > 0) { if (entFreeLeaveDaySet.LEAVEDAYS == 0) { entFreeLeaveDaySet.LEAVEDAYS = decimal.Round((decimal)aanudLeaveDays.Value, 2); } else { entFreeLeaveDaySet.LEAVEDAYS = decimal.Round((decimal)entFreeLeaveDaySet.LEAVEDAYS, 2); } } clientAtt.AddFreeLeaveDaySetAsync(entFreeLeaveDaySet); } else { entFreeLeaveDaySet.LEAVEDAYS = decimal.Round((decimal)aanudLeaveDays.Value, 2); clientAtt.ModifyFreeLeaveDaySetAsync(entFreeLeaveDaySet); } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message)); } return(flag); }