Exemplo n.º 1
0
 public Task <int> SubmitForm <TDto>(LabItemEntity entity, TDto dto) where TDto : class
 {
     if (!string.IsNullOrEmpty(entity.F_Id))
     {
         entity.Modify(entity.F_Id);
         entity.F_LastModifyUserId = _usersService.GetCurrentUserId();
         return(_service.UpdateAsync(entity, dto));
     }
     else
     {
         entity.Create();
         if (!entity.F_EnabledMark.HasValue)
         {
             entity.F_EnabledMark = true;
         }
         entity.F_CreatorUserId = _usersService.GetCurrentUserId();
         return(_service.InsertAsync(entity));
     }
 }
Exemplo n.º 2
0
 public Task <int> UpdateForm(LabItemEntity entity)
 {
     return(_service.UpdatePartialAsync(entity));
 }