protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PageUnitControl.ActiveTabIndex = 0; Uri u = HttpContext.Current.Request.Url; id = HttpUtility.ParseQueryString(u.Query).Get("id"); sitecode = HttpUtility.ParseQueryString(u.Query).Get("sc"); unitcode = HttpUtility.ParseQueryString(u.Query).Get("uc"); ViewState["id"] = id; ViewState["sitecode"] = sitecode; ViewState["unitcode"] = unitcode; model = controller.GetTouristUnit(id); firstload = true; Bind(); folder = CreateFolder(sitecode, unitcode); ViewState["folder"] = folder; } else { id = (string)ViewState["id"]; sitecode = (string)ViewState["sitecode"]; unitcode = (string)ViewState["unitcode"]; folder = (string)ViewState["folder"]; model = controller.GetTouristUnit(id); var offers = offercontroller.GetUnitOfferByCode(sitecode, unitcode); GridUnitOfferView.DataSource = offers; GridUnitOfferView.DataBind(); } }
private void Bind() { GridUnitOfferView.DataSource = controller.Init(); GridUnitOfferView.DataBind(); }
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(); }
private void BindDataOffer() { GridUnitOfferView.DataSource = offercontroller.GetUnitOfferByCode(sitecode, unitcode); GridUnitOfferView.DataBind(); }