예제 #1
0
        public ActionResult Create(string appType, Models.Applications.NewApplicationDetails model)
        {
            // Setup url for notification
            var url = Url.Action("Index", "Applications", null, Request.Url.Scheme);

            // Setup name
            var data = (NewApplicationDetails)model;

            data.Name = model.Name;

            // Create application
            Application application = _applications.Create(url, model, LoggedInUser);

            // Log details for industry good application
            if (application.IsIntroducedAsIndustryGood)
            {
                // Log industry good action
                _auditLog.Log(AuditStream.General, "Industry Good",
                              new
                {
                    id    = LoggedInUser.ID,
                    email = LoggedInUser.Email
                },
                              new
                {
                    remote_ip = Request.UserHostAddress,
                    browser   = Request.Browser.Browser
                });
            }

            // Setup status message
            Toastr.Success("Service was successfully created");
            return(RedirectToAction("Details", new { id = application.ID }));
        }
 public void Create(Applications application)
 {
     _applicationService.Create(application);
 }