private void incarcaRand(DataGridViewRow pRand, BClientiComenziEtape pElem)
        {
            pRand.Tag = pElem;

            DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare);

            if (pElem.IdEtapa != 0)
            {
                pRand.Cells[EnumColoaneDGV.colEtapa.ToString()].Value = BEtape.GetEtapaById(pElem.IdEtapa, CDefinitiiComune.EnumStare.Activa, null).Denumire;
            }
            pRand.Cells[EnumColoaneDGV.colDataInceput.ToString()].Value = pElem.DataInceput;

            if (pElem.Refacere)
            {
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colEtapa.ToString());
                pRand.Cells[EnumColoaneDGV.colEtapa.ToString()].ToolTipText = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Refacere);
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colEtapa.ToString());
            }

            pRand.Cells[EnumColoaneDGV.colDataFinal.ToString()].Value = pElem.DataFinal;
            if (pElem.IdTehnician != 0)
            {
                pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = BUtilizator.GetById(pElem.IdTehnician, null).GetNumeCompletUtilizator();
            }
            pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value = pElem.Observatii;
            pRand.Cells[EnumColoaneDGV.colStatus.ToString()].Value     = BClientiComenziEtape.StructStareEtapa.GetStructById(pElem.Status).Denumire;
            DataGridViewPersonalizat.InitCelulaStergere(pRand);
        }
Пример #2
0
        internal static void IncarcaRandUltimaFactura(DataGridViewRow pRand, BClientiFacturi pUltimaFactura, string pNumeColoanaAlerta)
        {
            if (pUltimaFactura != null)
            {
                pRand.Cells[EnumColoaneDGVStandardizate.colUltimaFactura.ToString()].Value       = pUltimaFactura.DataFactura;
                pRand.Cells[EnumColoaneDGVStandardizate.colUltimaFactura.ToString()].ToolTipText = pUltimaFactura.ToString();

                if (DateAndTime.DateDiff(DateInterval.Day, pUltimaFactura.DataFactura, DateTime.Now) > 31)
                {
                    DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGVStandardizate.colUltimaFactura.ToString());
                }
                else
                {
                    DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGVStandardizate.colUltimaFactura.ToString());
                }

                if (!string.IsNullOrEmpty(pNumeColoanaAlerta))
                {
                    DataGridViewPersonalizat.IndeparteazaAlerta(pRand, pNumeColoanaAlerta);
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(pNumeColoanaAlerta))
                {
                    DataGridViewPersonalizat.SeteazaAlerta(pRand, pNumeColoanaAlerta);
                    pRand.Cells[pNumeColoanaAlerta].ToolTipText = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.NuExistaLucrariDeLaAceastaClinica);
                }
            }
        }
Пример #3
0
        private void incarcaRand(DataGridViewRow pRand, BClientiComenzi pElem)
        {
            pRand.Tag = pElem;

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

            pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].Value    = pElem.DenumireLucrare;
            pRand.Cells[EnumColoaneDGV.colNrElemente.ToString()].Value = pElem.NrElemente;
            pRand.Cells[EnumColoaneDGV.colPretUnitar.ToString()].Value = CUtil.GetValoareMonetara(pElem.GetPretUnitar(), pElem.Moneda);
            pRand.Cells[EnumColoaneDGV.colTotal.ToString()].Value      = CUtil.GetValoareMonetara(pElem.ValoareFinala, pElem.Moneda);
            pRand.Cells[EnumColoaneDGV.colFacturat.ToString()].Value   = CUtil.GetValoareMonetara(pElem.GetValoareMoneda(this.ctrlMoneda.Moneda, this.txtCursSchimb.ValoareDouble), this.ctrlMoneda.Moneda);
            pRand.Cells[EnumColoaneDGV.colPacient.ToString()].Value    = pElem.GetNumePrenumePacient();

            if (pElem.EstePretulModificat())
            {
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colTotal.ToString());
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colTotal.ToString());
            }

            DataGridViewPersonalizat.InitCelulaStergere(pRand);
            DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDetaliiLucrare.ToString());
        }
