Ejemplo n.º 1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public SettingsViewModel()
        {
            // Create First Name
            FirstName = new TextEntryViewModel
            {
                Label        = "First Name",
                OriginalText = mLoadingText,
                CommitAction = SaveFirstNameAsync
            };

            // Create Last Name
            LastName = new TextEntryViewModel
            {
                Label        = "Last Name",
                OriginalText = mLoadingText,
                CommitAction = SaveLastNameAsync
            };

            // Create Username
            Username = new TextEntryViewModel
            {
                Label        = "Username",
                OriginalText = mLoadingText,
                CommitAction = SaveUsernameAsync
            };

            // Create Password
            Password = new PasswordEntryViewModel
            {
                Label        = "Password",
                FakePassword = "******",
                CommitAction = SavePasswordAsync
            };

            // Create Email
            Email = new TextEntryViewModel
            {
                Label        = "Email",
                OriginalText = mLoadingText,
                CommitAction = SaveEmailAsync
            };

            // Create commands
            OpenCommand          = new RelayCommand(Open);
            CloseCommand         = new RelayCommand(Close);
            LogoutCommand        = new RelayCommand(async() => await LogoutAsync());
            ClearUserDataCommand = new RelayCommand(ClearUserData);
            LoadCommand          = new RelayCommand(async() => await LoadAsync());
            SaveFirstNameCommand = new RelayCommand(async() => await SaveFirstNameAsync());
            SaveLastNameCommand  = new RelayCommand(async() => await SaveLastNameAsync());
            SaveUsernameCommand  = new RelayCommand(async() => await SaveUsernameAsync());
            SaveEmailCommand     = new RelayCommand(async() => await SaveEmailAsync());

            // TODO: Get from localization
            LogoutButtonText = "Logout";
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     Name = new TextEntryViewModel {
         Label = "Name", OriginalText = "Louis Peng"
     };
     Username = new TextEntryViewModel {
         Label = "Username", OriginalText = "Louis"
     };
     Password = new PasswordEntryViewModel {
         Label = "Password", FakePassword = "******"
     };
     Email = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     Name = new TextEntryViewModel {
         Label = "Name", OriginalText = "Good Boi"
     };
     Username = new TextEntryViewModel {
         Label = "Username", OriginalText = "goodboi"
     };
     Password = new PasswordEntryViewModel {
         Label = "Password", FakePassword = "******"
     };
     Email = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     Name = new TextEntryViewModel {
         Label = "Name", OriginalText = "Vlad Kontsevich"
     };
     UserName = new TextEntryViewModel {
         Label = "UserName", OriginalText = "Vald"
     };
     Password = new PasswordEntryViewModel {
         Label = "Password", FakePassword = "******"
     };
     Email = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     Name = new TextEntryViewModel {
         Label = "Name", OriginalText = "quanljh"
     };
     Username = new TextEntryViewModel {
         Label = "Username", OriginalText = "quan"
     };
     Password = new PasswordEntryViewModel {
         Label = "Password", FakePassword = "******"
     };
     Email = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
 }
Ejemplo n.º 6
0
 public SettingsDesignViewModel()
 {
     EmailViewModel = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
     NameViewModel = new TextEntryViewModel {
         Label = "Name", OriginalText = "Bob Dobbs"
     };
     PasswordViewModel = new PasswordEntryViewModel {
         Label = "Password"
     };
     UserNameViewModel = new TextEntryViewModel {
         Label = "Username", OriginalText = "Bob"
     };
     LogoutButtonText = "Logout";
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     FirstName = new TextEntryViewModel {
         Label = "First Name", OriginalText = "Luke"
     };
     LastName = new TextEntryViewModel {
         Label = "Last Name", OriginalText = "Malpass"
     };
     Username = new TextEntryViewModel {
         Label = "Username", OriginalText = "luke"
     };
     Password = new PasswordEntryViewModel {
         Label = "Password", FakePassword = "******"
     };
     Email = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
 }
