本文整理汇总了C#中Domain.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Domain.Update方法的具体用法?C# Domain.Update怎么用?C# Domain.Update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain.Update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterDomain
protected void RegisterDomain(object o, EventArgs e)
{
Domain d = new Domain();
d.DomainName = DomainName;
if (!d.IsAvailable)
{
ErrorMessage = d.DomainName + " already exists!";
return;
}
d.PromoterK = PromoterK;
if (uiOptionsList.SelectedPanelID == uiBrandDiv.ClientID)
{
d.RedirectApp = BrandRedirectApp;
d.RedirectObjectK = BrandK;
d.RedirectObjectType = Model.Entities.ObjectType.Brand;
}
else if (uiOptionsList.SelectedPanelID == uiVenueDiv.ClientID)
{
d.RedirectApp = VenueRedirectApp;
d.RedirectObjectK = VenueK;
d.RedirectObjectType = Model.Entities.ObjectType.Venue;
}
else if (uiOptionsList.SelectedPanelID == uiEventDiv.ClientID)
{
Event ev = new Event(EventK);
if (!ev.IsPromoter(PromoterK))
throw new Exception("This event isn't in this promoter account!");
d.RedirectObjectK = EventK;
d.RedirectObjectType = Model.Entities.ObjectType.Event;
}
else if (uiOptionsList.SelectedPanelID == uiGroupDiv.ClientID)
{
Group gr = new Group(GroupK);
d.RedirectObjectK = GroupK;
d.RedirectObjectType = Model.Entities.ObjectType.Group;
}
else
{
d.RedirectUrl = CustomUrl;
}
d.Update();
d.Register();
AddedDomain = d;
SetStage(Stage.TestRedirect);
}