ATMLCommonLibrary.controls.specification.SpecificationsControl.ControlsToData C# (CSharp) Method

ControlsToData() private method

private ControlsToData ( ) : void
return void
        private void ControlsToData()
        {
            if (specificationListControl.Items.Count == 0)
            {
                _specifications = null;
            }
            else
            {
                if( _specifications == null )
                    _specifications = new Specifications();
                _specifications.Items = new List<object>();
                foreach (ListViewItem lvi in specificationListControl.Items )
                {
                    _specifications.Items.Add(lvi.Tag);
                }

                if (conditionListControl.RowCount == 0 )
                    _specifications.Conditions = null;
                else
                {
                    _specifications.Conditions = conditionListControl.GetColumnValues( 0 ).Cast<string>().ToList();
                }

                if (certificationListControl.RowCount == 0)
                {
                    _specifications.Certifications = null;
                }
                else
                {
                    _specifications.Certifications = certificationListControl.GetColumnValues(0).Cast<string>().ToList();
                }
            }
        }