Esempio n. 1
0
        private void btnVolver_Click(object sender, EventArgs e)
        {
            MenuClienteWF _menu = new MenuClienteWF(razonSocial, cuit);

            _menu.Show();
            Hide();
        }
Esempio n. 2
0
        private void btnHistorial_Click(object sender, EventArgs e)
        {
            MenuClienteWF _tarea = new MenuClienteWF(RazonSocial, Cuit);

            _tarea.Show();
            Hide();
        }
Esempio n. 3
0
 private void dgvTodosLosClientes_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvTodosLosClientes.CurrentCell.ColumnIndex == 14)
     {
         //var idsubCliente = Convert.ToString(this.dgvTodosLosClientes.CurrentRow.Cells[0].Value);
         string        RazonSocial = this.dgvTodosLosClientes.CurrentRow.Cells[1].Value.ToString();
         string        Cuit        = this.dgvTodosLosClientes.CurrentRow.Cells[2].Value.ToString();
         MenuClienteWF _tarea      = new MenuClienteWF(RazonSocial, Cuit);
         _tarea.Show();
         Hide();
     }
     if (dgvTodosLosClientes.CurrentCell.ColumnIndex == 15)
     {
         List <Cliente> _cliente = new List <Cliente>();
         var            cuit     = dgvTodosLosClientes.CurrentRow.Cells[2].Value.ToString();
         _cliente = ClienteNeg.BuscarClientePorCuit(cuit);
         if (_cliente.Count > 0)
         {
             dgvTodosLosClientes.Visible = false;
             var cliente = _cliente.First();
             RazonSocial = cliente.NombreRazonSocial;
             Cuit        = cliente.Cuit;
             txtNombreRazonSocial.Text = cliente.NombreRazonSocial;
             txtCuit.Text      = cliente.Cuit;
             txtActividad.Text = cliente.Actividad;
             var    tel    = cliente.Telefono;
             string varTel = tel;
             if (varTel != "")
             {
                 var split1 = varTel.Split('-')[0];
                 var split2 = varTel.Split('-')[1];
                 split1           = split1.Trim();
                 split2           = split2.Trim();
                 txtCodArea.Text  = split1;
                 txtTelefono.Text = split2;
             }
             txtEmail.Text             = cliente.Email;
             txtCalle.Text             = cliente.Calle;
             txtAltura.Text            = cliente.Altura;
             txtCodigoPostal.Text      = cliente.CodigoPostal;
             cmbCondicionAntiAfip.Text = cliente.CondicionAntiAfip;
             cmbProvincia.Text         = cliente.Provincia;
             cmbLocalidad.Text         = cliente.Localidad;
             txtCuit.Enabled           = false;
             btnEditar.Visible         = true;
             btnEliminar.Visible       = true;
             btnHistorial.Visible      = true;
         }
     }
 }