public string GetOneManifestationDelete(Guid IdA) { try { string IdTemp = IdA.ToString(); manifestationDB.Delete(IdTemp); } catch { return("Error!"); } return("Success!"); }
public string DeleteUser(User delete) { List <Manifestation> m = manifestationDB.GetAllBySellerId(delete.Username); List <Ticket> t = null; if (m.Count != 0) { foreach (Manifestation man in m) { string id = man.Id.ToString(); manifestationDB.Delete(id); t = ticketDB.GetAllByManifestationId(id); if (t.Count != 0) { foreach (Ticket tic in t) { string idTic = tic.Id.ToString(); ticketDB.Delete(idTic); } } } } else { t = ticketDB.GetAll(); if (t.Count != 0) { foreach (Ticket tic in t) { string idTic = tic.Id.ToString(); if (tic.Buyer == delete.Name + " " + delete.Surname) { ticketDB.Delete(idTic); } } } } userDB.Delete(delete); return("Success!"); }