Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        public void SaveClientes(List <MCliente> list)
        {
            PProgram p = new PProgram();

            p.SaveCliente(list);
        }