public Task <int> SubmitForm <TDto>(PunctureEntity entity, TDto dto) where TDto : class { var userId = _usersService.GetCurrentUserId(); if (!string.IsNullOrEmpty(entity.F_Id)) { entity.Modify(entity.F_Id); entity.F_LastModifyUserId = userId; return(_service.UpdateAsync(entity, dto)); } else { entity.Create(); if (entity.F_EnabledMark == null) { entity.F_EnabledMark = true; } entity.F_CreatorUserId = userId; entity.F_Nurse = userId; return(_service.InsertAsync(entity)); } }
public Task <int> InsertForm(PunctureEntity entity) { entity.Create(); entity.F_CreatorUserId = _usersService.GetCurrentUserId(); return(_service.InsertAsync(entity)); }