예제 #1
0
        private void bt_Reporte_Click(object sender, EventArgs e)
        {
            ReporteTxt r = new ReporteTxt(inv.ToString());

            r.ShowDialog();

            string[] row = new string[4];
            dgv_Reporte.Rows.Clear();

            for (int i = 0; i < inv._inventario.Length; i++)
            {
                if (inv._inventario[i] != null)
                {
                    row[0] = inv._inventario[i].Articulo.ID.ToString();
                    row[1] = inv._inventario[i].Articulo.Nombre;
                    row[2] = inv._inventario[i].Cantidad.ToString();
                    row[3] = inv._inventario[i].Articulo.Precio.ToString("c2");
                }
                else
                {
                    row[0] = "";
                    row[1] = "";
                    row[2] = "";
                    row[3] = "";
                }
                dgv_Reporte.Rows.Add(row);
            }
        }
예제 #2
0
        private void bt_Reporte_Click(object sender, EventArgs e)
        {
            ReporteTxt r = new ReporteTxt(inv.ToString());

            r.ShowDialog();

            string[] row = new string[4];
            dgv_Reporte.Rows.Clear();

            EntradaInv temp = inv.Primero;

            while (temp != null)
            {
                row[0] = temp.Articulo.ID.ToString();
                row[1] = temp.Articulo.Nombre;
                row[2] = temp.Cantidad.ToString();
                row[3] = temp.Articulo.Precio.ToString("c2");
                dgv_Reporte.Rows.Add(row);
                temp = temp.Siguiente;
            }
        }
예제 #3
0
        private void bt_Reporte_Inverso_Click(object sender, EventArgs e)
        {
            ReporteTxt r = new ReporteTxt(inv.ReporteInverso());

            r.ShowDialog();

            EntradaInv temp = inv.Ultimo;

            dgv_Reporte.Rows.Clear();
            while (temp != null)
            {
                dgv_Reporte.Rows.Add(new string[]
                {
                    temp.Articulo.ID.ToString(),
                    temp.Articulo.Nombre,
                    temp.Cantidad.ToString(),
                    temp.Articulo.Precio.ToString("c2")
                });
                temp = temp.Anterior;
            }
        }