コード例 #1
0
        private void setDetalhesFunce(string mat)
        {
            relatorio.InnerHtml = string.Empty;
            Totalizador nTotalizador = new Totalizador();
            string html = string.Empty;
            DataView dvDadosFunc = Ub3DetalhesBuss.getInstance().getDadosFunce(mat);
            DataView dvDetalhes = Ub3DetalhesBuss.getInstance().getDetalheFunce(mat);

            if (dvDadosFunc.Count > 0)
            {
                html = Utilitario.setHeaderDdFunce();

                foreach (DataRowView item in dvDadosFunc)
                    html += Utilitario.setDadosDdFunce(item);
                
                html += Utilitario.setFooterDdFunce();
            }

            if (dvDetalhes.Count > 0)
            {
                html += Utilitario.setHeaderDetFunce();

                foreach (DataRowView item in dvDetalhes)
                {
                    html += Utilitario.setDadosDetFunce(item);
                    nTotalizador = Utilitario.setTotalizador(item, nTotalizador);
                }
                html += Utilitario.setTotalizadorInTable(nTotalizador);
                html += Utilitario.setFooterDetFunce();
            }

            relatorio.InnerHtml += html;
        }
コード例 #2
0
        //Totalizador
        public static Totalizador setTotalizador(DataRowView item, Totalizador ntotal)
        {
            ntotal.nttAdvert += Int32.Parse(item[1].ToString());
            ntotal.nttSusp += Int32.Parse(item[2].ToString());
            ntotal.nttAtest += Int32.Parse(item[3].ToString());
            ntotal.nttFalta += Int32.Parse(item[4].ToString());
            ntotal.nttReem += Int32.Parse(item[5].ToString());
            ntotal.nttMultas += Int32.Parse(item[6].ToString());
            ntotal.nttAcidente += Int32.Parse(item[7].ToString());
            ntotal.nttTotal += Int32.Parse(item[8].ToString());

            return ntotal;
        }
コード例 #3
0
        public static string setTotalizadorInTable(Totalizador nTotalizador)
        {
            html = new StringBuilder();
            html.Append("                <tr>\n");
            html.Append("                   <th class='table_filha_item'>Pontuação Total</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttAdvert + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttSusp + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttAtest + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttFalta + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttReem + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttMultas + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttAcidente + "</th>\n");
            html.Append("                   <th class='table_filha_item text-right'>" + nTotalizador.nttTotal + "</th>\n");
            html.Append("                </tr>\n");

            return html.ToString();
        }