本文整理汇总了C#中UrlString.GetUrl方法的典型用法代码示例。如果您正苦于以下问题:C# UrlString.GetUrl方法的具体用法?C# UrlString.GetUrl怎么用?C# UrlString.GetUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlString
的用法示例。
在下文中一共展示了UrlString.GetUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
protected virtual void Run(ClientPipelineArgs args)
{
string databaseName = args.Parameters["databasename"];
string id = args.Parameters["id"];
Database database = Factory.GetDatabase(databaseName);
Assert.IsNotNull(database, typeof (Database), "Database \"" + database + "\" not found.", new object[0]);
Item item = database.Items[id];
if (item != null)
{
if (item.Fields[FieldIDs.LayoutField] != null && item.Fields[FieldIDs.LayoutField].Value != string.Empty)
{
if (!args.IsPostBack)
{
UrlString url = new UrlString(UIUtil.GetUri("control:Calendar.ConfigureControls"));
url.Append("id", item.ID.ToString());
url.Append("db", item.Database.Name);
Windows.RunApplication("Calendar ConfigureControls", url.GetUrl());
}
}
else
{
Context.ClientPage.ClientResponse.Alert(ResourceManager.Localize("ITEM_HAS_NO_LAYOUT"));
}
}
else
{
SheerResponse.Alert("Item not found.", new string[0]);
}
}
示例2: PostStep
protected void PostStep(Item item)
{
Assert.ArgumentNotNull(item, "item");
if (callback != null)
{
callback(item.ID.ToString());
}
UrlString url = new UrlString();
url.Append("ro", item.ID.ToString());
url.Append("fo", item.ID.ToString());
url.Append("id", item.ID.ToString());
url.Append("la", item.Language.Name);
url.Append("vs", item.Version.Number.ToString());
Windows.RunApplication("Content editor", url.GetUrl());
}
示例3: PostStep
protected void PostStep(Item item)
{
Assert.ArgumentNotNull(item, "item");
if (item.TemplateID == CalendarIDs.ModuleSettingsTemplate)
{
tpModuleSettings.Value = item.ID.ToString();
OnChangeModuleSettings(this, null);
}
else
{
tpSettingsItem.Value = item.ID.ToString();
OnChangeSettingsItem(this, null);
}
Context.ClientPage.ClientResponse.Redraw();
UrlString url = new UrlString();
url.Append("ro", item.ID.ToString());
url.Append("fo", item.ID.ToString());
url.Append("id", item.ID.ToString());
url.Append("la", item.Language.Name);
url.Append("vs", item.Version.Number.ToString());
Windows.RunApplication("Content editor", url.GetUrl());
}