private void InitializeGridViewExpensesPerIndex(DataTable dt, int esexId)
        {
            AssociationExpenses ee = AssociationExpensesManager.GetById(esexId);

            int stairCase;
            List <Administratoro.DAL.Apartments> apartments;

            if (Association.HasStaircase && !string.IsNullOrEmpty(drpStairCases.SelectedValue) && int.TryParse(drpStairCases.SelectedValue, out stairCase))
            {
                apartments = ApartmentsManager.GetAllThatAreRegisteredWithSpecificCounters(Association.Id, esexId, stairCase);
            }
            else
            {
                apartments = ApartmentsManager.GetAllThatAreRegisteredWithSpecificCounters(Association.Id, esexId);
            }


            ApartmentExpensesManager.ConfigurePerIndex(ee, apartments);

            foreach (var apartment in apartments)
            {
                string query = @"
                    Select 
                    AE.Id as Id,
                    A.Number as Apartament,
                    cast(AE.IndexOld as float) as 'Index vechi',
                    cast(AE.IndexNew as float) as 'Index nou',
                    (AE.IndexNew - AE.IndexOld ) as 'Consum',
                    AE.Value as 'Valoare'
                    from ApartmentExpenses AE
                    Inner join Apartments A
                    ON AE.Id_Tenant = A.Id
                    where Id_EstateExpense = " + esexId + " and Id_Tenant = " + apartment.Id +
                               " and A.Id_Estate = " + Association.Id;

                SqlConnection  cnn = new SqlConnection("data source=HOME\\SQLEXPRESS;initial catalog=Administratoro;integrated security=True;MultipleActiveResultSets=True;");
                SqlCommand     cmd = new SqlCommand(query, cnn);
                SqlDataAdapter adp = new SqlDataAdapter(cmd);
                adp.Fill(dt);
            }

            ViewState["dtPerIndex"]       = dt;
            gvExpensesPerIndex.DataSource = dt;
            gvExpensesPerIndex.DataBind();
        }