Exemplo n.º 1
0
        private void GenerateComplainName()
        {
            ism = new InterventionStatisticMapper();

            foreach (String complaint in ism.getListComplaint())
            {
                RowDefinition rd = new RowDefinition();
                rd.Height = new GridLength(40);
                ComplaintGrid.RowDefinitions.Add(rd);
                Border border = new Border();
                border.BorderThickness = new Thickness(1, 0, 5, 1);
                border.BorderBrush     = new SolidColorBrush(Colors.Black);
                TextBlock tb = new TextBlock();
                tb.FontWeight          = FontWeights.Bold;
                tb.Height              = 40;
                tb.FontSize            = 13;
                tb.Margin              = new Thickness(5, 0, 0, 0);
                tb.VerticalAlignment   = VerticalAlignment.Center;
                tb.HorizontalAlignment = HorizontalAlignment.Center;
                tb.TextWrapping        = TextWrapping.Wrap;
                displayComplaint       = StaticDBConnection.GetResource(complaint);
                tb.Name      = complaint;
                tb.Text      = displayComplaint;
                border.Child = tb;
                ComplaintGrid.Children.Add(border);
                Grid.SetColumn(border, 0);
                Grid.SetRow(border, count);
                GenerateInterventionWithoutAmbulance(count, complaint);
                GenerateInterventionWithAmbulance(count, complaint);
                GenerateTotalTableHorizontal(count);

                //resetting the total counters
                countWithoutAmbulance  = 0;
                countWithAmbulance     = 0;
                totalChildrenHoriCount = 0;
                totalAdultHoriCount    = 0;

                count++;
            }
            StaticDBConnection.CloseConnection();
            GenerateTotalTableVertical(count);
            totalChildrenVertical = 0;
            totalAdultVertical    = 0;
        }