Пример #4
0
        private void incarcaRand(DataGridViewRow pRand, BClientiComenziEtape pElem)
        {
            pRand.Tag = pElem;

            pRand.Cells[EnumColoaneDGV.colDataCreare.ToString()].Value  = pElem.DataCreareLucrare;
            pRand.Cells[EnumColoaneDGV.colDataPrimire.ToString()].Value = pElem.DataPrimireLucrare;
            pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value  = pElem.DataLaGataLucrare;

            pRand.Cells[EnumColoaneDGV.colDataTermen.ToString()].Value = pElem.DataFinal;
            pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value  = pElem.GetIdentitateTehnician();
            pRand.Cells[EnumColoaneDGV.colEtapa.ToString()].Value      = pElem.DenumireEtapa;
            pRand.Cells[EnumColoaneDGV.colStatus.ToString()].Value     = BClientiComenziEtape.StructStareEtapa.GetStructById(pElem.Status).Denumire;
            if (pElem.Refacere)
            {
                pRand.Cells[EnumColoaneDGV.colRefacere.ToString()].Value = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.X);
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colRefacere.ToString());
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colRefacere.ToString());
            }

            pRand.Cells[EnumColoaneDGV.colObservatiiEtapa.ToString()].Value          = pElem.Observatii;
            pRand.Cells[EnumColoaneDGV.colLucrarePrescurtata.ToString()].Value       = pElem.GetDenumirePrescurtataLucrare();
            pRand.Cells[EnumColoaneDGV.colLucrarePrescurtata.ToString()].ToolTipText = pElem.DenumireLucrare;
            DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDeschideLucrare.ToString());
            pRand.Cells[EnumColoaneDGV.colNumarElemente.ToString()].Value = pElem.NumarElemente.ToString();

            if (pElem.Urgent)
            {
                pRand.Cells[EnumColoaneDGV.colUrgenta.ToString()].Value = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.X);
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colUrgenta.ToString());
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colUrgenta.ToString());
            }

            pRand.Cells[EnumColoaneDGV.colObservatiiLucrare.ToString()].Value = pElem.ObservatiiComanda;
            pRand.Cells[EnumColoaneDGV.colClinica.ToString()].Value           = pElem.DenumireClient;
            DataGridViewPersonalizat.InitCelulaDeschideClasic(pRand, EnumColoaneDGV.colDeschideClinica.ToString());
            pRand.Cells[EnumColoaneDGV.colPacient.ToString()].Value = pElem.GetIdentitatePacient();

            pRand.Cells[EnumColoaneDGV.colMoneda.ToString()].Value          = pElem.GetEtichetaMoneda();
            pRand.Cells[EnumColoaneDGV.colValoareInitiala.ToString()].Value = CUtil.GetValoareMonetara(pElem.ValoareInitiala, pElem.Moneda);

            double pretLista    = pElem.ValoareInitiala;
            double pretNegociat = pElem.ValoareFinala;
            double diferenta    = pretLista - pretNegociat;
            double ajustare     = CUtil.GetProcentDinTotal(diferenta, pretLista);

            pRand.Cells[EnumColoaneDGV.colDiscount.ToString()].Value      = CUtil.GetValoareMonetara(ajustare);
            pRand.Cells[EnumColoaneDGV.colValoareFinala.ToString()].Value = CUtil.GetValoareMonetara(pElem.ValoareFinala, pElem.Moneda);
        }
        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());
        }
