public TimeSheetWorkShiftTemplateModel() { // init object _timeSheetWorkShift = new hr_TimeSheetWorkShiftTemplate(); // set props Init(_timeSheetWorkShift); // get relation data _timeSheetSymbol = new hr_TimeSheetSymbol(); }
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(); }
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(); }
public TimeSheetRuleWrongTimeModel() { // init entity _timeSheet = new hr_TimeSheetRuleWrongTime(); // set props Init(_timeSheet); // init relation _symbol = new hr_TimeSheetSymbol(); }
/// <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))); }
/// <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))); }