private void CtrlValidareAnulare_Validare(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BColectieClienti listaClientiExistenti = BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); //List<string> listaDenumireClientiExistenti = listaClientiExistenti.GetDenumireClienti(); foreach (DataGridViewRow row in this.dgvListaImportClienti.Rows) { StructImportClienti client = (StructImportClienti)row.Tag; BClienti clinicaExistenta = listaClientiExistenti.GetPrimaByDenumire(client.DenumireCabinet.ToLower()); if (!string.IsNullOrEmpty(client.DenumireCabinet)) { if (clinicaExistenta == null) { int idClient = BClienti.Add(client.DenumireCabinet, null); listaClientiExistenti.Add(new BClienti(idClient)); BClientiReprezentanti.Add(idClient, client.NumeClient, client.PrenumeClient, string.Empty, null); } else { //Tuple<int, string> listeClientiExistentiDenumire = BClienti.getListaClientiDenumire(client.DenumireCabinet); //List<string> lstMediciExistentiDenumire = BClientiReprezentanti.getListaMediciDenumire(listeClientiExistentiDenumire.Item1); //if (!lstMediciExistentiDenumire.Contains(client.NumeClient + " " + client.PrenumeClient)) //{ BClientiReprezentanti.Add(clinicaExistenta.Id, client.NumeClient, client.PrenumeClient, string.Empty, null); //} } } } inchideEcranulOK(); } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void ConstruiesteRanduriDGV() { this.dgvListaClinici.IncepeContructieRanduri(); var listaElem = BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); foreach (var elem in listaElem) { incarcaRand(this.dgvListaClinici.Rows[this.dgvListaClinici.Rows.Add()], elem); } this.dgvListaClinici.FinalizeazaContructieRanduri(); }
private void ConstruiesteRanduriDGV() { var listaElem = BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Toate, null); if (listaElem.ContineElementeDeactivate()) { this.btnActiviInactivi.Visible = true; } else { this.btnActiviInactivi.Visible = false; this.btnActiviInactivi.Selectat = false; } if (!this.btnActiviInactivi.Selectat) { ConstruiesteRanduriDGV(listaElem.GetListaActive()); } else { ConstruiesteRanduriDGV(listaElem.GetListaInactive()); } }
public void Initializeaza() { base.InitializeazaVariabileleGenerale(); incepeIncarcarea(); this.txtCautaLucrare.Goleste(); this.txtCautareClinici.Goleste(); BColectieClienti listaClienti = BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); if (!CUtil.EsteListaVida <BClienti>(listaClienti)) { this.dgvListaClinici.ConstruiesteRanduriToString <BClienti>(listaClienti); this.lClient = this.dgvListaClinici.Rows[0].Tag as BClienti; this.dgvListaClinici.Rows[0].Selected = true; ConstruiesteColoaneDGV(); ConstruiesteRanduriDGV(); } finalizeazaIncarcarea(); }
public static BClienti Afiseaza(Form pEcranPariente) { return(Caramizi.frmListaObiecte <BClienti> .Afiseaza <BClienti>(pEcranPariente, BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null), string.Empty, CDL.iStomaLab.CDefinitiiComune.EnumTipSelectie.SelectieUnica)); //using (FormListaClinici ecran = new FormListaClinici()) //{ // ecran.AplicaPreferinteleUtilizatorului(); // CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran); // return ecran.lClient; //} }
///////////////////////////////////////////////////////////// private void BtnAdaugareComanda_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); // BClienti client = Generale.FormListaClinici.Afiseaza(this.GetFormParinte()); BClienti client = Caramizi.frmListaObiecte <BClienti> .Afiseaza <BClienti>(this.GetFormParinte(), BClienti.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Clinica), CDL.iStomaLab.CDefinitiiComune.EnumTipSelectie.SelectieUnica); if (client != null) { if (Clienti.FormDetaliuComanda.Afiseaza(this.GetFormParinte(), null, client, null)) { ConstruiesteRanduriDGV(); } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }