Ejemplo n.º 1
0
        private void ConstruiesteRanduriDGV(BColectieClientiComenzi pListaComenzi)
        {
            this.dgvListaComenzi.IncepeContructieRanduri();
            foreach (var elem in pListaComenzi)
            {
                ///lore 02.09.2019
                BListaPreturiStandard pElem2      = BListaPreturiStandard.getById(elem.IdLucrare, null);
                BListaPreturiClienti  pElemClient = BListaPreturiClienti.GetPretClient(elem.IdLucrare, elem.IdClient, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

                incarcaRand(this.dgvListaComenzi.Rows[this.dgvListaComenzi.Rows.Add()], elem);//, pElem2, pElemClient);
            }
            this.dgvListaComenzi.FinalizeazaContructieRanduri();
            filtreazaDupaText();
        }
Ejemplo n.º 2
0
        private FormDetaliuComanda(BClientiComenzi pComanda, BClienti pClient, BListaPreturiStandard pLucrare)
        {
            this.DoubleBuffered = true;
            InitializeComponent();

            this.lComanda          = pComanda;
            this.lClient           = pClient;
            this.lLucrareSelectata = pLucrare;
            this.lpretnegociat     = BListaPreturiClienti.GetPretClient(pLucrare.Id, pClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

            if (!CCL.UI.IHMUtile.SuntemInDebug())
            {
                adaugaHandlere();
                initTextML();

                this.CentratCuDeplasare();
            }
        }
        private void incarcaRandPretStandard(DataGridViewRow pRand, BListaPreturiStandard pElem, BListaPreturiClienti pElemClient)
        {
            pElemClient = BListaPreturiClienti.GetPretClient(pElem.Id, this.lClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

            pRand.Tag = new Tuple <BListaPreturiStandard, BListaPreturiClienti>(pElem, pElemClient);

            pRand.Cells[EnumColoaneDGV.colLucrare.ToString()].Value      = pElem.Denumire;
            pRand.Cells[EnumColoaneDGV.colMoneda.ToString()].Value       = pElem.GetEtichetaMoneda();
            pRand.Cells[EnumColoaneDGV.colPretStandard.ToString()].Value = pElem.GetValoare();

            if (pElemClient != null)
            {
                pRand.Cells[EnumColoaneDGV.colPretClient.ToString()].Value = pElemClient.GetValoareClient();
                pRand.Cells[EnumColoaneDGV.colAjustare.ToString()].Value   = pElemClient.GetEtichetaAjustare();
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colPretClient.ToString()].Value = pElem.GetValoare();
            }
            pRand.Cells[EnumColoaneDGV.colPretClient.ToString()].Tag = new Tuple <BListaPreturiStandard, BListaPreturiClienti>(pElem, pElemClient);
        }
Ejemplo n.º 4
0
        private void ConstruiesteRanduriDGV()
        {
            this.dgvClientListaPreturi.IncepeContructieRanduri();

            var listaElem = BListaPreturiStandard.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

            foreach (var elem in listaElem)
            {
                incarcaRand(this.dgvClientListaPreturi.Rows[this.dgvClientListaPreturi.Rows.Add()], elem, BListaPreturiClienti.GetPretClient(elem.Id, this.lClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null));
            }

            this.dgvClientListaPreturi.FinalizeazaContructieRanduri();

            this.lblClientTotalPreturi.Text = "Total preturi:" + this.dgvClientListaPreturi.RowCount.ToString();
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        private void ConstruiesteRanduriDGV(BColectieListaPreturiStandard pListaPreturi)
        {
            this.dgvListaLucrari.IncepeContructieRanduri();

            if (this.lClient == null)
            {
                foreach (var elem in pListaPreturi)
                {
                    incarcaRand(this.dgvListaLucrari.Rows[this.dgvListaLucrari.Rows.Add()], elem);
                }
            }
            else
            {
                foreach (var elem in pListaPreturi)
                {
                    incarcaRand(this.dgvListaLucrari.Rows[this.dgvListaLucrari.Rows.Add()], elem, BListaPreturiClienti.GetPretClient(elem.Id, this.lClient.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null));
                }
            }

            this.dgvListaLucrari.FinalizeazaContructieRanduri();
        }