public ActionResult Created(CreatedViewModel model, string cfp)
        {
            if (!string.IsNullOrWhiteSpace(cfp) && cfp.Equals("1"))
            {
                return(RedirectToAction("Index", "CopyFromNotification",
                                        new { id = model.NotificationId }));
            }

            return(RedirectToAction("Index", "Exporter", new { id = model.NotificationId, area = "NotificationApplication" }));
        }
        public async Task <ActionResult> Created(Guid id)
        {
            var response = await mediator.SendAsync(new GetNotificationBasicInfo(id));

            var model = new CreatedViewModel
            {
                NotificationId     = response.NotificationId,
                NotificationNumber = response.NotificationNumber,
                CompetentAuthority = response.CompetentAuthority
            };

            return(View(model));
        }
示例#3
0
        public async Task <IActionResult> Created(CreatedViewModel model)
        {
            User user = new User {
                Email = model.Email, UserName = model.Email, OrganizationName = model.OrganizationName
            };

            var result = await userManager.CreateAsync(user, model.Password);

            if (result.Succeeded)
            {
                await userManager.AddToRoleAsync(user, "user");

                return(RedirectToAction("Users", "Admin"));
            }
            return(View(user));
        }
        public ActionResult Created(CreatedViewModel model, string cfp)
        {
            if (!string.IsNullOrWhiteSpace(cfp) && cfp.Equals("1"))
            {
                return RedirectToAction("Index", "CopyFromNotification",
                    new { id = model.NotificationId });
            }

            return RedirectToAction("Index", "Exporter", new { id = model.NotificationId, area = "NotificationApplication" });
        }
        public async Task<ActionResult> Created(Guid id)
        {
            var response = await mediator.SendAsync(new GetNotificationBasicInfo(id));

            var model = new CreatedViewModel
            {
                NotificationId = response.NotificationId,
                NotificationNumber = response.NotificationNumber,
                CompetentAuthority = response.CompetentAuthority
            };
            return View(model);
        }
示例#6
0
 public CreatedView()
 {
     InitializeComponent();
     DataContext = new CreatedViewModel();
 }