Beispiel #1
0
        public TimeSheetWorkShiftTemplateModel()
        {
            // init object
            _timeSheetWorkShift = new hr_TimeSheetWorkShiftTemplate();

            // set props
            Init(_timeSheetWorkShift);

            // get relation data
            _timeSheetSymbol = new hr_TimeSheetSymbol();
        }
Beispiel #2
0
        public TimeSheetRuleWrongTimeModel(hr_TimeSheetRuleWrongTime timeSheet)
        {
            // init entity
            _timeSheet = timeSheet ?? new hr_TimeSheetRuleWrongTime();

            // set props
            Init(_timeSheet);

            // init relation
            _symbol = hr_TimeSheetSymbolServices.GetById(_timeSheet.SymbolId) ?? new hr_TimeSheetSymbol();
        }
Beispiel #3
0
        public TimeSheetWorkShiftTemplateModel(hr_TimeSheetWorkShiftTemplate timeSheetWorkShift)
        {
            // init object
            _timeSheetWorkShift = timeSheetWorkShift ?? new hr_TimeSheetWorkShiftTemplate();

            // set props
            Init(_timeSheetWorkShift);

            // get relation data
            _timeSheetSymbol = hr_TimeSheetSymbolServices.GetById(_timeSheetWorkShift.SymbolId);
            _timeSheetSymbol = _timeSheetSymbol ?? new hr_TimeSheetSymbol();
        }
Beispiel #4
0
        public TimeSheetRuleWrongTimeModel()
        {
            // init entity
            _timeSheet = new hr_TimeSheetRuleWrongTime();


            // set props
            Init(_timeSheet);

            // init relation
            _symbol = new hr_TimeSheetSymbol();
        }
Beispiel #5
0
        /// <summary>
        /// Tạo mới
        /// </summary>
        /// <param name="model"></param>
        public static TimeSheetSymbolModel Create(TimeSheetSymbolModel model)
        {
            var existsEntity = GetByCondition(model.Code, null);

            if (existsEntity != null)
            {
                return(null);
            }
            var entity = new hr_TimeSheetSymbol();

            model.FillEntity(ref entity);
            return(new TimeSheetSymbolModel(hr_TimeSheetSymbolServices.Create(entity)));
        }
Beispiel #6
0
        /// <summary>
        /// Cập nhật
        /// </summary>
        /// <param name="model"></param>
        public static TimeSheetSymbolModel Update(TimeSheetSymbolModel model)
        {
            var existsEntity = GetByCondition(model.Code, null);

            if (existsEntity != null && existsEntity.Id != model.Id)
            {
                return(null);
            }
            var entity = new hr_TimeSheetSymbol();

            model.FillEntity(ref entity);
            entity.EditedDate = DateTime.Now;
            return(new TimeSheetSymbolModel(hr_TimeSheetSymbolServices.Update(entity)));
        }