示例#1
0
        private void CreateEmployerAndProject()
        {
            var context = DataContext.Get();
            var tags    = context.Tag.ToList();
            //on server - rand0mstr1ng
            var employer = Employer.Create("BounceThru Inc [Sample]", "Chicago", "United States", "bouncethru", "123123123",
                                           "*****@*****.**", "847 377 6284", 1, context);

            employer.IsVerified = true;

            var project1 = employer.CreateProject("Duke Nukem Never Ever [Sample]",
                                                  @"Duke Nukem Forever is an upcoming first-person shooter video game for the Windows PC, Xbox 360 and Playstation 3 systems [6] , currently in development by Gearbox Software, and a sequel to the 1996 game Duke Nukem 3D, as part of the long-running Duke Nukem video game series. Intended to be groundbreaking, it has become notorious in the video games industry for its severely-protracted development schedule; the game has been in development since 1997. 3D Realms and director George Broussard, one of the creators of the original Duke Nukem game, first announced the title's development in April 1997, and promotional information for the game was released in one form or another in 1997 to 2008. This information, including screenshots, showed different looks for the game, as 3D Realms was constantly changing game engines and graphics.",
                                                  10000, "USD", DateTime.Now.AddDays(30), new long[] { 3, 5, 7, 15 }, null, null);

            var project2 = employer.CreateProject("Create a LISP Machine [Sample]",
                                                  @"Lisp machines were general-purpose computers designed (usually through hardware support) to efficiently run Lisp as their main software language. In a sense, they were the first commercial single-user workstations. Despite being modest in number (perhaps 7,000 units total as of 1988[1]), Lisp machines commercially pioneered many now-commonplace technologies — including effective garbage collection, laser printing, windowing systems, computer mice, high-resolution bit-mapped graphics, computer graphic rendering, and networking innovations like CHAOSNet. Several companies were building and selling Lisp Machines in the 1980s: Symbolics (3600, 3640, XL1200, MacIvory and other models), Lisp Machines Incorporated (LMI Lambda), Texas Instruments (Explorer and MicroExplorer) and Xerox (InterLisp-D workstations). The operating systems were written in Lisp Machine Lisp, InterLisp (Xerox) and later partly in Common Lisp.",
                                                  3000, "USD", DateTime.Now.AddDays(30), new long[] { 1, 2, 4 }, null, null);

            var project4 = employer.CreateProject("Porting the Symbolics OS [Sample]",
                                                  @"Symbolics, Inc.[2] was a computer manufacturer headquartered in Cambridge, Massachusetts and later in Concord, Massachusetts, with manufacturing facilities in Chatsworth, California (a suburb of Los Angeles). Its first CEO, chairman, and founder was Russell Noftsker.[3] Symbolics designed and manufactured a line of Lisp machines, single-user computers optimized to run the Lisp programming language. Symbolics also made significant advances in software technology, and offered one of the premier software development environments of the 1980s and 1990s, now sold commercially as Open Genera for Tru64 UNIX on the HP Alpha. The Lisp Machine was the first commercially available (although that word had not yet been coined).",
                                                  5000, "USD", DateTime.Now.AddDays(30), new long[] { 11, 9, 13, 14 }, null, null);

            var project3 = employer.CreateProject("An MS-DOS Clone [Sample]",
                                                  @"DOS is a single-user, single-task operating system with basic kernel functions that are non-reentrant: only one program at a time can use them. There is an exception with Terminate and Stay Resident (TSR) programs, and some TSRs can allow multitasking. However, there is still a problem with the non-reentrant kernel: once a process calls a service inside of operating system kernel (system call), it must not be interrupted with another process calling system call, until the first call is finished.",
                                                  7000, "USD", DateTime.Now.AddDays(30), new long[] { 8, 12, 10 }, null, null);

            foreach (var project in new[] { project1, project2, project3, project4 })
            {
                project.Attachments.Add(CreateAttachment("/Public/Project/Test.doc"));
            }

            context.AddObject(employer);
            context.SaveChanges();
        }
示例#2
0
        public ActionResult Signup(string name, string city, string country, string username, string password, string email, string phone)
        {
            var employer = Employer.Create(name, city, country, username,
                                           password, email, phone, Tenant.Id, DbContext);

            DbContext.SaveChanges();

            Response.Cookies.Add(AuthHelper.GetAuthTicketWithRoles(employer.Account.Username, employer.Account.Type, true, new TimeSpan(0, 30, 0)));
            return(Redirect(string.Format("/{0}/AddProject", employer.Account.Username)));
        }