Esempio n. 1
0
		public updateProject() {
			publishProvider = new List<IPublishProvider>();
			updatePackages = new List<updatePackage>();
			linkedPublishProvider = new serializableDictionary<string, List<string>>();
			updateLogUser = new userAccount();
			viewFilter = new updatePackageViewFilter();
		}
		public override void initializeData() {
			if (Argument != null && Argument is userAccount)
				_userAccount = (Argument as userAccount);

			registerValidationEntry(txtUsername, validationTypes.NotNull, "Username");
			if (_userAccount != null) {
				txtUsername.Text = _userAccount.Username;

				chkIsActive.Checked = _userAccount.userIsActive;
				chkIsAdmin.Checked = _userAccount.userIsAdmin;
				nmdMaxProjects.Value = _userAccount.maxProjects;

				txtPassword.cueText = "leave empty if you don't want to change it";

			}
			else {
				permanentlyDisableControl(chkIsActive);
				chkIsActive.Checked = true;
				registerValidationEntry(txtPassword, validationTypes.NotNull, "Password");
			}

		}
		public override void initializeData() {
			if (Argument != null && Argument is userAccount)
				_userAccount = (Argument as userAccount);

			registerValidationEntry(txtUsername, validationTypes.NotNull, "Benutzername");
			if (_userAccount != null) {
				txtUsername.Text = _userAccount.Username;

				chkIsActive.Checked = _userAccount.userIsActive;
				chkIsAdmin.Checked = _userAccount.userIsAdmin;
				nmdMaxProjects.Value = _userAccount.maxProjects;

				txtPassword.cueText = "Nur eingeben, wenn Sie Ihr Passwort ändern wollen";

			}
			else {
				permanentlyDisableControl(chkIsActive);
				chkIsActive.Checked = true;

				//Das Passwort darf nur bei neuen Benutzern nicht leer sein
				registerValidationEntry(txtPassword, validationTypes.NotNull, "Passwort");
			}

		}