Example #1
0
        private void ConstruiesteRanduriDGV()
        {
            var listaElem = BProfesii.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Toate, null);

            if (listaElem.ContineElementeDeactivate())
            {
                this.btnActiviInactivi.Visible = true;
            }
            else
            {
                this.btnActiviInactivi.Visible  = false;
                this.btnActiviInactivi.Selectat = false;
            }


            if (!this.btnActiviInactivi.Selectat)
            {
                ConstruiesteRanduriDGV(listaElem.GetListaActive());
            }
            else
            {
                ConstruiesteRanduriDGV(listaElem.GetListaInactive());
            }
        }
        private void ConstruiesteRanduriDGV(bool pAfiseazaElemInchise)
        {
            this.dgvListaProfesii.IncepeContructieRanduri(pAfiseazaElemInchise);

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

            foreach (var elem in listaElem)
            {
                incarcaRand(this.dgvListaProfesii.Rows[this.dgvListaProfesii.Rows.Add()], elem);
            }

            this.dgvListaProfesii.FinalizeazaContructieRanduri();

            int totalProfesii = this.dgvListaProfesii.RowCount;

            if (totalProfesii == 1)
            {
                this.lblTotalProfesie.Text = totalProfesii.ToString() + BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ElementGasit);
            }
            else
            {
                this.lblTotalProfesie.Text = totalProfesii.ToString() + BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ElementeGasite);
            }
        }