Пример #1
0
 public RegisterShopVM(RegisterShopUC registerShopUC)
 {
     CurrentModel               = new RegisterShopModel();
     this.ShopUC                = registerShopUC;
     this.MyCommand             = new SpecialCommand();
     this.ImageCommand          = new Command();
     MyCommand.callComplete    += RegisterShop;
     ImageCommand.callComplete += OpenFileCommand;
 }
        public IActionResult RegisterShop(RegisterShopModel register)
        {
            try
            {
                _accountsService.RegisterShop(register);
            }
            catch (Npgsql.PostgresException)
            {
                return(Redirect("InvalidUsername"));
            }

            return(Redirect("Login"));
        }