public static bool Afiseaza(Form pEcranPariente, BClienti pClient) { using (FormCreareReprezentant ecran = new FormCreareReprezentant(pClient)) { ecran.AplicaPreferinteleUtilizatorului(); return(CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran)); } }
private void BtnAdauga_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); if (this.lOptiune == EnumOptiuneAfisare.Medici) { if (FormCreareReprezentant.Afiseaza(this.GetFormParinte(), this.lClient)) { ConstruiesteRanduriDGVMedici(); } } else if (this.lOptiune == EnumOptiuneAfisare.Cabinete) { 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); ConstruiesteRanduriDGVCabinete(); } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }