/// <summary> /// Обновили подключения /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void fvSiteMap_DataBound(object sender, EventArgs e) { if (fvSiteMap.CurrentMode == FormViewMode.Insert) { } if (fvSiteMap.CurrentMode == FormViewMode.Edit) { SiteMapDetali smd = base.csitemap.GetSiteMapDetali((int)this.idsitemap); if (smd == null) { return; } DropDownList ddlParent = base.fmc.GetDropDownList(fvSiteMap, "ddlParent"); if (ddlParent != null) { if (smd.IDParent != null) { ddlParent.SelectedValue = smd.IDParent.ToString(); } else { ddlParent.SelectedIndex = 0; } SetParent(this.save_parentid); } //DropDownList ddlSection = GetDropDownList(fvSiteMap, "ddlSection"); //if (ddlSection != null) //{ // if (smd.IDSection != null) // { // ddlSection.SelectedValue = smd.IDSection.ToString(); // } // else // { // ddlSection.SelectedIndex = -1; // } //} } }
/// <summary> /// Привязка данных сайт /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlSite_DataBinding(object sender, EventArgs e) { if (fvSiteMap.CurrentMode == FormViewMode.Edit) { SiteMapDetali smd = base.csitemap.GetSiteMapDetali((int)this.idsitemap); if (smd == null) { return; } DropDownList ddlSite = base.fmc.GetDropDownList(fvSiteMap, "ddlSite"); if (ddlSite != null) { if (smd.IDSite != null) { ddlSite.SelectedValue = smd.IDSite.ToString(); } else { ddlSite.SelectedIndex = 0; } } } if (fvSiteMap.CurrentMode == FormViewMode.Insert) { DropDownList ddlSite = base.fmc.GetDropDownList(fvSiteMap, "ddlSite"); if (ddlSite != null) { if (this.save_idsite != null) { ddlSite.SelectedValue = this.save_idsite.ToString(); } else { ddlSite.SelectedIndex = 0; } } } SetSite(this.save_idsite); }