switch (common.tableId) { case tableNum(PurchTable): // таблица закупок break; case tableNum(PurchLine): // строки закупок break; default: break; }