private void btnConfirmar_Click(object sender, EventArgs e) { if (txtDesc.Text != "" && txtPrecioLista.Text != "" && txtPrecioOferta.Text != "" && txtCantidad.Text != "" && txtCodigo.Text != "") { Oferta of; if (ProveSeleccionado != "") { of = new Oferta(txtCodigo.Text, Convert.ToDecimal(txtPrecioOferta.Text), Convert.ToDecimal(txtPrecioLista.Text), dtpFechaPub.Value.Date, dtpFechaVec.Value.Date, Convert.ToDecimal(txtCantidad.Text), txtDesc.Text, 1, ProveSeleccionado, Convert.ToDecimal(txtCantxCli.Text)); } else { of = new Oferta(txtCodigo.Text, Convert.ToDecimal(txtPrecioOferta.Text), Convert.ToDecimal(txtPrecioLista.Text), dtpFechaPub.Value.Date, dtpFechaVec.Value.Date, Convert.ToDecimal(txtCantidad.Text), txtDesc.Text, 1, AdmProveedores.obtenerCuitDelUsuario(Login.username), Convert.ToDecimal(txtCantxCli.Text)); } int filas = AdmOfertas.altaOferta(of); if (filas > 0) { MessageBox.Show("Oferta creada correctamente"); Form1 f1 = new Form1(); f1.Show(); this.Hide(); } else { MessageBox.Show("Error en la creacion"); } } else { MessageBox.Show("Complete todos los campos obligatorios"); } }
public Canje(DateTime _fechaConsumo, Oferta _oferta, Cliente _cliente) { this.fecha_consumo = _fechaConsumo; this.oferta = _oferta; this.cliente = _cliente; }
public Cupon(DateTime _fechaCompra, Oferta _ofertaReferida, Cliente _cliente) { this.fecha_compra = _fechaCompra; this.oferta_referencia = _ofertaReferida; this.cliente = _cliente; }