Пример #1
0
 public List <Clasedatosinformepago> CargarPagos()
 {
     try
     {
         Guid miGuid = Guid.NewGuid();
         token = Convert.ToBase64String(miGuid.ToByteArray());
         token = token.Replace("=", "").Replace("+", "");
         foreach (var item in valor.SelectedItems.Cast <ListViewItem>())
         {
             Clasedatosinformepago informeAgenda = new Clasedatosinformepago();
             FormReporte           reporte       = new FormReporte();
             informeAgenda.NombreCompleto = item.SubItems[0].Text.ToString();
             informeAgenda.nombreArticulo = item.SubItems[1].Text.ToString();
             informeAgenda.domicilio      = item.SubItems[2].Text.ToString();
             informeAgenda.telefono       = item.SubItems[3].Text.ToString();
             informeAgenda.cantidad       = Convert.ToInt32(item.SubItems[4].Text.ToString());
             informeAgenda.precio         = Convert.ToDouble(item.SubItems[5].Text.ToString());
             informeAgenda.total          = Convert.ToDouble(item.SubItems[5].Text.ToString());
             informeAgenda.Sfolio         = item.SubItems[7].Text.ToString();
             reportes1.Add(informeAgenda);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error! " + ex);
     }
     return(reportes1);
 }
Пример #2
0
 public void generateinvoice()
 {
     try
     {
         //    Int32 AB = 0;
         //    foreach (ListViewItem I in LvPagos.Items)
         //    {
         //        AB += int.Parse(I.SubItems[3].Text);
         //        String resultado = AB.ToString();
         //    }
         //    int rest = Convert.ToInt32(txtcantidad.Text) * AB;
         DatosReporte datos = new DatosReporte();
         datos.nombreCompleto = cmbCliente.Text;
         datos.NombreArticulo = txtArticulo.Text;
         datos.telefono       = lvtel.Text;
         datos.direccion      = lvDireccion.Text;
         datos.comentario     = lvcomment.Text;
         //datos.total = AB;
         //datos.Precio = AB;
         datos.Precio         = Convert.ToDouble(txtPrecio.Text);
         datos.subtotal       = Convert.ToDouble(txtPrecio.Text) * Convert.ToDouble(txtcantidad.Text);
         datos.iva            = Convert.ToDouble(txtPrecio.Text) * Convert.ToDouble(txtiva.Text) / 100;
         datos.totalArticulos = Convert.ToInt32(txtcantidad.Text);
         datos.total          = datos.iva + datos.subtotal;
         datos.fechaPago      = dtpFechaPago.Text;
         FormReporte fr = new FormReporte();
         //fr.datosReportes.Add(datos);
         fr.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "MTtech", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
        private void btnreporte_Click(object sender, EventArgs e)
        {
            reportes1.Clear();
            FormMenuPrincipal formMenu = new FormMenuPrincipal();

            CargarPagos();
            FormReporte reporte = new FormReporte();

            reporte.ShowDialog();
        }