private void incarcaRand(DataGridViewRow pRand, BClientiFacturi pElem, BColectieClientiComenzi pListaComenzi, BColectieClientiPlatiComenzi pListaPlatiCurente)
        {
            pRand.Tag = pElem;
            double valoare     = pElem.GetValoare(pListaComenzi, this.ctrlLeiEuro.Moneda, this.txtCursSchimb.ValoareDouble);
            double platit      = pListaPlatiCurente.GetByIdComenzi(pListaComenzi.GetListaId()).GetValoarePlatita();
            double restDePlata = valoare - platit;

            if (pElem.DataFactura != CConstante.DataNula)
            {
                pRand.Cells[EnumColoaneDGV.colData.ToString()].Value = pElem.DataFactura;
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colData.ToString()].Value = string.Empty;
            }

            pRand.Cells[EnumColoaneDGV.colFactura.ToString()].Value     = pElem.ToStringImprimare();
            pRand.Cells[EnumColoaneDGV.colValoare.ToString()].Value     = CUtil.GetValoareMonetara(valoare);
            pRand.Cells[EnumColoaneDGV.colPlatit.ToString()].Value      = CUtil.GetValoareMonetara(platit);
            pRand.Cells[EnumColoaneDGV.colRestDePlata.ToString()].Value = CUtil.GetValoareMonetara(restDePlata);
            pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value  = pElem.Observatii;

            DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDetaliiFactura.ToString());

            this.lSold  += restDePlata;
            this.lTotal += valoare;
        }
Exemplo n.º 2
0
        public static void Imprima(Form pEcranParinte, BClientiFacturi pFactura)
        {
            if (pFactura == null)
            {
                return;
            }

            lFactura        = pFactura;
            lLocatieFiscala = BLocatii.GetLocatieCurenta();

            //Selectam imprimanta
            using (PrintDocument imprimanta = SetupThePrinting(pEcranParinte, pFactura.ToStringImprimare()))
            {
                if (imprimanta != null)
                {
                    lLiniiRegistru = pFactura.GetListaLucrari(null);

                    using (PrintPreviewDialog ppDialog = new PrintPreviewDialog())
                    {
                        ppDialog.ShowIcon = false;
                        ppDialog.Document = imprimanta;

                        CCL.UI.IHMUtile.DeschideEcran(pEcranParinte, ppDialog);
                    }
                }
            }
        }