Esempio n. 1
0
        private void CtrlValidareAnulareCheck_Validare(object sender, EventArgs e)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                if (this.panelDetaliiCheck.Visible == false)
                {
                    CCL.UI.Mesaj.Afiseaza(this, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.InformareSelectareUtilizator));
                }
                else
                {
                    var listaElem = BPontaj.GetListByIdUtilizator(FormListaUtilizatori._SUtilizator.Id, null);

                    int tipPontaj = listaElem.Count > 0 ? listaElem[listaElem.Count - 1].TipPontaj : 0;

                    if (salveaza(tipPontaj))
                    {
                        inchideEcranulOK();
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Esempio n. 2
0
        private void ConstruiesteRanduriDGV()
        {
            this.dgvListaCheckAstazi.IncepeContructieRanduri();

            var listaElem = BPontaj.GetListByIdUtilizator(FormListaUtilizatori._SUtilizator.Id, null);

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

            this.dgvListaCheckAstazi.FinalizeazaContructieRanduri();
        }
Esempio n. 3
0
        private void LblGasesteUtilizator_DeschideEcranCautare(Control psender, object pxObiectExistent)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                if (FormListaUtilizatori.Afiseaza(this, this.Location.X, this.Location.Y))
                {
                    if (FormListaUtilizatori._SUtilizator != null)
                    {
                        this.lblGasesteUtilizator.Text = BUtilizator.GetNumePrenumeUtilizator(FormListaUtilizatori._SUtilizator.Id, null);
                        this.panelDetaliiCheck.Visible = true;

                        BColectiePontaj listaElem = BPontaj.GetListByIdUtilizator(FormListaUtilizatori._SUtilizator.Id, null);

                        if (listaElem.Count > 0)
                        {
                            getDataSourcePentruComboTip(listaElem);

                            this.lblDurata.Visible       = true;
                            this.lblUltimulCheck.Visible = true;

                            this.lblUltimulCheck.Text = BDefinitiiGenerale.StructCheckInOut.GetDenumireTip(listaElem[0].TipPontaj) + ": " + getStringFromDate(listaElem[0].DataPontaj);

                            if (listaElem[listaElem.Count - 1].TipPontaj == 2)
                            {
                                this.lblDurata.Text = CUtil.GetTextDurataOreMinute(getNrMinuteZiTerminata(listaElem[0].DataPontaj, listaElem[listaElem.Count - 1].DataPontaj));
                            }
                            else
                            {
                                this.lblDurata.Text = CUtil.GetTextDurataOreMinute(getNrMinute(listaElem[0].DataPontaj));
                            }

                            ConstruiesteColoaneDGV();
                            ConstruiesteRanduriDGV();

                            this.dgvListaCheckAstazi.ColumnHeadersVisible = false;
                        }
                        else
                        {
                            this.cboTip.DataSource = BDefinitiiGenerale.StructCheckInOut.GetListCheckIn();

                            this.lblDurata.Visible       = false;
                            this.lblUltimulCheck.Visible = false;
                        }
                        this.cboTip.DropDownStyle = ComboBoxStyle.DropDownList;
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }