private void setNrLinii(int pNrLinii) { double totalRON = 0; double totalEUR = 0; BClientiFacturi factura = null; foreach (DataGridViewRow rand in this.dgvLista.Rows) { if (rand.Visible) { factura = rand.Tag as BClientiFacturi; if (factura.MonedaFactura == CDefinitiiComune.EnumTipMoneda.Euro) { totalEUR += DataGridViewPersonalizat.GetValoareTagColoanaRand(rand, EnumColoaneDGV.colValoare.ToString()); } else { totalRON += DataGridViewPersonalizat.GetValoareTagColoanaRand(rand, EnumColoaneDGV.colValoare.ToString()); } } } this.lblTotal.Text = string.Format("{0}: {1} [{2}: {3}]", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Comenzi), pNrLinii, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Total), CUtil.getValoareMonetaraLeiPlusEuro(totalRON, totalEUR)); }
private void setNrLinii(int pNrLinii) { double totalRON = 0; BClientiPlati plata = null; this.lTotalIncasariInRON = 0; double valTemp = 0; foreach (DataGridViewRow rand in this.dgvLista.Rows) { if (rand.Visible) { plata = rand.Tag as BClientiPlati; valTemp = DataGridViewPersonalizat.GetValoareTagColoanaRand(rand, EnumColoaneDGV.colValoare.ToString()); totalRON += valTemp; } } this.lTotalIncasariInRON = totalRON; this.lblTotal.Text = string.Format("{0}: {1} [{2}: {3}]", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Incasari), this.dgvLista.RowCount, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Total), CUtil.GetValoareMonetara(totalRON)); }
private void setTotalFacturi() { double totalRON = 0; double totalEUR = 0; this.lTotalFacturiInRON = 0; BClientiFacturi factura = null; double valTemp = 0; foreach (DataGridViewRow rand in this.dgvFacturi.Rows) { if (rand.Visible) { factura = rand.Tag as BClientiFacturi; valTemp = DataGridViewPersonalizat.GetValoareTagColoanaRand(rand, EnumColoaneDGVFacturi.colValoare.ToString()); if (factura.MonedaFactura == CDefinitiiComune.EnumTipMoneda.Euro) { totalEUR += valTemp; this.lTotalFacturiInRON += CUtil.GetValoareMoneda(valTemp, factura.MonedaFactura, factura.CursBNR, CDefinitiiComune.EnumTipMoneda.Lei); } else { totalRON += valTemp; this.lTotalFacturiInRON += valTemp; } } } this.lblTotalFacturi.Text = string.Format("{0}: {1} [{2}: {3}]", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Facturi), this.dgvFacturi.RowCount, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Total), CUtil.getValoareMonetaraLeiPlusEuro(totalRON, totalEUR)); }