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


C# UserGroup.CreateAndFlush方法代码示例

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


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

示例1: LoadBaseData

        public static void LoadBaseData()
        {
            UserGroup group = new UserGroup
                              {
                              	Name = "Aggieland .NET User's Group",
                              	ShortName = "AggielandDNUG",
                              	LogoUrl = "../../Content/images/aggielanddnug2.png",
                              	WelcomeMessage =
                              		"<p>Welcome to the website of the Aggieland .NET User's Group</p><p>Our monthly meetings are at noon on the 2nd Tuesday of each month on the Texas A&M University campus.</p>",
                                                    ContactInfo = "<h3>Stay in touch with the DNUG</h3><ul><li>Join the mailing list<ul><li><a href=\"mailto://[email protected]?body=subscribe%20dotnet\">by email</a></li><li><a href=\"https://listserv.tamu.edu/cgi-bin/wa?SUBED1=dotnet&A=1\">by web</a></li></ul></li><li>Follow us on <a href=\"http://twitter.com/aggielanddnug\">twitter</a></li><li>Join the <a href=\"http://www.facebook.com/groups.php?ref=sb#/group.php?gid=43083919957\">facebook group</a></li></ul>"
                              };
            group.CreateAndFlush();

            Company improving = new Company
                                {
                                    Name = "Improving Enterprises",
                                    Url = "http://improvingenterprises.com",
                                    LogoUrl = "../../Content/images/improving200.png",
                                    HomePage = true
                                };
            improving.CreateAndFlush(group);

            Company microsoft = new Company
            {
                Name = "Microsoft",
                Url = "http://www.microsoft.com",
                LogoUrl = "../../Content/images/microsoft.jpg",
                HomePage = true
            };
            microsoft.CreateAndFlush(group);
            Company tamu = new Company
            {
                Name = "Texas A&M University",
                Url = "http://www.tamu.edu",
                LogoUrl = "../../Content/images/primaryWhiteMaroon.jpg",
                HomePage = true
            };
            tamu.CreateAndFlush(group);
            new Company
            {
                Name = "INETA",
                Url = "http://www.ineta.org",
                LogoUrl = "http://www.ineta.org/OfficialLogo.ashx?ugid=1",
                HomePage = true
            }.CreateAndFlush(group);
            new Company
            {Name = "O'Reilly", Url = "http://www.oreilly.com", LogoUrl = "../../Content/images/oreilly.gif", HomePage = true}.
                CreateAndFlush(group);
            new Company
            {
                Name = "DevExpress",
                Url = "http://www.devexpress.com",
                LogoUrl = "../../Content/images/devexpress.png",
                HomePage = true
            }.CreateAndFlush(group);

            new Person {Name = "Allen Hurst", Company = improving, BlogUrl = "http://ahurst.com"}.CreateAndFlush(group);
            new Person {Name = "Mike Abney", Company = improving, BlogUrl = "http://practicallyagile.com"}.CreateAndFlush(group);
            new Person {Name = "Dan Cary", Company = tamu}.CreateAndFlush(group);
            new Person {Name = "Robert Stackhouse", Company = tamu, BlogUrl = "http://robertstackhouse.com"}.CreateAndFlush(group);
            Person eric = new Person {Name = "Eric Huckabay", Company = improving};
            eric.CreateAndFlush(group);

            Venue gsc = new Venue{Name = "TAMU GSC"};
            gsc.CreateAndFlush(group);

            new SpecialContent
            {
                HomePage = true,
                Content =
                    "<a href=\"http://www.oreilly.com/store/\"><img src=\"../../Content/images/oreillydiscount.gif\" alt=\"O'Reilly User Group Discount\"/></a>"
            }.CreateAndFlush(group);
            // Add special content for o'reilly user group
            // add special content for twitter feed

            // Add people with blog links

            new Event
            {
                Date = new DateTime(2009, 04, 14, 12, 0, 0),
                Name = "April Meeting: Shoving Your Code Where It Belongs",
                Speakers = new[] {eric},
                Summary =
                    "Come join us for our April meeting. Mike will be covering career growth and how you can be better prepared for getting your next job, promotion, or raise. There will be door prizes provided by Microsoft and pizza provided by Improving Enterprises. Please RSVP if you plan to attend (up to 2 hours before the event) so that we don't have (another) pizza shortage!",
                Sponsors = new[] {improving, microsoft},
                EventLink1Text = "Via Facebook",
                EventLink1Url = "http://www.facebook.com/editevent.php?picture&eid=73126954537&created&new&m=1#/event.php?eid=73126954537",
                EventLink2Text = "Via Codezone",
                EventLink2Url = "https://www.ugss.codezone.com/PrivilegedUGEventView.CodezoneCom?EventID=6726",
                Venue = gsc
            }.CreateAndFlush(group);

            new Event
            {
                Date = new DateTime(2009, 05, 12, 12, 0, 0),
                Name = "May Meeting: Developing Your Development Career",
                Speakers = new[] {eric},
                Summary =
                    "Come join us for our May meeting. Eric will be covering career growth and how you can be better prepared for getting your next job, promotion, or raise. There will be door prizes provided by Microsoft and pizza provided by Improving Enterprises. Please RSVP if you plan to attend (up to 2 hours before the event) so that we don't have (another) pizza shortage!",
                Sponsors = new[] {improving, microsoft},
//.........这里部分代码省略.........
开发者ID:akhurst,项目名称:usergroupcms,代码行数:101,代码来源:UtilityController.cs


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