Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        moduleId = QueryHelper.GetInteger("moduleId", 0);

        if (moduleId > 0)
        {
            var module = ResourceInfoProvider.GetResourceInfo(moduleId);
            if ((module != null) && (module.ResourceName.EqualsCSafe("cms", true)))
            {
                ShowInformation(GetString("resource.cmsmoduleassignedtoallsites"));
                headTitle.Visible = false;
                usSites.Visible   = false;
                return;
            }

            // Get the active sites
            DataSet ds = ResourceSiteInfoProvider.GetResourceSites().WhereEquals("ResourceID", moduleId).Column("SiteID");
            if (!DataHelper.DataSourceIsEmpty(ds))
            {
                currentValues = TextHelper.Join(";", DataHelper.GetStringValues(ds.Tables[0], "SiteID"));
            }

            if (!RequestHelper.IsPostBack())
            {
                usSites.Value = currentValues;
            }
        }

        usSites.OnSelectionChanged += usSites_OnSelectionChanged;
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        lblAvialable.Text = GetString("Administration-Module_Edit_Sites.SiteTitle");

        moduleId = QueryHelper.GetInteger("moduleId", 0);

        if (moduleId > 0)
        {
            // Get the active sites
            DataSet ds = ResourceSiteInfoProvider.GetResourceSites("ResourceID = " + moduleId, null, 0, "SiteID");
            if (!DataHelper.DataSourceIsEmpty(ds))
            {
                currentValues = TextHelper.Join(";", SqlHelperClass.GetStringValues(ds.Tables[0], "SiteID"));
            }

            if (!RequestHelper.IsPostBack())
            {
                usSites.Value = currentValues;
            }
        }

        usSites.OnSelectionChanged += usSites_OnSelectionChanged;
    }