Пример #1
0
        private void OnProductDescriptionBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
        {
            _currentProductDescription = uxProductDescriptionBindingSource.Current as Entities.ProductDescription;

            if (_currentProductDescription != null)
            {
                _currentProductDescription.Validate();
            }
            //_ProductDescription.Validate();
            OnCurrentEntityChanged();
        }
Пример #2
0
 internal Content(Entities entities, BatchMaterialXml[] xml, xml.erp.BatchStatus batchStatus, ProgressChangedEventHandler progressChanged)
     : base(GetBatchStatus(batchStatus))
 {
     foreach (BatchMaterialXml item in xml)
     {
         Entities.ProductDescription _product = entities.GetProductType(item.Material, item.Stor__Loc, item.IsFinishedGood);
         Material _newMaterial = new Material(entities, _product, item.Batch, item.Material, item.Stor__Loc, item.Material_description, item.Unit, item.Quantity, item.Quantity_calculated, item.material_group);
         _newMaterial.GetListOfIPRAccounts(entities);
         progressChanged(this, new ProgressChangedEventArgs(1, String.Format("SKU={0}", _newMaterial.SKU)));
         Add(_newMaterial);
     }
     if (Product == null)
     {
         throw new InputDataValidationException("Unrecognized finished good", "Product", "Wrong Batch XML message", true);
     }
 }
		private void OnProductDescriptionBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentProductDescription = uxProductDescriptionBindingSource.Current as Entities.ProductDescription;
			
			if (_currentProductDescription != null)
			{
				_currentProductDescription.Validate();
			}
			//_ProductDescription.Validate();
			OnCurrentEntityChanged();
		}