示例#1
0
        private void DgvListaClienti_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClienti clientDeModificat = this.dgvListaClienti.Rows[pIndexRand].Tag as BClienti;

                if (clientDeModificat != null)
                {
                    if (TablouDeBord.Clienti.FormDosarClient.Afiseaza(this.GetFormParinte(), clientDeModificat))
                    {
                        incarcaRand(this.dgvListaClienti.Rows[pIndexRand], clientDeModificat, BClientiComenzi.GetUltimaLucrare(clientDeModificat.Id, null));
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void DgvListaPreturi_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BListaPreturiStandard lucrareDeModificat = this.dgvListaPreturi.Rows[pIndexRand].Tag as BListaPreturiStandard;

                if (lucrareDeModificat != null)
                {
                    if (FormDetaliuLucrare.Afiseaza(this.GetFormParinte(), lucrareDeModificat))
                    {
                        incarcaRand(this.dgvListaPreturi.Rows[pIndexRand], lucrareDeModificat);
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void DgvListaImportPersonal_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                StructImportPersonal personal = (StructImportPersonal)this.dgvListaImportPersonal.Rows[pIndexRand].Tag;

                if (Mesaj.Confirmare(this, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), personal.Nume + " " + personal.Prenume))
                {
                    this.dgvListaImportPersonal.Rows.RemoveAt(pIndexRand);
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void DgvListaLocatii_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BLocatii locatieDeSters = this.dgvListaLocatii.Rows[pIndexRand].Tag as BLocatii;

                if (locatieDeSters != null)
                {
                    if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), locatieDeSters.Denumire))
                    {
                        locatieDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                        ConstruiesteRanduriDGV();
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void DgvListaVenituri_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BUtilizatoriVenituri venitDeModificat = this.dgvListaVenituri.Rows[pIndexRand].Tag as BUtilizatoriVenituri;

                if (venitDeModificat != null)
                {
                    if (FormCreareUtilizatorVenit.Afiseaza(this.GetFormParinte(), this.lUtilizator, venitDeModificat))
                    {
                        incarcaRand(this.dgvListaVenituri.Rows[pIndexRand], venitDeModificat);
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
示例#6
0
        private void DgvListaBanci_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BBanci bancaDeModificat = this.dgvListaBanci.Rows[pIndexRand].Tag as BBanci;

                if (bancaDeModificat != null && !this.btnActivInactiv.Selectat)
                {
                    if (FormDetaliiBanca.Afiseaza(this.GetFormParinte(), bancaDeModificat))
                    {
                        incarcaRand(this.dgvListaBanci.Rows[pIndexRand], bancaDeModificat);
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
示例#7
0
        private void DgvListaReprezentanti_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiReprezentanti reprezentantDeModificat = this.dgvListaReprezentanti.Rows[pIndexRand].Tag as BClientiReprezentanti;

                if (reprezentantDeModificat != null)
                {
                    if (FormDetaliuReprezentant.Afiseaza(this.GetFormParinte(), reprezentantDeModificat, this.lClient))
                    {
                        incarcaRand(this.dgvListaReprezentanti.Rows[pIndexRand], reprezentantDeModificat);
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
示例#8
0
        private void DgvListaPacienti_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiPacienti pacientDeModificat = this.dgvListaPacienti.Rows[pIndexRand].Tag as BClientiPacienti;

                if (pacientDeModificat != null && !this.btnActivInactiv.Selectat)
                {
                    int idPacModificat = pacientDeModificat.Id;
                    FormDetaliuPacient.Afiseaza(this.GetFormParinte(), IdClient, ref idPacModificat, string.Empty);
                    ConstruiesteRanduriDGV();
                }
            }
            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();
            }
        }
        private void DgvListaPreturi_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BListaPreturiStandard lucrareDeSters = this.dgvListaPreturi.Rows[pIndexRand].Tag as BListaPreturiStandard;

                if (lucrareDeSters != null)
                {
                    if (!this.btnActiviInactivi.Selectat)
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), lucrareDeSters.Denumire))
                        {
                            lucrareDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                    else
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), lucrareDeSters.Denumire))
                        {
                            lucrareDeSters.Close(false, string.Empty, null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
示例#11
0
        private void DgvLista_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

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

                    if (reprezentantDeSters != null)
                    {
                        if (!this.btnActiviInactivi.Selectat)
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), reprezentantDeSters.ToString()))
                            {
                                reprezentantDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                                ConstruiesteRanduriDGVMedici();
                            }
                        }
                        else
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), reprezentantDeSters.ToString()))
                            {
                                reprezentantDeSters.Close(false, string.Empty, null);
                                ConstruiesteRanduriDGVMedici();
                            }
                        }
                    }
                }
                else if (this.lOptiune == EnumOptiuneAfisare.Cabinete)
                {
                    BClientiCabinete cabinetDeSters = this.dgvLista.Rows[pIndexRand].Tag as BClientiCabinete;

                    if (cabinetDeSters != null)
                    {
                        if (!this.btnActiviInactivi.Selectat)
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), cabinetDeSters.Denumire))
                            {
                                cabinetDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                                ConstruiesteRanduriDGVCabinete();
                            }
                        }
                        else
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), cabinetDeSters.Denumire))
                            {
                                cabinetDeSters.Close(false, string.Empty, null);
                                ConstruiesteRanduriDGVCabinete();
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
示例#12
0
 void dgvListaObiecte_SelectieMultiplaEfectuata(CCL.UI.DataGridViewPersonalizat pDGVSender, bool pToateSelectate)
 {
     //plasam focusul pe butonul de validare pentru a valida selectia
     this.btnValidare.Focus();
 }