Пример #6
0
        private void incarcaRand(DataGridViewRow pRand, BClientiComenzi pElem)
        {
            pRand.Tag = pElem;

            idclient  = pElem.IdClient;
            idlucrare = pElem.IdLucrare;

            pRand.Cells[EnumColoaneDGV.colCodLucrareClient.ToString()].Value = pElem.Id;

            pRand.Cells[EnumColoaneDGV.colCodComanda.ToString()].Value = pElem.CodLucrare;
            pRand.Cells[EnumColoaneDGV.colClient.ToString()].Value     = pElem.GetDenumireClinicaCabinet();

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

            if (pElem.IdReprezentantClient != 0)
            {
                pRand.Cells[EnumColoaneDGV.colMedic.ToString()].Value = pElem.GetIdentitateMedic();
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colMedic.ToString()].Value = string.Empty;
            }
            if (pElem.Urgent)
            {
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colLucrare.ToString());
                pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].ToolTipText = string.Format("{0} - {1}", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Urgent), pElem.DenumireLucrare);
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colLucrare.ToString());
                pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].ToolTipText = pElem.DenumireLucrare;
            }

            pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].Value    = pElem.GetDenumirePrescurtata();
            pRand.Cells[EnumColoaneDGV.colNrElemente.ToString()].Value = pElem.NrElemente.ToString();

            if (pElem.IdEtapaCurenta != 0)
            {
                pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].Value = pElem.DenumireEtapa;
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].Value = string.Empty;
            }

            if (pElem.Refacere)
            {
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colEtapaCurenta.ToString());
                pRand.Cells[EnumColoaneDGV.colEtapaCurenta.ToString()].ToolTipText = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Refacere);
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colEtapaCurenta.ToString());
            }

            if (pElem.IdTehnician != 0)
            {
                pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = pElem.GetIdentitateTehnician();
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = string.Empty;
            }

            pRand.Cells[EnumColoaneDGV.colStare.ToString()].Value = pElem.StatusEtapaEticheta;

            if (pElem.DataSfarsitEtapa != CConstante.DataNula)
            {
                pRand.Cells[EnumColoaneDGV.colTermen.ToString()].Value       = pElem.DataSfarsitEtapa;
                pRand.Cells[EnumColoaneDGV.colTermen.ToString()].ToolTipText = CUtil.GetNumeZiSaptamana(pElem.DataSfarsitEtapa.DayOfWeek);
                if (pElem.DataSfarsitEtapa <= DateTime.Today && !pElem.Acceptata)
                {
                    DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colTermen.ToString());
                }
                else
                {
                    DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colTermen.ToString());
                }
            }

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

            pRand.Cells[EnumColoaneDGV.colDataPrimire.ToString()].Value = pElem.DataPrimire;
            if (pElem.DataLaGata != CConstante.DataNula)
            {
                pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value = pElem.DataLaGata;
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colDataLaGata.ToString()].Value = string.Empty;
            }

            if (pElem.DataLaGata.Date <= DateTime.Today && !pElem.Acceptata)
            {
                DataGridViewPersonalizat.SeteazaAlerta(pRand, EnumColoaneDGV.colDataLaGata.ToString());
            }
            else
            {
                DataGridViewPersonalizat.IndeparteazaAlerta(pRand, EnumColoaneDGV.colDataLaGata.ToString());
            }
            pRand.Cells[EnumColoaneDGV.colNumePacient.ToString()].Value = pElem.GetNumePrenumePacient();
            pRand.Cells[EnumColoaneDGV.colObservatii.ToString()].Value  = pElem.Observatii;
            pRand.Cells[EnumColoaneDGV.colDataCreare.ToString()].Value  = pElem.DataCreare;

            if (pElem.IdFactura > 0)
            {
                DataGridViewPersonalizat.SeteazaOK(pRand, EnumColoaneDGV.colNumePacient.ToString());
            }

            BListaPreturiClienti pElemClient = BListaPreturiClienti.GetPretClient(pElem.IdLucrare, pElem.IdClient, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

            pRand.Cells[EnumColoaneDGV.colMoneda.ToString()].Value          = pElem.GetEtichetaMoneda();
            pRand.Cells[EnumColoaneDGV.colValoareInitiala.ToString()].Value = CUtil.GetValoareMonetara(pElem.ValoareInitiala, pElem.Moneda);

            double pretLista    = pElem.ValoareInitiala;
            double pretNegociat = pElem.ValoareFinala;
            double diferenta    = pretLista - pretNegociat;
            double ajustare     = CUtil.GetProcentDinTotal(diferenta, pretLista);

            pRand.Cells[EnumColoaneDGV.colDiscount.ToString()].Value      = CUtil.GetValoareMonetara(ajustare);
            pRand.Cells[EnumColoaneDGV.colValoareFinala.ToString()].Value = CUtil.GetValoareMonetara(pElem.ValoareFinala, pElem.Moneda);
        }