Example #1
0
        /// <summary>
        /// insert machine time sheet by model
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static TimeSheetMachineModel Create(TimeSheetMachineModel model)
        {
            // init
            var entity = new hr_TimeSheetMachine();

            // fill
            model.FillEntity(ref entity);
            // create entity
            return(new TimeSheetMachineModel(hr_TimeSheetMachineService.Create(entity)));
        }
Example #2
0
        /// <summary>
        /// update timesheet machine by model
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static TimeSheetMachineModel Update(TimeSheetMachineModel model)
        {
            // init
            var entity = hr_TimeSheetMachineService.GetById(model.Id);

            // fill
            model.FillEntity(ref entity);

            // update entity
            return(new TimeSheetMachineModel(hr_TimeSheetMachineService.Update(entity)));
        }