public int DeleteEscritor() { int ret = SelectedEscritor.Delete(); if (ret == 1) { if (SelectedEscritor.Idescritor == Escritores.Count) { Escritores.Remove(SelectedEscritor); Escritor.ReSeed(Escritores.Count); } else { foreach (Escritor e in Escritores) { if (e.Idescritor > SelectedEscritor.Idescritor) { e.Idescritor -= 1; } } Escritores.Remove(SelectedEscritor); Escritor.CreateFromObservableCollection(Escritores); } } return(ret); }
public bool UpdateEscritor() { if (SelectedEscritor.Update() == 1) { return(true); } return(false); }