Exemple #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Cls_N_ReportesCompras.acumulador = 0;
            ArrayList temp = new ArrayList();

            temp.Clear();
            foreach (DataGridViewRow fila in dgBoleta.Rows)
            {
                if (fila.Cells[3].Value.ToString() == dtFecha.Value.ToShortDateString() && fila.Cells[8].Value.ToString() != "0")
                {
                    Cls_N_ReportesCompras objN       = new Cls_N_ReportesCompras();
                    Cls_E_Boleta          objEBoleta = new Cls_E_Boleta();
                    objEBoleta.Serie    = fila.Cells[0].Value.ToString();
                    objEBoleta.Numero   = fila.Cells[1].Value.ToString();
                    objEBoleta.Empleado = fila.Cells[2].Value.ToString();
                    objEBoleta.Fecha    = Convert.ToDateTime(fila.Cells[3].Value.ToString());
                    objEBoleta.Cliente  = fila.Cells[4].Value.ToString();
                    objEBoleta.Subtotal = double.Parse(fila.Cells[5].Value.ToString());
                    objEBoleta.Igv      = double.Parse(fila.Cells[6].Value.ToString());
                    objEBoleta.Total    = double.Parse(fila.Cells[7].Value.ToString());
                    objEBoleta.Estado   = fila.Cells[8].Value.ToString();
                    temp.Add(objEBoleta);
                }
            }
            dgConsultaBoleta.DataSource = null;
            dgConsultaBoleta.DataSource = temp;
            foreach (Cls_E_Boleta item in temp)
            {
                Cls_N_ReportesCompras.acumulador = Cls_N_ReportesCompras.acumulador + item.Total;
            }
            txtTotal.Text = Cls_N_ReportesCompras.acumulador.ToString();
            mtdPintarCeldas();
        }
Exemple #2
0
        private void BtnVerRangoFecha_Click(object sender, EventArgs e)
        {
            Cls_N_ReportesCompras.acumulador = 0;
            ArrayList temp        = new ArrayList();
            DateTime  fechainicio = Convert.ToDateTime(dtFechainicio.Value.ToShortDateString());
            DateTime  fechafin    = Convert.ToDateTime(dtFechaFin.Value.ToShortDateString());
            DateTime  fecha;

            foreach (DataGridViewRow fila in dgBoleta.Rows)
            {
                fecha = Convert.ToDateTime(fila.Cells[3].Value);
                if (fecha >= fechainicio && fecha <= fechafin && fila.Cells[8].Value.ToString() != "0")
                {
                    Cls_E_Boleta          objE       = new Cls_E_Boleta();
                    Cls_N_ReportesCompras objN       = new Cls_N_ReportesCompras();
                    Cls_E_Boleta          objEBoleta = new Cls_E_Boleta();
                    objEBoleta.Serie    = fila.Cells[0].Value.ToString();
                    objEBoleta.Numero   = fila.Cells[1].Value.ToString();
                    objEBoleta.Empleado = fila.Cells[2].Value.ToString();
                    objEBoleta.Fecha    = Convert.ToDateTime(fila.Cells[3].Value.ToString());
                    objEBoleta.Cliente  = fila.Cells[4].Value.ToString();
                    objEBoleta.Subtotal = double.Parse(fila.Cells[5].Value.ToString());
                    objEBoleta.Igv      = double.Parse(fila.Cells[6].Value.ToString());
                    objEBoleta.Total    = double.Parse(fila.Cells[7].Value.ToString());
                    objEBoleta.Estado   = fila.Cells[8].Value.ToString();
                    temp.Add(objEBoleta);
                    Cls_N_ReportesCompras.acumulador = Cls_N_ReportesCompras.acumulador + float.Parse(fila.Cells[7].Value.ToString());
                }
            }
            dgConsultaBoleta.DataSource = null;
            dgConsultaBoleta.DataSource = temp;
            txtTotal.Text = Cls_N_ReportesCompras.acumulador.ToString();
        }
Exemple #3
0
        private void BtnRefrescar_Click(object sender, EventArgs e)
        {
            Cls_N_ReportesCompras objN = new Cls_N_ReportesCompras();

            Aboleta             = objN.MtdLeerBoleta();
            dgBoleta.DataSource = null;
            dgBoleta.DataSource = Aboleta;
        }
Exemple #4
0
        private void Form_VerComprasDia_Load(object sender, EventArgs e)
        {
            Aboleta.Clear();
            Cls_N_ReportesCompras objN = new Cls_N_ReportesCompras();

            Aboleta             = objN.MtdLeerBoleta();
            dgBoleta.DataSource = null;
            dgBoleta.DataSource = Aboleta;
            mtdPintarCeldas();
        }
Exemple #5
0
        private void DgConsultaBoleta_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            Cls_N_ReportesCompras objN = new Cls_N_ReportesCompras();

            dgBoleta.DataSource = null;
        }