Пример #1
0
        private void ConstruiesteRanduriDGV(CDefinitiiComune.EnumRol pTipUtilizator)
        {
            this.dgvListaUtilizatori.IncepeContructieRanduri();

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

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

            this.dgvListaUtilizatori.FinalizeazaContructieRanduri();
        }
Пример #2
0
        private void ConstruiesteRanduriDGV()
        {
            this.dgvListaVenituri.IncepeContructieRanduri();

            BColectieUtilizator listaUtilizatori = BUtilizator.GetListByParam(CDefinitiiComune.EnumStare.Activa, CDefinitiiComune.EnumRol.Nedefinit, null);

            BColectieUtilizatoriVenituri listaVenituri          = BUtilizatoriVenituri.getByListaId(listaUtilizatori.GetListaId(), null);
            Dictionary <int, Tuple <double, double> > dictTotal = BClientiComenziEtape.GetListaVenituri(this.ctrlPerioada.DataInceput, this.ctrlPerioada.DataSfarsit, null);

            foreach (var elem in listaUtilizatori)
            {
                incarcaRand(this.dgvListaVenituri.Rows[this.dgvListaVenituri.Rows.Add()], elem, listaVenituri.GetVenituriActiveInPerioada(elem.Id, this.ctrlPerioada.DataInceput, this.ctrlPerioada.DataSfarsit), dictTotal.ContainsKey(elem.Id) ? dictTotal[elem.Id] : null);
            }

            this.lblTotal.Text = string.Format("{0}: {1}", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ElementeGasite), this.dgvListaVenituri.RowCount.ToString());

            this.dgvListaVenituri.FinalizeazaContructieRanduri();
        }
Пример #3
0
        private void CtrlValidareAnulare_Validare(object sender, EventArgs e)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BColectieUtilizator listaUtilizatoriExistenti = BUtilizator.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, CDefinitiiComune.EnumRol.Nedefinit, null);

                //List<string> listaNumePrenumeUtilizatoriExistenti = listaUtilizatoriExistenti.GetNumePrenumeUtilizatori();

                foreach (DataGridViewRow row in this.dgvListaImportPersonal.Rows)
                {
                    StructImportPersonal personal     = (StructImportPersonal)row.Tag;
                    BUtilizator          userExistent = listaUtilizatoriExistenti.GetByIdentitate(string.Concat(personal.Nume, personal.Prenume).ToLower().Replace(" ", ""));

                    if (userExistent == null)
                    {
                        BUtilizator.Add(personal.Nume, personal.Prenume, personal.DataNastere, personal.TelefonMobil, null);
                    }
                }

                inchideEcranulOK();
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void ConstruiesteRanduriDGV()
        {
            this.dgvListaUtilizatori.IncepeContructieRanduri();

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

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

            this.dgvListaUtilizatori.FinalizeazaContructieRanduri();

            int totalUtilizatori = this.dgvListaUtilizatori.RowCount;

            if (totalUtilizatori == 1)
            {
                this.lblTotalUtilizatori.Text = totalUtilizatori + BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ElementGasit);
            }
            else
            {
                this.lblTotalUtilizatori.Text = totalUtilizatori + BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ElementeGasite);
            }
        }
Пример #5
0
        public static BUtilizator Afiseaza(Form pEcranPariente, CDefinitiiComune.EnumRol pRol)
        {
            return(Caramizi.frmListaObiecte <BUtilizator> .Afiseaza <BUtilizator>(pEcranPariente, BUtilizator.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, pRol, null), string.Empty, CDL.iStomaLab.CDefinitiiComune.EnumTipSelectie.SelectieUnica));

            //using (FormListaUtilizatori ecran = new FormListaUtilizatori(pRol))
            //{

            //    if (CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran))
            //        return ecran.lUtilizator;
            //}
            //return null;
        }