当前位置: 首页>>代码示例>>C#>>正文


C# ClientPipelineArgs.WaitForPostBack方法代码示例

本文整理汇总了C#中ClientPipelineArgs.WaitForPostBack方法的典型用法代码示例。如果您正苦于以下问题:C# ClientPipelineArgs.WaitForPostBack方法的具体用法?C# ClientPipelineArgs.WaitForPostBack怎么用?C# ClientPipelineArgs.WaitForPostBack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ClientPipelineArgs的用法示例。


在下文中一共展示了ClientPipelineArgs.WaitForPostBack方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

 protected void Run(ClientPipelineArgs args)
 {
     if (!args.IsPostBack)
     {
         SheerResponse.CheckModified(true);
         args.WaitForPostBack();
     }
     else if (args.Result != "cancel")
     {
         if (args.HasResult && (args.Result != "cancel"))
         {
             if ((args.Result == "yes") || (args.Result == "no"))
             {
                 if (args.Result == "yes")
                 {
                     this.SaveChanges();
                 }
                 SheerResponse.Input(EcmTexts.Localize("Enter the name of the new Recipient List:", new object[0]), "New Recipient List", Settings.ItemNameValidation, EcmTexts.Localize("'{0}' is not a valid name.", new object[] { "$Input" }), 100);
                 args.WaitForPostBack();
             }
             else
             {
                 if (CreateList(args.Result))
                 {
                     NotificationManager.Instance.Notify("RefreshRecipientLists", new EventArgs());
                 }
                 else
                 {
                     SheerResponse.Alert(EcmTexts.Localize("The '{0}' list already exists, please choose another name.", new object[] { args.Result }), new string[0]);
                 }
             }
         }
     }
 }
开发者ID:katebutenko,项目名称:RecipientListManagement,代码行数:34,代码来源:CreateEmptyListCommand.cs

示例2: Run

 protected void Run(ClientPipelineArgs args)
 {
     if (!args.IsPostBack)
         {
             SheerResponse.CheckModified(true);
             args.WaitForPostBack();
         }
         else if ((args.Result != "cancel") && (args.HasResult && (args.Result != "cancel")))
         {
             if ((args.Result == "yes") || (args.Result == "no"))
             {
                 if (args.Result == "yes")
                 {
                     this.SaveChanges();
                 }
                 SheerResponse.Input("Enter the number of latest emails to export: ", "50", "^[1-9][0-9]", String.Format("'{0}' is not a valid number.", new object[] { "$Input" }), 100);
                 args.WaitForPostBack();
             }
             else if (this.CreateList(args.Result))
             {
                 //SheerResponse.Alert("Finished", new string[0]);
                 //NotificationManager.Instance.Notify("RefreshRecipientLists", new EventArgs());
             }
             else
             {
                 //SheerResponse.Alert(EcmTexts.Localize("The '{0}' list already exists, please choose another name.", new object[] { args.Result }), new string[0]);
             }
         }
 }
开发者ID:katebutenko,项目名称:ECMReports,代码行数:29,代码来源:SummaryReportCSVExportCommand.cs

示例3: Run

        protected void Run(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string dbName = args.Parameters["databasename"];
            string id = args.Parameters["id"];
            string lang = args.Parameters["language"];
            string ver = args.Parameters["version"];
            Database database = Factory.GetDatabase(dbName);

            Assert.IsNotNull(database, dbName);

            Item obj = database.Items[id, Language.Parse(lang), Version.Parse(ver)];
            if (obj == null)
            {
                SheerResponse.Alert("Item not found.");
            }
            else
            {
                if (!SheerResponse.CheckModified())
                    return;
                if (args.IsPostBack)
                {
                    return;
                }

                UrlString urlString = new UrlString(UIUtil.GetUri("control:SchedulePublish"));
                urlString.Append("id", obj.ID.ToString());
                urlString.Append("unpublish", args.Parameters["unpublish"]);
                SheerResponse.ShowModalDialog(urlString.ToString(), "600", "600", string.Empty, true);
                args.WaitForPostBack();
            }
        }
