Пример #1
0
        /// <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)
                {
                    clientAtt.AddAttendanceDeductMasterAsync(entAttendanceDeductMaster);
                }
                else
                {
                    clientAtt.ModifyAttendanceDeductMasterAsync(entAttendanceDeductMaster);
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
            }

            return(flag);
        }