private void initColoanaValoareFacturata() { BClientiFacturi facturaTemp = null; CDefinitiiComune.EnumTipMoneda moneda = this.ctrlLeiEuro.Moneda; double cursSchimb = this.txtCursSchimb.ValoareDouble; Dictionary <int, BColectieClientiComenzi> dictFacturiComenzi = getDictFacturiComenzi(); BColectieClientiComenzi comenziTemp = new BColectieClientiComenzi(); foreach (DataGridViewRow rand in this.dgvListaFacturi.Rows) { facturaTemp = rand.Tag as BClientiFacturi; if (dictFacturiComenzi.ContainsKey(facturaTemp.Id)) { comenziTemp = dictFacturiComenzi[facturaTemp.Id]; } else { comenziTemp = new BColectieClientiComenzi(); } DataGridViewPersonalizat.InitCelulaValoareMonetara(rand, EnumColoaneDGV.colValoare.ToString(), facturaTemp.GetValoare(comenziTemp, moneda, cursSchimb), moneda); } }
private void incarcaRand(DataGridViewRow pRand, BEtape pEtapa, BUtilizatoriVenituriDetalii pVenitDetalii) { pRand.Tag = pVenitDetalii; pRand.Cells[EnumColoaneDGV.colEtapa.ToString()].Value = pEtapa.Denumire; pRand.Cells[EnumColoaneDGV.colEtapa.ToString()].Tag = pEtapa; if (pVenitDetalii != null) { DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colPret.ToString(), pVenitDetalii.Pret); } }
private void initColoanaValoareFacturata() { BClientiComenzi lucrareTemp = null; CDefinitiiComune.EnumTipMoneda moneda = this.ctrlMoneda.Moneda; double cursSchimb = this.txtCursSchimb.ValoareDouble; foreach (DataGridViewRow rand in this.dgvLista.Rows) { lucrareTemp = rand.Tag as BClientiComenzi; DataGridViewPersonalizat.InitCelulaValoareMonetara(rand, EnumColoaneDGV.colFacturat.ToString(), lucrareTemp.GetValoareMoneda(moneda, cursSchimb), moneda); } }
private void incarcaRand(DataGridViewRow pRand, BClientiComenziEtape pElem) { pRand.Tag = pElem; pRand.Cells[EnumColoaneDGV.colDataInceput.ToString()].Value = pElem.DataInceput; pRand.Cells[EnumColoaneDGV.colDenumireLucrare.ToString()].Value = pElem.DenumireLucrare; pRand.Cells[EnumColoaneDGV.colDenumirePacient.ToString()].Value = pElem.GetIdentitatePacient(); pRand.Cells[EnumColoaneDGV.colClinica.ToString()].Value = pElem.DenumireClient; pRand.Cells[EnumColoaneDGV.colEtapa.ToString()].Value = pElem.DenumireEtapa; DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colNrElemente.ToString(), pElem.NumarElemente); pRand.Cells[EnumColoaneDGV.colValoare.ToString()].Value = pElem.ValoareFinala; pRand.Cells[EnumColoaneDGV.colPret.ToString()].Value = pElem.Venit; this.dgvListaDetaliat.SeteazaFontIngrosat(pRand, EnumColoaneDGV.colPret.ToString()); }
private void incarcaRandIncasare(DataGridViewRow pRand, BClientiPlati pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGVIncasari.colData.ToString()].Value = pElem.DataPlata; pRand.Cells[EnumColoaneDGVIncasari.colModalitate.ToString()].Value = BDefinitiiGenerale.StructModalitatePlata.GetStringByEnum((BDefinitiiGenerale.EnumModalitatePlata)pElem.ModalitatePlata); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVIncasari.colValoare.ToString(), pElem.SumaPlatita, CDefinitiiComune.EnumTipMoneda.Lei); pRand.Cells[EnumColoaneDGVFacturi.colObservatii.ToString()].Value = pElem.Observatii; pRand.Cells[EnumColoaneDGVIncasari.colCursBNR.ToString()].Value = pElem.CursBNR; DataGridViewPersonalizat.InitCelulaStergere(pRand); }
private void incarcaRand(DataGridViewRow pRand, double pSold, int pId, BClienti pClinica, BClientiComenzi pUltimaLucrare, BClientiFacturi pUltimaFactura, int pNrLucrariNefacturate) { pRand.Tag = pClinica; pRand.Cells[EnumColoaneDGV.colClient.ToString()].Value = pClinica.Denumire; DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDeschideDosar.ToString()); DataGridViewPersonalizat.InitCeluleTelefonEmail(pRand, pClinica.TelefonMobil, pClinica.AdresaMail); pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pClinica.ObservatiiDateClinica; DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colSold.ToString(), pSold); IHMUtile.IncarcaRandUltimaLucrare(pRand, pUltimaLucrare); IHMUtile.IncarcaRandUltimaFactura(pRand, pUltimaFactura); DataGridViewPersonalizat.InitCelulaValoareNumerica(pRand, EnumColoaneDGV.colTotalLucrariNefact.ToString(), pNrLucrariNefacturate); DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colSold.ToString()); }
private void incarcaRand(DataGridViewRow pRand, BClientiFacturi pElem, BColectieClientiComenzi pListaLucrari, BColectieClientiPlatiComenzi pListaPlatiPeFact) { pRand.Tag = pElem; double valoare = pListaLucrari.GetValoareTotalaFactura(CDefinitiiComune.EnumTipMoneda.Lei, pElem.CursBNR); double achitat = pListaPlatiPeFact.GetValoarePlatita(); DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); if (pElem.EsteFiscalizata()) { pRand.Cells[EnumColoaneDGV.colTipDocument.ToString()].Value = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Factura); DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colTipDocument.ToString()); } else { pRand.Cells[EnumColoaneDGV.colTipDocument.ToString()].Value = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Proforma); DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colTipDocument.ToString()); } pRand.Cells[EnumColoaneDGV.colDataEmiterii.ToString()].Value = pElem.DataFactura; pRand.Cells[EnumColoaneDGV.colSerieFactura.ToString()].Value = pElem.SerieFactura; pRand.Cells[EnumColoaneDGV.colNumarFactura.ToString()].Value = pElem.NumarFactura; pRand.Cells[EnumColoaneDGV.colClinica.ToString()].Value = pElem.DenumireClient; DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colValoare.ToString(), valoare, CDefinitiiComune.EnumTipMoneda.Lei); //pRand.Cells[EnumColoaneDGV.colValoare.ToString()].Value = ; if (pElem.MonedaFactura != CDefinitiiComune.EnumTipMoneda.Lei) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colValoare.ToString()); } pRand.Cells[EnumColoaneDGV.colValoare.ToString()].ToolTipText = CUtil.GetValoareMonetara(valoare, pElem.MonedaFactura); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colAchitat.ToString(), achitat, CDefinitiiComune.EnumTipMoneda.Lei); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colRestPlata.ToString(), valoare - achitat, CDefinitiiComune.EnumTipMoneda.Lei); pRand.Cells[EnumColoaneDGV.colCursBNR.ToString()].Value = pElem.CursBNR; pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii; DataGridViewPersonalizat.InitCelulaStergere(pRand); DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDetaliiClinica.ToString()); }
private void incarcaRand(DataGridViewRow pRand, BUtilizator pElem, BColectieUtilizatoriVenituri pVenituri, Tuple <double, double> pTotal) { pRand.Tag = pElem; pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = pElem.GetNumeCompletUtilizator(); if (!CUtil.EsteListaVida <BUtilizatoriVenituri>(pVenituri)) { pRand.Cells[EnumColoaneDGV.colTipVenit.ToString()].Value = pVenituri.ToString(); } this.dgvListaVenituri.SeteazaFontIngrosat(pRand, EnumColoaneDGV.colTotal.ToString()); if (pTotal != null) { DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colNrElemente.ToString(), pTotal.Item1); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGV.colTotal.ToString(), pTotal.Item2); } DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDetalii.ToString()); }
private void incarcaRand(DataGridViewRow pRand, BClientiFacturi pElem, BColectieClientiComenzi pListaLucrari, BColectieClientiPlatiComenzi pListaPlatiPeFact) { pRand.Tag = pElem; double valoare = pListaLucrari.GetValoareTotalaFactura(CDefinitiiComune.EnumTipMoneda.Lei, pElem.CursBNR); double achitat = pListaPlatiPeFact.GetValoarePlatita(); //pListaPlatiPeFact.GetSumaPlatita(); DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGVFacturi.colDataEmiterii.ToString()].Value = pElem.DataFactura; pRand.Cells[EnumColoaneDGVFacturi.colTipDocument.ToString()].Value = pElem.ToStringTipDocument(); pRand.Cells[EnumColoaneDGVFacturi.colSerieFactura.ToString()].Value = pElem.SerieFactura; pRand.Cells[EnumColoaneDGVFacturi.colNumarFactura.ToString()].Value = pElem.NumarFactura != 0 ? pElem.NumarFactura: pElem.Id; DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVFacturi.colValoare.ToString(), valoare, CDefinitiiComune.EnumTipMoneda.Lei); if (pElem.MonedaFactura != CDefinitiiComune.EnumTipMoneda.Lei) { DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGVFacturi.colValoare.ToString()); } pRand.Cells[EnumColoaneDGVFacturi.colValoare.ToString()].ToolTipText = CUtil.GetValoareMonetara(valoare, pElem.MonedaFactura); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVFacturi.colPlatit.ToString(), achitat, CDefinitiiComune.EnumTipMoneda.Lei); DataGridViewPersonalizat.InitCelulaValoareMonetara(pRand, EnumColoaneDGVFacturi.colRest.ToString(), valoare - achitat, CDefinitiiComune.EnumTipMoneda.Lei); if (valoare - achitat != 0) { DataGridViewPersonalizat.SeteazaCuloareTextCelula(pRand, EnumColoaneDGVFacturi.colRest.ToString(), Color.Red); } else { DataGridViewPersonalizat.SeteazaCuloareTextCelula(pRand, EnumColoaneDGVFacturi.colRest.ToString(), Color.Black); } pRand.Cells[EnumColoaneDGVFacturi.colCursBNR.ToString()].Value = pElem.CursBNR; pRand.Cells[EnumColoaneDGVFacturi.colObservatii.ToString()].Value = pElem.Observatii; DataGridViewPersonalizat.InitCelulaStergere(pRand); }