예제 #1
0
 /// <summary>
 /// 提交仓库信息
 /// </summary>
 /// <param name="entity"></param>
 public void SubmitForm(WarehouseEntity warehouseEntity, string keyValue)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         warehouseEntity.Modify(keyValue);
         repository.Update(warehouseEntity);
     }
     else
     {
         warehouseEntity.Create();
         repository.Insert(warehouseEntity);
     }
 }
예제 #2
0
        public async Task SaveForm(WarehouseEntity entity)
        {
            if (entity.Id.IsNullOrZero())
            {
                await entity.Create();

                await this.BaseRepository().Insert(entity);
            }
            else
            {
                await entity.Modify();

                await this.BaseRepository().Update(entity);
            }
        }