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(); } }
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(); } }