示例#1
0
        public void Edit(Client client)
        {
            var currentClient = this.GetById(client.Id);

            currentClient.Name = client.Name;
            currentClient.Address = client.Address;
            currentClient.City = client.City;
            currentClient.Referent = client.Referent;
            currentClient.Tel1 = client.Tel1;
            currentClient.Tel2 = client.Tel2;
            currentClient.CellPhone = client.CellPhone;
            currentClient.Email = client.Email;

            Uow.Clients.Edit(currentClient);
            Uow.Commit();
        }
示例#2
0
        private void ClientCreated(object sender, Client client)
        {
            RefreshClientsDropdown();
            ddlClient.SelectedValue = client.Id;

            ddlClient_SelectedIndexChanged(null, null);
        }
 private void OnClientCreated(Client Client)
 {
     if (ClientCreated != null)
     {
         ClientCreated(this, Client);
     }
 }
 private void FrmCreateEditClient_Load(object sender, EventArgs e)
 {
     if (_clientId != Guid.Empty)
     {
         using (var service = _serviceFactory.Create<IClientService>())
         {
             _client = service.GetById(_clientId);
             this.Text = "Editar Cliente";
         }
     }
     else
     {
         this.Text = "Crear Cliente";
     }
 }
示例#5
0
 public void Create(Client client)
 {
     Uow.Clients.Add(client);
     Uow.Commit();
 }