private void BModificarCliente_Click(object sender, EventArgs e)
        {
            ConsultarCliente form5 = new ConsultarCliente();

            form5.Size       = new Size(Screen.PrimaryScreen.Bounds.Width - 300, Screen.PrimaryScreen.Bounds.Height - 100);
            form5.TopLevel   = false;
            form5.AutoScroll = true;
            pPanelBig.Controls.Add(form5);
            form5.Show();
        }
        private void bCliente_Click(object sender, EventArgs e)
        {
            ConsultarCliente form5 = new ConsultarCliente(2);

            form5.ShowDialog();

            if (form5.cliente() != null)
            {
                cCliente = (Cliente)form5.cliente();
                eEmpresa = (Empresa)form5.EEmpresa;
            }
            Fill();
        }
        private void BSeleccionarCliente_Click(object sender, EventArgs e)
        {
            ConsultarCliente consultarCliente = new ConsultarCliente(2);

            consultarCliente.Location = new Point(Data.f1.pPanelBig.Location.X + 20, Data.f1.pPanelBig.Location.Y + 80);
            consultarCliente.Size     = new Size(Screen.PrimaryScreen.Bounds.Width - 300, Screen.PrimaryScreen.Bounds.Height - 200);
            consultarCliente.ShowDialog();

            if (consultarCliente.C != null)
            {
                cCliente = consultarCliente.C;
                tNombreCliente.Clear();
                tNombreCliente.SelectedText = cCliente.getNombre() + " " + cCliente.getApellido();
            }
        }
Example #4
0
        private void BSeleccionarCliente_Click_1(object sender, EventArgs e)
        {
            ConsultarCliente form5 = new ConsultarCliente(2);

            form5.Size     = new Size(Screen.PrimaryScreen.Bounds.Width - 300, Screen.PrimaryScreen.Bounds.Height - (int)(Screen.PrimaryScreen.Bounds.Height * 0.11));
            form5.Location = Data.f1.pPanelBig.Location;
            form5.ShowDialog();


            c        = (Cliente)form5.cliente();
            eEmpresa = (Empresa)form5.EEmpresa;

            if (c != null)
            {
                Fill_Cliente();
            }

            if (eEmpresa != null)
            {
                Fill_Empresa();
            }

            Fill_Anexo();
        }
Example #5
0
        private void Button1_Click(object sender, EventArgs e)
        {
            ConsultarCliente consultarCliente = new ConsultarCliente(2);

            consultarCliente.ShowDialog();

            if (consultarCliente.EEmpresa == null && consultarCliente.C == null)
            {
                MessageBox.Show("No se ha seleccionado ningĂșn cliente.");
            }
            else
            {
                if (consultarCliente.EEmpresa != null)
                {
                    tCif.Clear();
                    tCif.SelectedText = consultarCliente.EEmpresa.SCif;

                    tRazonSocial.Clear();
                    tRazonSocial.SelectedText = consultarCliente.EEmpresa.SRazonSocial;

                    tRepresentante.Clear();
                    tRepresentante.SelectedText = consultarCliente.C.getNombre() + " " + consultarCliente.C.getApellido();

                    tDniRepresentante.Clear();
                    tDniRepresentante.SelectedText = consultarCliente.C.getDni();

                    for (int i = 0; i < cbTipoVia.Items.Count; i++)
                    {
                        if (cbTipoVia.Items[i].Equals(consultarCliente.EEmpresa.STipoVia))
                        {
                            cbTipoVia.SelectedIndex = i;
                        }
                    }

                    tDireccionAnexo.Clear();
                    tDireccionAnexo.SelectedText = consultarCliente.EEmpresa.SDireccion;

                    tNumero.Clear();
                    tNumero.SelectedText = consultarCliente.EEmpresa.SNumero;

                    tPiso.Clear();
                    tPiso.SelectedText = consultarCliente.EEmpresa.SPiso;

                    tProvincia.Clear();
                    tProvincia.SelectedText = consultarCliente.EEmpresa.SProvincia;

                    tMunicipio.Clear();
                    tMunicipio.SelectedText = consultarCliente.EEmpresa.SMunicipio;

                    tCp.Clear();
                    tCp.SelectedText = consultarCliente.EEmpresa.SCp;

                    tFirma.Clear();
                    tFirma.SelectedText = tRepresentante.Text;
                }
                else
                {
                    tCif.Clear();
                    tCif.ReadOnly = true;

                    tRazonSocial.Clear();
                    tRazonSocial.ReadOnly = true;

                    tRepresentante.Clear();
                    tRepresentante.SelectedText = consultarCliente.C.getNombre() + " " + consultarCliente.C.getApellido();

                    tDniRepresentante.Clear();
                    tDniRepresentante.SelectedText = consultarCliente.C.getDni();

                    for (int i = 0; i < cbTipoVia.Items.Count; i++)
                    {
                        if (cbTipoVia.Items[i].Equals(consultarCliente.EEmpresa.STipoVia))
                        {
                            cbTipoVia.SelectedIndex = i;
                        }
                    }

                    tDireccionAnexo.Clear();
                    tDireccionAnexo.SelectedText = consultarCliente.C.getDireccion();

                    tNumero.Clear();
                    tNumero.SelectedText = consultarCliente.C.getNumero();

                    tPiso.Clear();
                    tPiso.SelectedText = consultarCliente.C.getPiso();

                    tProvincia.Clear();
                    tProvincia.SelectedText = consultarCliente.C.getProvincia();

                    tMunicipio.Clear();
                    tMunicipio.SelectedText = consultarCliente.C.getMunicipio();

                    tCp.Clear();
                    tCp.SelectedText = consultarCliente.C.getCp();

                    tFirma.Clear();
                    tFirma.SelectedText = tRepresentante.Text;
                }
            }
        }