Example #1
0
        private void incarcaRand(DataGridViewRow pRand, BListaPreturiStandard pElem, BListaPreturiClienti pPretClient)
        {
            pRand.Tag = new Tuple <BListaPreturiStandard, BListaPreturiClienti>(pElem, pPretClient);

            DataGridViewPersonalizat.InitCelulaSelectieUnica(pRand, this.lEcranInModificare);
            pRand.Cells[EnumColoaneDGV.colDenumire.ToString()].Value = pElem.Denumire;
            pRand.Cells[EnumColoaneDGV.colPret.ToString()].Value     = pElem.ValoareRON == 0 ? pElem.ValoareEUR : pElem.ValoareRON;
            if (pPretClient != null)
            {
                pRand.Cells[EnumColoaneDGV.colPret.ToString()].Value = pPretClient.GetValoareClient();
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colPret.ToString()].Value = pElem.ValoareRON == 0 ? pElem.ValoareEUR : pElem.ValoareRON;
            }
            pRand.Cells[EnumColoaneDGV.colMoneda.ToString()].Value = pElem.ValoareRON == 0 ? CUtil.getText(1265) : CUtil.getText(1264);
        }
        private void incarcaRand(DataGridViewRow pRand, BListaPreturiStandard pElem, BListaPreturiClienti pPretClient)
        {
            pRand.Tag = new Tuple <BListaPreturiStandard, BListaPreturiClienti>(pElem, pPretClient);

            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 (pPretClient != null)
            {
                pRand.Cells[EnumColoaneDGV.colPretClient.ToString()].Value = pPretClient.GetValoareClient();
                pRand.Cells[EnumColoaneDGV.colAjustare.ToString()].Value   = pPretClient.GetEtichetaAjustare();
            }
            else
            {
                pRand.Cells[EnumColoaneDGV.colPretClient.ToString()].Value = pElem.ValoareRON == 0 ? pElem.ValoareEUR : pElem.ValoareRON;
            }
        }
        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);
        }