private void button1_Click(object sender, EventArgs e) { label14.Text = Convert.ToString(totalPagar); for (int a = 0; a < Convert.ToInt32(textBox1.Text); a++) { BLL.ClassColores productos = new BLL.ClassColores(); ClassColores Logica = new ClassColores(); MODELS.Producto claseProd = new MODELS.Producto(); claseProd.ProductoId = Convert.ToInt32(this.dataGridView1.Rows[0].Cells[0].Value.ToString()); claseProd.Estado = false; string resp = Logica.BorrarProducto(claseProd); this.dataGridView1.Refresh(); FacturaXML.Append("<Detalle>"); FacturaXML.Append("<Producto>"); FacturaXML.Append(this.dataGridView1.Rows[0].Cells[0].Value.ToString()); FacturaXML.Append("</Producto>"); FacturaXML.Append("<Cantidad>"); FacturaXML.Append(1); FacturaXML.Append("</Cantidad>"); FacturaXML.Append("<Precio>"); FacturaXML.Append("</Precio>"); FacturaXML.Append("<Descuento>"); FacturaXML.Append("</Descuento>"); FacturaXML.Append("<Subtotal>"); FacturaXML.Append("</Subtotal>"); FacturaXML.Append("</Detalle>"); } listBox1.Items.Add(""); listBox1.Refresh(); }
private void MostrarDatos() { BLL.ClassColores Datos = new BLL.ClassColores(); this.dataGridView2.DataSource = Datos.MostrarCategoria(); this.dataGridView2.Refresh(); Datos = new BLL.ClassColores(); this.dataGridView1.DataSource = Datos.MostrarCategoria(); this.dataGridView1.Refresh(); }
private void button5_Click(object sender, EventArgs e) { BLL.ClassColores producto = new BLL.ClassColores(); this.dataGridView1.DataSource = producto.MostrarProductoFactura(Convert.ToInt32(textBox2.Text)); if (dataGridView1.Rows.Count > 0) { MessageBox.Show(Convert.ToString(this.dataGridView1.Rows.Count)); ActProductos(); BLL.ClassColores a = new BLL.ClassColores(); this.dataGridView2.DataSource = a.Factura(Convert.ToInt32(textBox2.Text)); } else { MessageBox.Show("El número de factura es incorrecto"); } }
private void FormVenta_Load(object sender, EventArgs e) { BLL.ClassColores productos = new BLL.ClassColores(); textBox1.Text = "0"; productos = new ClassColores(); this.dataGridView3.DataSource = productos.MostrarClienteNIT(cliente); textBox4.Enabled = false; textBox5.Enabled = false; textBox6.Enabled = false; textBox7.Enabled = false; textBox3.Enabled = false; textBox4.Text = this.dataGridView3.Rows[0].Cells[1].Value.ToString(); textBox5.Text = this.dataGridView3.Rows[0].Cells[5].Value.ToString(); textBox6.Text = Convert.ToString(empl); textBox7.Text = Convert.ToString(DateTime.Now); productos = new ClassColores(); this.dataGridView1.DataSource = productos.MostrarIdCliente(textBox5.Text); textBox3.Text = (this.dataGridView1.Rows[0].Cells[0].Value.ToString()); //XML if (FacturaXML.Length <= 0) { FacturaXML.Append("<Factura>"); FacturaXML.Append("<Encabezado>"); FacturaXML.Append("<Cliente>"); FacturaXML.Append(Convert.ToInt32(textBox3.Text)); FacturaXML.Append("</Cliente>"); FacturaXML.Append("<Usuario>"); FacturaXML.Append(Convert.ToInt32(textBox6.Text)); FacturaXML.Append("</Usuario>"); FacturaXML.Append("<Pago>"); FacturaXML.Append("</Pago>"); FacturaXML.Append("<Fecha>"); FacturaXML.Append(textBox7.Text); FacturaXML.Append("</Fecha>"); FacturaXML.Append("</Encabezado>"); FacturaXML.Append("<Cuerpo>"); } }
private void button3_Click(object sender, EventArgs e) { BLL.ClassColores datos = new BLL.ClassColores(); }