示例#1
0
        private void DgvLista_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.lSeIncarca || e.RowIndex < 0)
            {
                return;
            }
            try
            {
                incepeIncarcarea();

                string denumireColoanaSelectata = this.dgvLista.Columns[e.ColumnIndex].Name;

                if (this.dgvLista.SelectedRow != null)
                {
                    BClienti client = this.dgvLista.SelectedRow.Tag as BClienti;

                    if (client != null)
                    {
                        if (denumireColoanaSelectata.Equals(EnumColoaneDGV.colDeschideDosar.ToString()))
                        {
                            if (TablouDeBord.Clienti.FormDosarClient.Afiseaza(this.GetFormParinte(), client))
                            {
                                incarcaRand(this.dgvLista.SelectedRow, client, client.GetUltimaLucrare(null), client.GetUltimaFactura(null), client.GetListaLucrari(null).Count(), client.GetTotalFacturi(null), client.GetTotalIncasari(null));
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex);
            }
            finally
            {
                finalizeazaIncarcarea();
            }
        }