public FrmEditarCliente(Clientes owner) { _owner = owner; InitializeComponent(); this.Id_Cliente = Convert.ToInt32(_owner.ObtenerSeleccion().Cells["ID"].Value); this.textBoxNombre.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["NOMBRE"].Value); this.textBoxApellido.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["APELLIDO"].Value); this.textBoxCuil.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["CUIL"].Value); this.textBoxRazonSocial.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["RAZON SOCIAL"].Value); this.textBoxCuit.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["CUIT"].Value); this.textBoxTelFijo.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["TELEFONO FIJO"].Value); this.textBoxTelMovil.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["TELEFONO MOVIL"].Value); this.textBoxEmail.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["EMAIL"].Value); int tipoCliente = Convert.ToInt32(_owner.ObtenerSeleccion().Cells["TIPO CLIENTE"].Value); if (tipoCliente == 1) radioButtonPersona.Checked=true; else radioButtonEmpresa.Checked=true; idDireccion = Convert.ToInt32(_owner.ObtenerSeleccion().Cells["ID DIRECCION"].Value); DDireccion direccion = NDireccion.BuscarPorId(idDireccion); this.textBoxCalle.Text = direccion.Calle; this.textBoxNumero.Text = direccion.Numero.ToString(); this.textBoxPiso.Text = direccion.Piso; this.textBoxDepto.Text = direccion.Departamento; this.textBoxCiudad.Text = direccion.Ciudad; this.textBoxProvincia.Text = direccion.Provincia; this.textBoxPais.Text = direccion.Pais; this.textBoxCP.Text = direccion.Codigo_Postal.ToString(); //recuperar datos de direccion y mostrarlos }
private void buttonClientes_Click(object sender, EventArgs e) { if (clientes == null) { clientes = new Clientes(); this.panelContenedor.Controls.Clear(); this.panelContenedor.Controls.Add(clientes); } else { this.panelContenedor.Controls.Clear(); this.panelContenedor.Controls.Add(clientes); } }
public FrmEditarCliente(Clientes owner) { _owner = owner; InitializeComponent(); this.Id_Cliente = Convert.ToInt32(_owner.ObtenerSeleccion().Cells["ID"].Value); this.textBoxNombreCliente.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["CLIENTE"].Value); this.textBoxNombreContacto.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["CONTACTO"].Value); this.textBoxDireccion.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["DIRECCIÓN"].Value); this.textBoxCiudad.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["CIUDAD"].Value); this.textBoxRegion.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["REGIÓN"].Value); this.textBoxPais.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["PAÍS"].Value); this.textBoxTelefono.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["TELÉFONO"].Value); this.textBoxFax.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["FAX"].Value); this.textBoxEmail.Text = Convert.ToString(_owner.ObtenerSeleccion().Cells["EMAIL"].Value); }
public FrmAgregarCliente(Clientes owner) { _owner = owner; InitializeComponent(); }
private void buttonClientes_Click(object sender, EventArgs e) { Clientes controlClientes = new Clientes(); this.panelContainer.Controls.Clear(); this.panelContainer.Controls.Add(controlClientes); }
public FrmAgregarNuevoCliente(Clientes owner) { _owner = owner; InitializeComponent(); }