Exemple #1
0
 private bool verificaParolaIntrodusa()
 {
     if (BUtilizator.Conectare(BUtilizator.GetUtilizatorConectat().ContStoma, this.txtParolaPauza.Text, BStatiiDeLucruUtilizatori.GetPreferinteUtilizatorConectat(null).PastreazaConectat, null) != null)
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
        private bool verificaParolaIntrodusa()
        {
            BUtilizator user = BUtilizator.GetUtilizatorConectat();

            //   _UtilizatorConectat = getByUserSiPass(pUser, CCL.iStomaLab.Utile.CSecuritate.GetMd5Hash(pParola), pTranzactie);

            //aici e problema pauza
            if (BUtilizator.Conectare(user.ContStoma, this.txtParolaPauza.Text, BStatiiDeLucruUtilizatori.GetPreferinteUtilizatorConectat(user.Id, null).PastreazaConectat, null) != null)
            {
                return(true);
            }
            return(false);
        }
        public EcranPrincipal()
        {
            if (BUtilizator.GetUtilizatorConectat() == null)
            {
                FormLogin.Afiseaza(null);
            }

            this.DoubleBuffered = true;
            InitializeComponent();

            if (!CCL.UI.IHMUtile.SuntemInDebug())
            {
                adaugaHandlere();
                initTextML();
            }
        }
Exemple #4
0
        /// <summary>
        /// Metoda de instanta ce permite inchiderea(dezactivarea) obiectului
        /// </summary>
        /// <param name="pInchidere">inchidem sau activam?</param>
        /// <param name="pMotivInchidere">Motivul inchiderii</param>
        /// <param name="pTranzactie">Tranzactia</param>
        /// <remarks>Exceptie daca nu se poate identifica obiectul</remarks>
        public void Close(bool pInchidere, string pMotivInchidere, IDbTransaction pTranzactie)
        {
            BUtilizator UserInchidere = BUtilizator.GetUtilizatorConectat();

            if (this.Id <= 0)
            {
                throw new IdentificareBazaImposibilaException("BDocumenteInline");
            }
            IDbTransaction Tranzactie = null;

            try
            {
                if (pTranzactie == null)
                {
                    Tranzactie = CCerereSQL.GetTransactionOnConnection();
                }
                else
                {
                    Tranzactie = pTranzactie;
                }
                //Inchidem obiectul in baza de date
                DDocumenteInline.CloseById(UserInchidere.Id, this.Id, pInchidere, pMotivInchidere, Tranzactie);

                if (pTranzactie == null)
                {
                    //Facem Comit tranzactiei doar daca aceasta nu a fost transmisa in parametru. Altfel comitul va fi gestionat de functia apelanta
                    CCerereSQL.CloseTransactionOnConnection(Tranzactie, true);
                }
            }
            catch (Exception)
            {
                if ((pTranzactie == null) && (Tranzactie != null))
                {
                    CCerereSQL.CloseTransactionOnConnection(Tranzactie, false);
                }
                throw;
            }
            finally
            {
                //Reinitializam obiectul pentru a recupera, printre altele, data de inchidere generata de baza de date
                this.Refresh(pTranzactie);
            }
        }