void lEcranCautare_ElementSelectat(StructIdDenumire pElement) { try { if (pElement.Id > 0) { this.Initializeaza(pElement, this.lTipDeschidere); ascundeEcranCautare(); anuntaSelectia(); } else { ascundeEcranCautare(); ////Adaugam clientul int id = BEtape.Add(pElement.Denumire, 0, null); this.lPersoanaSauOrganizatie = new BLL.iStomaLab.StructIdDenumire(id, pElement.Denumire); Initializeaza(this.lPersoanaSauOrganizatie, this.lTipDeschidere); anuntaSelectia(); } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } }
internal bool Salveaza() { bool esteValid = BEtape.SuntInformatiileNecesareCoerente(this.txtDenumireEtapa.Text); if (this.lEtapa == null) { if (esteValid) { BEtape.Add(this.txtDenumireEtapa.Text, CUtil.GetTextInt32(this.txtMinuteEtapa.Text), null); } else { seteazaAlerta(); } } else { this.lEtapa.Denumire = this.txtDenumireEtapa.Text; this.lEtapa.DurataMedieMinute = CUtil.GetTextInt32(this.txtMinuteEtapa.Text); if (esteValid) { this.lEtapa.UpdateAll(); } else { seteazaAlerta(); } } return(esteValid); }