Exemplo n.º 1
0
        public MaterialRDEControl(User user)
        {
            InitializeComponent();
            this.User = user;

            txtIdentification.BindUser(user, LookupType.Taxon);
            txtClassifiedBy.BindUser(User, "tblMaterial", "vchrIDBy");

            txtAccessionNo.BindUser(User, "MaterialAccessionNo", "tblMaterial", "vchrAccessionNo");
            txtRegistrationNo.BindUser(User, "MaterialRegNo", "tblMaterial", "vchrRegNo");
            txtCollectorNo.BindUser(User, "MaterialCollectorNo", "tblMaterial", "vchrCollectorNo");

            txtSource.BindUser(user, PickListType.Phrase, "Material Source", TraitCategoryType.Material);
            txtInstitution.BindUser(user, PickListType.Phrase, "Institution", TraitCategoryType.Material);
            txtCollectionMethod.BindUser(user, PickListType.Phrase, "Collection Method", TraitCategoryType.Material);
            txtMacroHabitat.BindUser(user, PickListType.Phrase, "Macro Habitat", TraitCategoryType.Material);
            txtMicroHabitat.BindUser(user, PickListType.Phrase, "Micro Habitat", TraitCategoryType.Material);

            txtTrap.BindUser(User, LookupType.Trap);

            _traits = new TraitControl(user, TraitCategoryType.Material, null, true);
            tabTraits.Content = _traits;

            _subpartsFull = new MaterialPartsControl(user, null, true);
            tabSubparts.Content = _subpartsFull;

            _associates = new OneToManyControl(new AssociatesOneToManyController(user, TraitCategoryType.Material, null), true);
            tabAssociates.Content = _associates;

            _multimedia = new MultimediaControl(User, TraitCategoryType.Material, null);
            tabMultimedia.Content = _multimedia;

            this.IsEnabled = false;
            this.DataContextChanged += new DependencyPropertyChangedEventHandler(MaterialRDEControl_DataContextChanged);
        }
Exemplo n.º 2
0
        public SiteRDEControl(User user)
        {
            InitializeComponent();
            this.User = user;
            txtPolitical.BindUser(user, LookupType.Region);
            txtSource.BindUser(user, PickListType.Phrase, "Source", TraitCategoryType.Material);
            txtElevSource.BindUser(user, PickListType.Phrase, "Source", TraitCategoryType.Material);
            txtUnits.BindUser(user, PickListType.Phrase, "Units", TraitCategoryType.Material);
            _traits = new TraitControl(user, TraitCategoryType.Site, null, true);
            tabTraits.Content = _traits;

            this.DataContextChanged += new DependencyPropertyChangedEventHandler(SiteRDEControl_DataContextChanged);

            ctlPosition.LocationChanged += new LocationSelectedEvent(ctlPosition_LocationChanged);
            ctlPosition.BeforeLocationSelection += new BeforeNamedPlaceSelectionEvent(ctlPosition_BeforeLocationSelection);
        }