Example #1
0
 public ModifyArticleViewModel()
 {
     client              = new NewsdeskServiceClient();
     SelectedArticle     = new ArticleToClient();
     Categories          = new ObservableCollection <CategoryToClient>(client.GetAllCategories());
     Authors             = new ObservableCollection <AuthorToClient>(client.GetAllAuthors(false));
     OldAuthorSelected   = new ObservableCollection <AuthorToClient>();
     OldCategorySelected = new ObservableCollection <CategoryToClient>();
 }
Example #2
0
 public MainViewModel()
 {
     client                 = new NewsdeskServiceClient();
     CategoryList           = new ObservableCollection <CategoryToClient>(client.GetAllCategories());
     CreateCategory         = new RelayCommand(OnCategoryCreated, CanCategoryBeCreated);
     ArticleList            = new ObservableCollection <ArticleToClient>(client.GetAllArticles(false));
     AuthorListAll          = new ObservableCollection <AuthorToClient>(client.GetAllAuthors(false));
     NotApprovedArticleList = new ObservableCollection <ArticleToClient>(client.GetAllArticles(true));
     SetupGUIBasedOnApprovedAccess();
 }
Example #3
0
 public AcceptAuthorViewModel()
 {
     client     = new NewsdeskServiceClient();
     AuthorList = new ObservableCollection <AuthorToClient>(client.GetAllAuthors(true));
 }
 public RegistrationViewModel()
 {
     client = new NewsdeskServiceClient();
 }
 public LoginViewModel()
 {
     client        = new NewsdeskServiceClient();
     LoginCommand  = new RelayCommand(OnLogin, CanLogin);
     LogoutCommand = new RelayCommand(OnLogout, CanLogout);
 }