/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public static TimeSheetCodeModel Create(TimeSheetCodeModel model) { var entity = new hr_TimeSheetCode(); model.FillEntity(ref entity); return(new TimeSheetCodeModel(hr_TimeSheetCodeServices.Create(entity))); }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public static void Update(TimeSheetCodeModel model) { var record = hr_TimeSheetCodeServices.GetById(model.Id); if (record == null) { return; } model.FillEntity(ref record); record.EditedDate = DateTime.Now; hr_TimeSheetCodeServices.Update(record); }