private void DgvLista_EditareLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BClientiFacturi fact = this.dgvLista.Rows[pIndexRand].Tag as BClientiFacturi; if (fact != null) { if (FormCreeazaFacturaClient.Afiseaza(this.GetFormParinte(), fact)) { //incarcaRand(this.dgvLista.Rows[pIndexRand], fact, fact.GetListaLucrari(null)); } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void DgvListaFacturi_CellClick(object sender, DataGridViewCellEventArgs e) { if (this.lSeIncarca || e.RowIndex < 0) { return; } try { incepeIncarcarea(); string numeColoana = this.dgvListaFacturi.Columns[e.ColumnIndex].Name; BClientiFacturi factura = this.dgvListaFacturi.Rows[e.RowIndex].Tag as BClientiFacturi; if (numeColoana.Equals(EnumColoaneDGV.colDetaliiFactura.ToString())) { if (factura != null) { if (FormCreeazaFacturaClient.Afiseaza(this.GetFormParinte(), factura)) { incarcaRand(this.dgvListaFacturi.Rows[e.RowIndex], factura, factura.GetListaLucrari(null), factura.GetListaPlati(null)); } } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void BtnAchita_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BColectieClientiComenzi listaLucrari = this.dgvLista.GetListaObiecteBifate <BColectieClientiComenzi, BClientiComenzi>(); BClienti client = this.ctrlCautareClinica.GetClient(); if (client == null) { if (this.dgvLista.SelectedRows.Count == 1) { BClientiComenzi comanda = this.dgvLista.SelectedRow.Tag as BClientiComenzi; client = BClienti.getClient(comanda.IdClient, null); } else { int idClient = listaLucrari.GetIdClientDinLista(); if (idClient != 0) { client = BClienti.getClient(idClient, null); } } } if (FormCreeazaFacturaClient.Afiseaza(this.GetFormParinte(), client, listaLucrari, null)) { ConstruiesteRanduriDGV(); } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
public static bool Afiseaza(Form pEcranPariente, BClienti pClient, BColectieClientiComenzi pListaLucrari, BClientiFacturi pFactura) { if (pClient == null) { Mesaj.Afiseaza(pEcranPariente, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.SelectatiClinica)); return(false); } if (CUtil.EsteListaVida <BClientiComenzi>(pListaLucrari)) { Mesaj.Afiseaza(pEcranPariente, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.SelectatiLucrarile)); return(false); } using (FormCreeazaFacturaClient ecran = new FormCreeazaFacturaClient(pClient, pListaLucrari, pFactura)) { ecran.AplicaPreferinteleUtilizatorului(); return(CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran)); } }