Пример #1
0
        private void btnAtualizar_Click(object sender, EventArgs e)
        {
            float b1 = 0;

            dgvVenda.DataSource = vend.ListarVendas();
            for (int i = 0; i < dgvVenda.Rows.Count; i++)
            {
                b1 += Convert.ToInt32(dgvVenda.Rows[i].Cells[4].Value);
            }

            lblTotal.Text = b1.ToString();
        }