Beispiel #1
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static TimeSheetRuleWrongTimeModel Create(TimeSheetRuleWrongTimeModel model)
        {
            var entity = new hr_TimeSheetRuleWrongTime();

            //fill
            model.FillEntity(ref entity);

            //create
            return(new TimeSheetRuleWrongTimeModel(hr_TimeSheetRuleWrongTimeServices.Create(entity)));
        }
Beispiel #2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="model"></param>
        public static TimeSheetRuleWrongTimeModel Update(TimeSheetRuleWrongTimeModel model)
        {
            var existedEntity = GetById(model.Id);

            if (existedEntity != null)
            {
                var entity = new hr_TimeSheetRuleWrongTime();
                model.FillEntity(ref entity);
                return(new TimeSheetRuleWrongTimeModel(hr_TimeSheetRuleWrongTimeServices.Update(entity)));
            }
            return(null);
        }