Пример #1
0
        private void comboBox2_Enter(object sender, EventArgs e)
        {
            DataTable         tabla         = new DataTable();
            Lgestiondomicilio domiciliarios = new Lgestiondomicilio();

            tabla = domiciliarios.ndomiciliario();
            comboBox2.DataSource  = tabla;
            comboBox2.ValueMember = "Nombre_completo";
        }
Пример #2
0
        private void bunifuThinButton21_Click(object sender, EventArgs e)
        {
            if (cmb1.Text == "" || comboBox1.Text == "")
            {
                MessageBox.Show("los datos no pueden ir vacios");
            }
            else
            {
                string h;
                if (label4.Text == "Cliente - Nombres y apellidos" || txt4.Text == "")
                {
                    h = "1";
                }
                else
                {
                    h = txt4.Text;
                }

                string        a       = DateTime.Now.ToString("dd/MM/yyyy");
                Lgestionventa factura = new Lgestionventa();
                string        c       = factura.nfactura(Convert.ToString(a), Iva.Text, "1", Compra.Text, "2", "123456789", h);

                if (c == "1")
                {
                    for (f = 0; f < dgv1.Rows.Count; f++)
                    {
                        Lgestionventa detalles = new Lgestionventa();
                        detalles.detallesv(dgv1.Rows[f].Cells[0].Value.ToString(), label2.Text, dgv1.Rows[f].Cells[3].Value.ToString(), dgv1.Rows[f].Cells[4].Value.ToString(), dgv1.Rows[f].Cells[2].Value.ToString());
                    }
                    MessageBox.Show("factura de venta exitosa");
                }
                if (label14.Text == "Cliente - Nombres y apellidos" || label14.Text == "cliente de prueba" || txt4.Text == "")
                {
                }
                else
                {
                    Lgestiondomicilio direccion = new Lgestiondomicilio();
                    dir = direccion.dircliente(txt4.Text);
                    Mostrarruta.Visible = true;
                }
            }
        }