Ejemplo n.º 8
0
 public SettingsDesignModel()
 {
     FirstName = new TextEntryViewModel {
         Label = "Fist Name", OriginalText = "Rodion"
     };
     LastName = new TextEntryViewModel {
         Label = "Last Name", OriginalText = "Gyrbu"
     };
     Username = new TextEntryViewModel {
         Label = "Username", OriginalText = "rgyrbu"
     };
     Password = new PasswordEntryViewModel {
         Label = "Password", FakePassword = "******"
     };
     Email = new TextEntryViewModel {
         Label = "Email", OriginalText = "*****@*****.**"
     };
 }
Ejemplo n.º 9
0
 /// <summary>
 /// TODO: normal information
 /// </summary>
 public UserPersonalAreaViewModel()
 {
     FullName = new TextEntryViewModel
     {
         Label        = "ФИО",
         OriginalText = (IoC.Application_Work.Current_User as Client)?.FullName,
         MaxLength    = 50
     };
     Login = new TextEntryViewModel
     {
         Label        = "Логин",
         OriginalText = (IoC.Application_Work.Current_User as Client)?.Login,
         MaxLength    = 20
     };
     PhoneNumber = new TextEntryViewModel
     {
         Label        = "Номер телефона",
         OriginalText = (IoC.Application_Work.Current_User as Client)?.PhoneNumber,
         MaxLength    = 11
     };
     Email = new TextEntryViewModel
     {
         Label        = "Электронная почта",
         OriginalText = (IoC.Application_Work.Current_User as Client)?.Email,
         MaxLength    = 50
     };
     CompanyName = new TextEntryViewModel
     {
         Label        = "Название компании",
         OriginalText = (IoC.Application_Work.Current_User as Client)?.CompanyName,
         MaxLength    = 20
     };
     Password = new PasswordEntryViewModel
     {
         Label        = "Password",
         FakePassword = "******"
     };
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     FirstName = new TextEntryViewModel {
         Label = "Imię", OriginalText = "Jessica"
     };
     LastName = new TextEntryViewModel {
         Label = "Nazwisko", OriginalText = "Stalon"
     };
     Identify = new TextEntryViewModel {
         Label = "Identyfikator", OriginalText = "JS12321"
     };
     Type = new TextEntryViewModel {
         Label = "Posada", OriginalText = "Lekarz"
     };
     Specialize = new TextEntryViewModel {
         Label = "Specjalizacja", OriginalText = "Urolog"
     };
     PwdNumber = new TextEntryViewModel {
         Label = "Numer PWD", OriginalText = "pwd135"
     };
     Password = new PasswordEntryViewModel {
         Label = "Hasło", FakePassword = "******"
     };
 }
Ejemplo n.º 11
0
        public IActionResult PasswordEntry(PasswordEntryViewModel viewModel)
        {
            var vm = viewModel.PasswordEntryDataViewModel;

            var result = _groupsService.TryAddUserToPrivateGroup(new AddUserToGroupRequest
            {
                GroupId = vm.GroupId,
                UserName = User.Identity.Name,
                Password = vm.Password
            });

            if (result.IsSuccess)
            {
                return RedirectToAction("Single", new { groupId = vm.GroupId });
            }
            else
            {
                return RedirectToAction("Index");
            }
        }
Ejemplo n.º 12
0
        public IActionResult Password(int groupId)
        {
            var groupResult = _groupsService.GetDataWithUsers(new GetGroupRequest { GroupId = groupId });

            if (groupResult.IsSuccess)
            {
                var basicDataViewModel = Mapper.Map<GroupBasicDataViewModel>(groupResult.Item);

                var entryViewModel = new PasswordEntryViewModel
                {
                    BasicDataViewModel = basicDataViewModel,
                    PasswordEntryDataViewModel = new PasswordEntryDataViewModel
                    {
                        GroupId = basicDataViewModel.Id
                    }
                };

                return View("Password", entryViewModel);
            }
            else
            {
                return RedirectToAction("Index");
            }
        }