Ejemplo n.º 1
0
 public EditorViewModel(AutorReference.Autor autor)
 {
     ObjectResult = new AutorReference.Autor();
     ObjectResult.AutorId = autor.AutorId;
     ObjectResult.AutorName = autor.AutorName;
     ObjectResult.AutorUrl = autor.AutorUrl;
     this.Name = ObjectResult.AutorName;
     this.Url = ObjectResult.AutorUrl;
 }
Ejemplo n.º 2
0
        private void DisplayListAutorComplete(object sender, AutorReference.DisplayAutorsCompletedEventArgs e)
        {
            this.Autors.Clear();

            foreach (var item in e.Result)
                this.Autors.Add(item);

            this.UpdateValues();
        }
Ejemplo n.º 3
0
 private void EditAutorComplete(object sender, AutorReference.EditAutorCompletedEventArgs e)
 {
     InformationViewModel informationViewModel = new InformationViewModel();
     if (Convert.ToBoolean(e.Result.ToString()))
         informationViewModel.Message = "The item was edited succesful";
     else
         informationViewModel.Message = "The item was not edited, please try again";
     _informationDialogService.ShowDialog<InformationViewModel>(new InformationWindow(), informationViewModel);
     _autorClient.DisplayAutorsAsync();
 }
Ejemplo n.º 4
0
        private void DisplayListAutorComplete(object sender, AutorReference.DisplayAutorsCompletedEventArgs e)
        {
            this.Autors.Clear();
            if (_searchTerm == null)
                _searchTerm = string.Empty;
            foreach (var item in e.Result)
            {
                if (_searchTerm == string.Empty)
                    this.Autors.Add(item);
                else
                {
                    string temporalAutorNameLower = item.AutorName.ToLower();
                    string temporalSearchTermLower = _searchTerm.ToLower();
                    if (temporalAutorNameLower.Contains(temporalSearchTermLower))
                        this.Autors.Add(item);
                }

            }
        }