开发者ID:maxslabyak,项目名称:SCScheduledPublishing,代码行数:33,代码来源:OpenScheduledPublishDialog.cs

示例4: Run

        public void Run(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string controlId = args.Parameters["controlid"];

            if (args.IsPostBack)
            {
                if (!args.HasResult) return;

                SheerResponse.SetAttribute("scHtmlValue", "value", YouTubeVideoField.FormatValueForPageEditorDisplay(args.Result));
                SheerResponse.SetAttribute("scPlainValue", "value", args.Result);

                SheerResponse.Eval("scSetHtmlValue('" + controlId + "', false, true)");
            }
            else
            {
                var urlString = new UrlString(UIUtil.GetUri(DialogUrl));
                urlString["val"] = args.Parameters.Get("fieldValue");

                Context.ClientPage.ClientResponse.ShowModalDialog(urlString.ToString(), "650px", "700px", string.Empty, true);

                args.WaitForPostBack();
            }
        }
开发者ID:jammykam,项目名称:BrainJocks.YouTubeVideoField,代码行数:25,代码来源:EditYouTubeVideoField.cs

示例5: Run

        public void Run(ClientPipelineArgs args)
        {
            string fieldValue = args.Parameters["fieldValue"];

            if (!args.IsPostBack)
            {
                var url = UIUtil.GetUri("control:ProductBrowser", "product=" + fieldValue);
                SheerResponse.ShowModalDialog(url,true);
                args.WaitForPostBack();
            }
            else
            {
                if (args.HasResult)
                {
                    var result = args.Result;
                    SheerResponse.SetAttribute("scHtmlValue", "value", result);
                    SheerResponse.SetAttribute("scPlainValue", "value", result);
                    var builder = new ScriptInvokationBuilder("scSetHtmlValue");
                    builder.AddString(args.Parameters["controlid"], new object[0]);
                    if (string.IsNullOrEmpty(result))
                    {
                        builder.Add("true");
                    }
                    SheerResponse.Eval(builder.ToString());
                }
            }
        }
开发者ID:rauljmz,项目名称:FieldCommandExample,代码行数:27,代码来源:Open.cs

示例6: Process

 protected void Process(ClientPipelineArgs args)
 {
     Assert.ArgumentNotNull(args, "args");
       if (args.IsPostBack) return;
       SheerResponse.ShowModalDialog(new UrlString(UIUtil.GetUri("control:ConfigurationWizard")).ToString(), true);
       args.WaitForPostBack();
 }
开发者ID:sitecore-myu,项目名称:Sitecore-Feedback-Module,代码行数:7,代码来源:ConfigurationCommand.cs

