Beispiel #1
0
        protected void cmdUpdate_Click(object sender, EventArgs e)
        {
            lngFeatureLists.UpdateLangs();
            switch (EditState)
            {
            case "new":
                FeatureListInfo flNew = new FeatureListInfo();
                flNew.FeatureListId = FeatureListId;
                flNew.PortalID      = PortalId;
                int featureListId = Controller.NewFeatureList(flNew);
                foreach (FeatureListLangInfo featureListLang in lngFeatureLists.Langs)
                {
                    featureListLang.FeatureListId = featureListId;
                    Controller.NewFeatureListLang(featureListLang);
                }
                FeatureListId = featureListId;
                EditState     = "update";
                break;

            case "update":
                Controller.DeleteFeatureListLangs(FeatureListId);
                foreach (FeatureListLangInfo featureListLang in lngFeatureLists.Langs)
                {
                    featureListLang.FeatureListId = FeatureListId;
                    Controller.NewFeatureListLang(featureListLang);
                }
                break;

            default:
                break;
            }
            if (Request.QueryString["adminmode"] != null)
            {
                Response.Redirect(Globals.NavigateURL(TabId, "", "adminmode=featurelist"), true);
            }
            else
            {
                Response.Redirect(EditUrl(), true);
            }
        }