Пример #1
0
        public Sys_EvaConfigModel GetById(Guid id)
        {
            var model   = new Sys_EvaConfigModel();
            var service = new Sys_AttOvertimePermitConfigServices();
            var entity  = service.GetEvaConfig();

            if (entity != null)
            {
                model = entity.CopyData <Sys_EvaConfigModel>();
            }
            return(model);
        }
Пример #2
0
        public String Post([Bind] Sys_EvaConfigModel model)
        {
            string message = string.Empty;

            #region Validate
            var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Sys_EvaConfigModel>(model, "Sys_EvaConfig", ref message);
            if (!checkValidate)
            {
                // model.ActionStatus = message;
                return(message);
            }
            #endregion

            var service = new Sys_AttOvertimePermitConfigServices();
            var entity  = model.CopyData <Sys_EvaConfigEntity>();
            service.SaveEvaConfig(entity);
            return(message);
        }