Beispiel #1
0
        private void BindDaten()
        {
            model = controller.GetTouristUnit(id);
            var layoutdaten = controller.GetLayoutDaten(model);

            LayoutDaten.DataSource = layoutdaten;
            LayoutDaten.DataBind();
        }
Beispiel #2
0
        private void Bind()
        {
            lblSite.Text     = model.SiteName;
            lblUnit.Text     = model.UnitTitel;
            lblSiteCode.Text = sitecode;
            lblUnitCode.Text = unitcode;

            if (txtMaxBelegung.Text != null)
            {
                txtMaxBelegung.Text = model.MaxPersons.ToString();
            }
            if (txtErwachsene.Text != null)
            {
                txtErwachsene.Text = model.MaxAdults.ToString();
            }

            comboHaustier.DataSource = DataManager.GetPets();
            comboHaustier.DataBind();
            int index = controller.GetPet(model);

            comboHaustier.SelectedIndex = index;

            comboboxLanguage.DataSource = DataManager.GetLanguages();
            comboboxLanguage.DataBind();
            comboboxLanguage.SelectedIndex = 0;

            comboboxLanguageKurz.DataSource = DataManager.GetLanguages();
            comboboxLanguageKurz.DataBind();
            comboboxLanguageKurz.SelectedIndex = 0;

            HtmlEditorKurzBeschreibung.Html = model.ShortDescription;
            HtmlEditorPageBeschreibung.Html = model.Description;

            lblKurz.Text = GetText().Length.ToString();

            var layoutinfo = controller.GetLayoutInfo(model);

            LayoutObjektInfo.DataSource = layoutinfo;
            LayoutObjektInfo.DataBind();

            ASPxComboBox comboboxType = (ASPxComboBox)LayoutObjektInfo.FindNestedControlByFieldName("TerraceType");

            comboboxType.DataSource = DataManager.GetTerraceTypes();
            comboboxType.DataBind();
            index = controller.GetTerraceType(model);
            comboboxTerasseTyp.SelectedIndex = index;

            ASPxComboBox comboboxSea = (ASPxComboBox)LayoutObjektInfo.FindNestedControlByFieldName("LocationSea");

            comboboxSea.DataSource = DataManager.GetDistances();
            comboboxSea.DataBind();
            index = controller.GetSeaLocation(model);
            comboboxSea.SelectedIndex = index;

            ASPxComboBox comboboxSite = (ASPxComboBox)LayoutObjektInfo.FindNestedControlByFieldName("LocationSite");

            comboboxSite.DataSource = DataManager.GetPositions();
            comboboxSite.DataBind();
            index = controller.GetSiteLocation(model);
            comboboxSite.SelectedIndex = index;

            var layoutdaten = controller.GetLayoutDaten(model);

            LayoutDaten.DataSource = layoutdaten;
            LayoutDaten.DataBind();

            var offers = offercontroller.GetUnitOfferByCode(sitecode, unitcode);

            GridUnitOfferView.DataSource = offers;
            GridUnitOfferView.DataBind();
        }