Beispiel #1
0
        private void BtnAdaugaCabinet_Click(object sender, EventArgs e)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                string denumire = CCL.UI.IHMUtile.GetTextSimpluUtilizator(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Denumire), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Denumire), string.Empty, BClientiCabinete.StructCampuriTabela.DenumireMaxLength);

                if (!string.IsNullOrEmpty(denumire))
                {
                    BClientiCabinete cabinetNou = BClientiCabinete.Add(this.lClient.Id, denumire, null);

                    FormDetaliuCabinet.Afiseaza(this.GetFormParinte(), this.lClient, cabinetNou);
                    ConstruiesteRanduriDGV();
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Beispiel #2
0
        private void DgvListaCabinete_EditareLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiCabinete cabinetDeModificat = this.dgvListaCabinete.Rows[pIndexRand].Tag as BClientiCabinete;

                if (cabinetDeModificat != null)
                {
                    if (FormDetaliuCabinet.Afiseaza(this.GetFormParinte(), this.lClient, cabinetDeModificat))
                    {
                        incarcaRand(this.dgvListaCabinete.Rows[pIndexRand], cabinetDeModificat, cabinetDeModificat.GetAdresa(null));
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void DgvLista_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                if (this.lOptiune == EnumOptiuneAfisare.Medici)
                {
                    BClientiReprezentanti reprezentantDeModificat = this.dgvLista.Rows[pIndexRand].Tag as BClientiReprezentanti;

                    if (reprezentantDeModificat != null && !this.btnActiviInactivi.Selectat)
                    {
                        if (FormDetaliuReprezentant.Afiseaza(this.GetFormParinte(), reprezentantDeModificat, this.lClient))
                        {
                            incarcaRandMedic(this.dgvLista.Rows[pIndexRand], reprezentantDeModificat, BClientiComenzi.GetListByParam(this.lClient.Id, reprezentantDeModificat.Id, -1, CDefinitiiComune.EnumStare.Activa, null));
                        }
                    }
                }
                else
                {
                    BClientiCabinete cabinetDeModificat = this.dgvLista.Rows[pIndexRand].Tag as BClientiCabinete;

                    if (cabinetDeModificat != null && !this.btnActiviInactivi.Selectat)
                    {
                        if (FormDetaliuCabinet.Afiseaza(this.GetFormParinte(), this.lClient, cabinetDeModificat))
                        {
                            incarcaRand(this.dgvLista.Rows[pIndexRand], cabinetDeModificat, BClientiComenzi.GetListByParam(this.lClient.Id, -1, cabinetDeModificat.Id, CDefinitiiComune.EnumStare.Activa, null));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }