Esempio n. 1
0
 private bool OnSaveCanExecute()
 {
     return(IsValid &&
            (SelectedUser == null ? true : SelectedUser.DetachmentID != (SelectedDetachment == null ? 0 : SelectedDetachment.ID) ||
             SelectedUser == null ? true : SelectedUser.WorkerID != (SelectedWorker == null ? (int?)null : SelectedWorker.ID) ||
             SelectedUser == null ? true : !Functionality.CompareCollection(SelectedUser.Roles, UserInRole, new CompareRole())));
 }
Esempio n. 2
0
 private bool OnSaveCanExecute()
 {
     if (!LoginInit.user.Roles.Any(c => c.Name == "Write"))
     {
         return(false);
     }
     return(IsValid &&
            (Worker == null ? true : ServiceEmail != Worker.ServiceEmail ||
             Worker == null ? true : PersonalEmail != Worker.PersonalEmail ||
             Worker == null ? true : ServicePhone != Worker.ServicePhone ||
             Worker == null ? true : PersonalPhone != Worker.PersonalPhone ||
             Worker == null ? true : Description != Worker.Description ||
             Worker == null ? true : WorkerTours == null ? false : !Functionality.CompareCollection <Tour>(Worker.Tours, WorkerTours, new CompareTour()) && WorkerTours.Count != 0));
 }