Exemple #1
0
        //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

        private void DefineInitialValueForXpoComboBoxFamily()
        {
            FIN_ArticleFamily    xpoArticleFamily    = ((FIN_ArticleFamily)_xpoComboBoxFamily.Value);
            FIN_ArticleSubFamily xpoArticleSubFamily = ((FIN_Article)DataSourceRow).SubFamily;
            Guid currentOid = Guid.Empty;

            if (xpoArticleFamily != null)
            {
                currentOid = ((FIN_ArticleFamily)_xpoComboBoxFamily.Value).Oid;
            }

            CriteriaOperator criteria = CriteriaOperator.Parse(string.Format("Family = '{0}'", currentOid));

            _xpoComboBoxSubFamily.UpdateModel(criteria, xpoArticleSubFamily);
        }