private void Total()
{
double totbed = 0;
double totbes = 0;
int i = 0;
for (i = 0; i < dgv_Article.Rows.Count; i++)
{
totbed = totbed + Convert.ToDouble(dgv_Article.Rows[i].Cells["col_bed"].Value);
totbes = totbes + Convert.ToDouble(dgv_Article.Rows[i].Cells["col_bes"].Value);
}
lbl_TotBed.Text = string.Format("{0:0000}", totbed.ToString());
lbl_TotBes.Text = string.Format("{0:0000}", totbes.ToString());
lbl_Balance.Text = string.Format("{0:0000}", (totbes - totbed ).ToString());
if ((totbes - totbed) < 0)
lbl_Balance.ForeColor = Color.Green;
if ((totbes - totbed) > 0)
lbl_Balance.ForeColor = Color.Black;
else
lbl_Balance.ForeColor = Color.Red;
}