Ejemplo n.º 1
0
        private void CreateField(string tableName, PropertyInfo property)
        {
            var field   = (UserFieldsMD)company.GetBusinessObject(BoObjectTypes.oUserFields);
            var adapter = new PropertyUserFieldAdapter(tableName, property, field);

            adapter.Execute();

            var addUserField = new AddUserField(company, field);

            addUserField.OnError += OnAddUserFieldError;
            addUserField.Execute();
        }
Ejemplo n.º 2
0
        private void CreateFieldsFromXDocument(XDocument xml)
        {
            var userFields = xml.Descendants(@"UserField");

            foreach (var userField in userFields)
            {
                var field   = (UserFieldsMD)company.GetBusinessObject(BoObjectTypes.oUserFields);
                var adapter = new UserFieldAdapter(field, userField);
                adapter.Execute();

                var addUserField = new AddUserField(company, field);
                addUserField.OnError += OnAddUserFieldError;
                addUserField.Execute();
            }
        }