protected void ControlsToData()
{
if (lvList.Items.Count > 0)
{
if (_terminalBlocks == null)
_terminalBlocks = new TestEquipmentTerminalBlocks();
_terminalBlocks.TerminalBlock = new List<TestEquipmentTerminalBlocksTerminalBlock>();
foreach (ListViewItem lvi in lvList.Items)
{
var termBlock = (TestEquipmentTerminalBlocksTerminalBlock)lvi.Tag;
_terminalBlocks.TerminalBlock.Add(termBlock);
}
}
else
{
_terminalBlocks = null;
}
}