示例#1
0
        private void btnAddViewToFavorites_Click(object sender, EventArgs e)
        {
            SPView view = (SPView)cboViews.SelectedItem;

            FavoriteView fv = new FavoriteView(view.Url, view.ParentList.ParentWeb.ServerRelativeUrl);

            ActionCopyViewUtil.FavoriteViews.Add(fv);
            ActionCopyViewUtil.SaveFavoriteViews();
            ActionCopyView.DefInstance.PopulateFavoriteViews();
            ActionCopyView.DefInstance.cboFavoriteViews.SelectedIndex = ActionCopyView.DefInstance.cboFavoriteViews.FindStringExact(fv.ToString());
            this.Close();
        }
示例#2
0
        private void lnkRemove_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (cboFavoriteViews.SelectedItem == null)
            {
                return;
            }
            FavoriteView fv = (FavoriteView)cboFavoriteViews.SelectedItem;

            ActionCopyViewUtil.FavoriteViews.Remove(fv);
            ActionCopyViewUtil.SaveFavoriteViews();

            ActionCopyView.DefInstance.PopulateFavoriteViews();
        }
示例#3
0
        private void ActionBulkSiteCreation_Load(object sender, EventArgs e)
        {
            this.HelpKey = "Copy View";
            if (this.DisableIfSharePointNotInstalledLocally())
            {
                return;
            }

            txtTargetSite.Text = GlobalVars.SETTINGS.createViews_siteUrl;

            //--
            ActionCopyViewUtil.LoadFavoriteViews();
            PopulateFavoriteViews();
            foreach (FavoriteView fv in cboFavoriteViews.Items)
            {
                if (GlobalVars.SETTINGS.createViews_defaultFavoriteView == fv.ToString())
                {
                    cboFavoriteViews.SelectedItem = fv;
                }
            }

            showhelp();
        }