private void DgvListaReprezentanti_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BClientiReprezentanti reprezentantDeSters = this.dgvListaReprezentanti.Rows[pIndexRand].Tag as BClientiReprezentanti; if (reprezentantDeSters != null) { if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), reprezentantDeSters.Nume.ToString() + " " + reprezentantDeSters.Prenume.ToString())) { reprezentantDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), 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(); } }