示例7: Upload

 public static void Upload(ClientPipelineArgs args, Edit fileEdit)
 {
     try
     {
         CheckPackageFolder();
         if (!args.IsPostBack)
         {
             UploadPackageForm.Show(ApplicationContext.PackagePath, true);
             args.WaitForPostBack();
         }
         else
         {
             if (args.Result.StartsWith("ok:", StringComparison.InvariantCulture))
             {
                 string[] strArray = args.Result.Substring("ok:".Length).Split('|');
                 if (strArray.Length >= 1 && fileEdit != null)
                 {
                     fileEdit.Value = strArray[0];
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message, typeof(DialogUtils));
         SheerResponse.Alert(ex.Message);
     }
 }
开发者ID:alan-null,项目名称:AntidotePackage,代码行数:28,代码来源:Dialogs.cs

示例8: Execute

        public new void Execute(ClientPipelineArgs args)
        {
            var item = Context.ContentDatabase.GetItem(args.Parameters[1]);
            if (item.IsNotNull())
            {
                Error.AssertItem(item, "item");
                if (!args.IsPostBack)
                {
                    if (item.IsABucket())
                    {
                        new ClientResponse().Confirm("You are about to delete an item which is an item bucket with lots of hidden items below it. Are you sure you want to do this?");
                        args.WaitForPostBack();
                    }
                }
                else
                {
                    if (args.Result != "yes")
                    {
                        args.AbortPipeline();
                        args.Result = string.Empty;
                        args.IsPostBack = false;
                        return;
                    }

                    Event.RaiseEvent("item:bucketing:deleting", args, this);
                }
            }
        }
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:28,代码来源:ItemDeleted.cs

示例9: Run

        protected static void Run(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            if (SheerResponse.CheckModified())
            {
                if (args.IsPostBack)
                {
                    SheerResponse.Eval("window.top.location.href=window.top.location.href");
                    var itemId = ParseForAttribute(args.Result, "id");
                    Item item = Sitecore.Context.ContentDatabase.GetItem(itemId);
                    if (item.IsNotNull())
                    {
                        var url =
                            new UrlString("http://" + HttpContext.Current.Request.Url.Host +
                                          LinkManager.GetItemUrl(item).Replace("/sitecore/shell", ""));
                        WebEditCommand.Reload(url);
                    }

                }
                else
                {
                    SheerResponse.ShowModalDialog(
                        new UrlString("/sitecore/shell/Applications/Dialogs/Bucket%20link.aspx?").ToString(), "1000", "700", "", true);
                    args.WaitForPostBack();
                }
            }
        }
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:27,代码来源:Search.cs

示例10: Run

        /// <summary>
        /// If postback: sets profile key to supplied value
        /// Otherwise: prompt user for new value
        /// </summary>
        /// <param name="args">The args.</param>
        protected void Run(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.Parameters["profilename"], "profilename");
            Assert.ArgumentNotNull(args.Parameters["profilekey"], "profilekey");

            if (args.IsPostBack)
            {
                if (args.HasResult)
                {
                    int profileKeyValue;
                    if(int.TryParse(args.Result,out profileKeyValue))
                    {
                        PersonaHelper personaHelper = PersonaHelper.GetHelper();
                        personaHelper.UpdateProfileKey(args.Parameters["profilename"], args.Parameters["profilekey"], profileKeyValue);
                        SheerResponse.Redraw();
                    }
                }
            }
            else
            {
                Context.ClientPage.ClientResponse.Input("Please enter new profile key value.", "0");
                args.WaitForPostBack();
            }
        }
开发者ID:adoprog,项目名称:Sitecore-Persona-Switcher,代码行数:30,代码来源:EditProfileKey.cs

示例11: Run

 protected virtual void Run(ClientPipelineArgs args)
 {
     //if (Sitecore.Context.IsAdministrator || allowNonAdminDownload())
     //{
     //    string tempPath = GetFilePath();
     //    SheerResponse.Download(tempPath);
     //}
     //else
     //{
         if (!args.IsPostBack)
         {
             string email = Sitecore.Context.User.Profile.Email;
             SheerResponse.Input("Enter your email address", email);
             args.WaitForPostBack();
         }
         else
         {
             if (args.HasResult)
             {
                 System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
                 message.To.Add(args.Result);
                 string tempPath = GetFilePath();
                 message.Attachments.Add(new System.Net.Mail.Attachment(tempPath));
                 message.Subject = string.Format("ASR Report ({0})", Current.Context.ReportItem.Name);
                 message.From = new System.Net.Mail.MailAddress(Current.Context.Settings.EmailFrom);
                 message.Body = "Attached is your report sent at " + DateTime.Now.ToString("dd/MM/yyyy HH:mm");
                 Sitecore.MainUtil.SendMail(message);
             }
         }
     //}
 }
开发者ID:svn2github,项目名称:AdvancedSystemReporter,代码行数:31,代码来源:ExportBaseCommand.cs

示例12: Run

        protected void Run(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            if (args.IsPostBack)
            {
                if (args.Result == "yes")
                {
                    var str = new ListString(args.Parameters["item"]);
                    foreach (string str2 in str)
                    {
                        Directory.Delete(str2, true);
                    }

                    SheerResponse.SetLocation(string.Empty);
                }
            }
            else
            {
                var str3 = new ListString(args.Parameters["item"]);
                if (str3.Count == 1)
                {
                    SheerResponse.Confirm(Translate.Text("Are you sure you want to permanently delete \"{0}\"?", new object[] { str3 }));
                }
                else
                {
                    SheerResponse.Confirm(Translate.Text("Are you sure you want to permanently delete these {0} items?", new object[] { str3.Count }));
                }

                args.WaitForPostBack();
            }
        }
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:31,代码来源:RollbackDelete.cs

示例13: SelectFields

 public void SelectFields(ClientPipelineArgs args)
 {
     Assert.ArgumentNotNull(args, "args");
     if (!args.IsPostBack)
     {
         UrlString urlString = new UrlString(UIUtil.GetUri("control:TreeListExEditor"));
         UrlHandle urlHandle = new UrlHandle();
         urlHandle["title"] = PullUpFieldsSettings.SelectFieldsDialogTitle;
         urlHandle["text"] = PullUpFieldsSettings.SelectFieldsDialogText;
         urlHandle["source"] = GetSelectFieldsDialogSource(args);
         urlHandle.Add(urlString);
         SheerResponse.ShowModalDialog
         (
             urlString.ToString(), 
             PullUpFieldsSettings.SelectFieldsDialogWidth, 
             PullUpFieldsSettings.SelectFieldsDialogHeight, 
             string.Empty, 
             true
         );
         args.WaitForPostBack();
     }
     else if (args.HasResult)
     {
         args.Parameters["fieldIds"] = args.Result;
         args.IsPostBack = false;
     }
     else
     {
         CancelOperation(args);
     }
 }
开发者ID:scjunkie,项目名称:Sitecore.PullUpFields,代码行数:31,代码来源:PullUpFieldsIntoBaseTemplate.cs

示例14: Run

        protected void Run(ClientPipelineArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
             Item item = DeserializeItems(args.Parameters["items"])[0];

             if (args.IsPostBack)
             {
            if (args.HasResult)
            {
               string datePath = Utilities.NormalizeDate(DateTime.Now);
               Item eventItem = Utilities.CreateDatePath(item, datePath);

               if (eventItem != null)
               {
                  eventItem = eventItem.Add(args.Result, new TemplateID(CalendarIDs.EventTemplate));
               }
            }
             }
             else
             {
            string text = "Enter the name of the new item:";
            string defaultValue = "New Event";

            Context.ClientPage.ClientResponse.Input(text, defaultValue, Settings.ItemNameValidation, "'$Input' is not a valid name.", 100);
            args.WaitForPostBack();
             }
        }
开发者ID:Refactored,项目名称:SitecoreCalendarModule,代码行数:27,代码来源:CreateEventPath.cs

示例15: Run

        protected void Run(ClientPipelineArgs args)
        {
            string str = args.Parameters["id"];
            string name = args.Parameters["language"];
            string str3 = args.Parameters["version"];
            var version = Sitecore.Data.Version.Parse(str3);

            Item item = Context.ContentDatabase.GetItem(str, Sitecore.Globalization.Language.Parse(name), version);
            Error.AssertItemFound(item);

            if (!SheerResponse.CheckModified()) return;

            if (!args.IsPostBack)
            {
                string forItemPageURL = Sitecore.Configuration.Settings.GetSetting("SCBasics.AuditTrail.ForItemPageURL");

                if (!string.IsNullOrWhiteSpace(forItemPageURL))
                {
                    Sitecore.Text.UrlString url = new Sitecore.Text.UrlString(
                        forItemPageURL);
                    url.Append("id", HttpUtility.UrlEncode(args.Parameters["id"]));
                    url.Append("la", HttpUtility.UrlEncode(args.Parameters["language"]));
                    url.Append("ve", HttpUtility.UrlEncode(args.Parameters["version"]));

                    Sitecore.Context.ClientPage.ClientResponse.ShowModalDialog(url.ToString(),
                        "990px", "570px",
                        "ForItemPageURL", true);
                    args.WaitForPostBack();
                }
                else
                {
                    SheerResponse.Alert("SCBasics.AuditTrail.ForItemPageURL is empty. Please verify your configurations", true);
                }
            }
        }
开发者ID:shunterer,项目名称:Sitecore-Audit-Trail,代码行数:35,代码来源:SCAuditTrailForItemCommand.cs


注:本文中的ClientPipelineArgs.WaitForPostBack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。