/// <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))); }
/// <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))); }