예제 #1
0
        public void UpdateClient(
            string Name,
            string Adress,
            string PhoneNumber,
            int Tariff,
            int Zone,
            string PonClient,
            string Comment,
            int IDNumber)
        {
            ClientsDao dao = new ClientsDao();

            Client oldClient = dao.Details(IDNumber);

            Client client = new Client()

            {
                Name        = Name,
                Adress      = Adress,
                PhoneNumber = PhoneNumber,
                ZoneId      = Tariff,
                TariffId    = Zone,
                Comment     = Comment,
                IDNumber    = IDNumber,
                Validity    = oldClient.Validity,
                Included    = oldClient.Included
            };


            dao.Update(client);
        }
예제 #2
0
        public ClientEditDTO GetClientEdit(int ClientId)
        {
            ClientsDao dao = new ClientsDao();

            ClientEditDTO edit = (ClientEditDTO)ModelToDto <ClientEditDTO>(dao.Details(ClientId));

            edit.ChooseZonesAndTariffs = GetZonesAndTariffs();
            return(edit);
        }