public IActionResult RegisterDatacordinator([FromBody] DataCoordinator dataCoordinator) { var command = new RegisterNewDataCoordinator() { IsNewRegistration = true, RegisteredAt = DateTimeOffset.UtcNow, Role = { StaffUserId = Guid.NewGuid(), FullName = dataCoordinator.FullName, DisplayName = dataCoordinator.DisplayName, Email = dataCoordinator.Email, PhoneNumbers = dataCoordinator.PhoneNumbers.Select(p => p.Value), PreferredLanguage = dataCoordinator.PreferredLanguage, NationalSociety = dataCoordinator.NationalSociety, Sex = dataCoordinator.Sex, AssignedNationalSocieties = dataCoordinator.AssignedNationalSocieties, BirthYear = dataCoordinator.BirthYear } }; RegisterStaffUser <RegisterNewDataCoordinator, Domain.StaffUser.Roles.DataCoordinator>(command); return(Ok()); }
public FastTransferDialogViewModel(DataCoordinator dataCoordinator, int studentId, int CurrentGroup = 0) { _dataCoordinator = dataCoordinator; _studentId = studentId; GroupIndex = CurrentGroup; TransferCommand = new RelayCommand(Transfer); CancelCommand = new RelayCommand(Cancel); }
public GroupManagerViewModel(IDialogCoordinator dialogCoordinator, DataCoordinator dataCoordinator) { _dialogCoordinator = dialogCoordinator; _dataCoordinator = dataCoordinator; SelectedSpecialty += 0; AddGroupCommand = new RelayCommand(AddGroup); Export = new RelayCommand(ExportAll); }
public NewGroupDialogViewModel(DataCoordinator dataCoordinator, int specialtyId) { _dataCoordinator = dataCoordinator; _specialtyId = specialtyId; TempGroup = new Group(); TempGroup.SpecialtyId = _specialtyId; SubmitCommand = new RelayCommand(Submit, (obj) => TempGroup.No.HasValue && TempGroup.Number.HasValue && !_dataCoordinator.GroupDataService.Items.Any(g => g.No == TempGroup.No && g.Number == TempGroup.Number && TempGroup.SpecialtyId == g.SpecialtyId)); CancelCommand = new RelayCommand(Cancel); }
static UserAccounts() { if (DataCoordinator.SaveExists(AccountsFile)) { Accounts = DataCoordinator.LoadUserAccounts(AccountsFile).ToList(); } else { Accounts = new List <UserAccount>(); SaveAccounts(); } }
// Awake() - Sets initial values and initialized coordinators private void Awake() { MaxRenderDatapoints = int.Parse(MaxDatapointsText.text); FocusNumber = -1; CheckForRenderAssociationUpdate = false; CheckForRenderDataUpdate = false; ClusteringOn = false; GenePointsCoordinator = new DataCoordinator(); DataPointsCoordinator = new DataCoordinator(); AddedDataPointsCoordinator = new DataCoordinator(); DataCluster = new Cluster(); Graphcontroller = GetComponent <GraphController>(); }
public StudentFormViewModel(Student selectedStudent, DataCoordinator dataCoordinator, IDialogCoordinator dialogCoordinator) { _dataCoordinator = dataCoordinator; _dialogCoordinator = dialogCoordinator; SaveCommand = new RelayCommand(SaveStudent, (obj) => !(string.IsNullOrEmpty(EditedStudent.LastName) || string.IsNullOrEmpty(EditedStudent.FirstName))); CancelCommand = new RelayCommand(Cancel); if (selectedStudent != null) { EditedStudent = selectedStudent.Clone() as Student; _isEditing = true; } else { EditedStudent = new Student(); } }
public IActionResult UpdaterDataCordinator([FromBody] DataCoordinator dataCoordinator) { var command = new RegisterNewDataCoordinator { RegisteredAt = dataCoordinator.RegistrationDate, Role = { StaffUserId = dataCoordinator.StaffUserId, FullName = dataCoordinator.FullName, DisplayName = dataCoordinator.DisplayName, Email = dataCoordinator.Email, PhoneNumbers = dataCoordinator.PhoneNumbers.Select(p => p.Value), PreferredLanguage = dataCoordinator.PreferredLanguage, NationalSociety = dataCoordinator.NationalSociety, Sex = dataCoordinator.Sex, AssignedNationalSocieties = dataCoordinator.AssignedNationalSocieties, BirthYear = dataCoordinator.BirthYear } }; UpdateStaffUser <RegisterNewDataCoordinator, Domain.StaffUser.Roles.DataCoordinator>(command); return(Ok()); }
public FastTransferDialog(Student student, DataCoordinator dataCoordinator) { InitializeComponent(); DataContext = new FastTransferDialogViewModel(dataCoordinator, student.Id, student.GroupIndex); }
public GroupManager(DataCoordinator dataCoordinator) { InitializeComponent(); DataContext = new GroupManagerViewModel(DialogCoordinator.Instance, dataCoordinator); }
public NewGroupDialog(DataCoordinator dataCoordinator, int specialtyId) { InitializeComponent(); DataContext = new NewGroupDialogViewModel(dataCoordinator, specialtyId); }
public StudentListing(DataCoordinator dataCoordinator, Navigator navigator) { DataContext = new StudentListingViewModel(DialogCoordinator.Instance, dataCoordinator, navigator); InitializeComponent(); }
public StudentForm(Student SelectedStudent, DataCoordinator dataCoordinator, IDialogCoordinator dialogCoordinator) { InitializeComponent(); DataContext = new StudentFormViewModel(SelectedStudent, dataCoordinator, dialogCoordinator); }
public TaskController(DataCoordinator data) { _data = data; }
public MainWindow(DataCoordinator dataCoordinator) { DataContext = new ApplicationViewModel(dataCoordinator); InitializeComponent(); }
public static void SaveAccounts() { DataCoordinator.SaveUserAccounts(Accounts, AccountsFile); }