private void DgvComenzi_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiComenzi comandaDeSters = (pDGVSender as DataGridViewPersonalizat).Rows[pIndexRand].Tag as BClientiComenzi;

                if (comandaDeSters != null)
                {
                    if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), null))
                    {
                        ;
                    }
                    {
                        comandaDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Inchidere), null);
                    }
                    ConstruiesteRanduriDGV();
                }
            }
            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 TgvListaCategorii_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BCategorii categorie = this.tgvListaCategorii.Rows[this.tgvListaCategorii.CurrentCell.RowIndex].Tag as BCategorii;

                if (categorie != null)
                {
                    if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), categorie.Denumire))
                    {
                        categorie.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                        ConstruiesteRanduriTGV();
                    }
                }
            }
            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();
            }
        }
Exemple #5
0
        private void DgvLista_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca || pIndexRand < 0)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere)))
                {
                    BClientiPlati plata = this.dgvLista.Rows[pIndexRand].Tag as BClientiPlati;

                    plata.Close(true, string.Empty, null);

                    ConstruiesteRanduriDGV();
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Exemple #6
0
        private void DgvLista_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca || pIndexRand < 0)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiComenzi fisa = this.dgvLista.Rows[pIndexRand].Tag as BClientiComenzi;
                if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), fisa.ToString()))
                {
                    if (this.lFactura != null)
                    {
                        fisa.IdFactura = 0;
                        fisa.UpdateAll();
                    }

                    this.dgvLista.Rows.RemoveAt(pIndexRand);

                    initTotal();
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        private void DgvComenzi_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiComenzi comandaDeSters = pDGVSender.Rows[pIndexRand].Tag as BClientiComenzi;

                if (comandaDeSters != null)
                {
                    if (!this.btnActiviInactivi.Selectat)
                    {
                        if (comandaDeSters.IdFactura > 0)
                        {
                            Mesaj.Informare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.LucrarileFacturateNuPotFiSterse), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere));
                        }
                        else
                        {
                            if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), null))
                            {
                                comandaDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Inchidere), null);
                                ConstruiesteRanduriDGV();
                            }
                        }
                    }
                    else
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), string.Empty))
                        {
                            comandaDeSters.Close(false, string.Empty, null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Exemple #8
0
        private void DgvListaEtape_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BEtape etapa = this.dgvListaEtape.Rows[pIndexRand].Tag as BEtape;
                if (etapa != null)
                {
                    if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), etapa.Denumire.ToString()))
                    {
                        this.dgvListaEtape.Rows.RemoveAt(pIndexRand);
                    }
                }
                else
                {
                    BLucrariEtape lucrareEtapa = this.dgvListaEtape.Rows[pIndexRand].Tag as BLucrariEtape;
                    if (lucrareEtapa != null)
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), BEtape.GetEtapaById(lucrareEtapa.IdEtapa, CDefinitiiComune.EnumStare.Activa, null).Denumire.ToString()))
                        {
                            this.dgvListaEtape.Rows.RemoveAt(pIndexRand);
                        }
                    }
                    else
                    {
                        BClientiComenziEtape lucrareClientEtapa = this.dgvListaEtape.Rows[pIndexRand].Tag as BClientiComenziEtape;
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), BEtape.GetEtapaById(lucrareClientEtapa.IdEtapa, CDefinitiiComune.EnumStare.Activa, null).Denumire.ToString()))
                        {
                            this.dgvListaEtape.Rows.RemoveAt(pIndexRand);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
Exemple #9
0
        private void DgvListaPacienti_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

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

                if (pacientDeSters != null)
                {
                    string Denumire = pacientDeSters.GetIdentitateReprezentant();  //aici reprezentantul e pacient

                    if (!this.btnActivInactiv.Selectat)
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), Denumire))
                        {
                            pacientDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                    else
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), Denumire))
                        {
                            pacientDeSters.Close(false, string.Empty, null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                }
            }
            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();
            }
        }
        private void DgvListaEtape_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand)
        {
            if (this.lSeIncarca)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                BClientiComenziEtape etapa = this.dgvListaEtape.Rows[pIndexRand].Tag as BClientiComenziEtape;

                if (etapa != null)
                {
                    if (!this.btnActivDezactivat.Selectat)
                    {
                        if (Mesaj.Confirmare(this, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), etapa.DenumireEtapa))
                        {
                            this.lComanda.CloseEtapa(etapa, null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                    else
                    {
                        if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), etapa.DenumireEtapa))
                        {
                            etapa.Close(false, string.Empty, null);
                            ConstruiesteRanduriDGV();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }
        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();
            }
        }
Exemple #13
0
 internal static bool ConfirmareStergere(Form pEcranParinte)
 {
     return(Mesaj.Confirmare(pEcranParinte, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere)));
 }