public void InserirTempo(MCliente c, double tempo) { PProgram p = new PProgram(); List <MCliente> list = ListarClientes(); foreach (MCliente cliente in list) { if (c.Id == cliente.Id) { cliente.Tempo = tempo; } } p.SaveCliente(list); }
public void DeleteCliente(MCliente c) { PProgram p = new PProgram(); List <MCliente> cs = p.OpenCliente(); for (int i = 0; i < cs.Count; i++) { if (cs[i].Id == c.Id) { cs.RemoveAt(i); break; } } p.SaveCliente(cs); }
public void InserirCliente(MCliente c) { PProgram p = new PProgram(); List <MCliente> cs = p.OpenCliente(); int m = 0; foreach (MUsuario x in AllAccount()) { if (x.Id > m) { m = x.Id; } } c.Id = m + 1; cs.Add(c); p.SaveCliente(cs); }
public void SaveClientes(List <MCliente> list) { PProgram p = new PProgram(); p.SaveCliente(list); }