private void EditSite() { this.SelectedSite.NomSite = "Edited Name"; this.SelectedSite.Mode = emMode3.none; ServiceAgentS.Flush(this.Sites, (error) => SitesFlushed(error)); }
private void DeleteSite() { string s = "Suppression de"; string z = SelectedSite.NomSite; if (SelectedSite != null) { this.SelectedSite.Mode = emMode3.delete; ServiceAgentS.Flush(this.Sites, (error) => SitesFlushed(error)); ServiceAgentS.GetSites((sitelist, error) => SiteLoaded(sitelist, error)); NotifyError(s + " " + z, null); } }
private void AddSite() { string s = "Ajout de"; string z = NomSite; Idclient = this.SelectedClient.Id; NomClient = this.selectedClient.NomClient; this.Sites.Insert(0, new Site { NomSite = NomSite, NomClient = NomClient, Adresse = Adresse, Batiment = Batiment.Value, Etage = Etage.Value, Salle = Salle.Value, idclient = Idclient, Mode = emMode3.add }); ServiceAgentS.Flush(this.Sites, (error) => SitesFlushed(error)); ReinitField(); NotifyError(s + " " + z, null); }