Convert PHP code to C#

This public forum is for user-to-user discussions of ASP.NET Report Maker. Note that this is not support forum.

Convert PHP code to C#

Postby rodrigofaustino2 » Wed Apr 20, 2016 8:26 pm

I need to change a system and I am having difficulty to generate customized reports with PHPMaker had done in teplate customized a report where I have a fact and many details. exe: show and an event within the event possesses several people and vehicles and objects where these details are related tables below details the fact of the code, must have the same code within the razor aspnetmaker, can anyone help?
code in php>>

<div>
<h4><b style="color:#0000FF">Fato:</b>&nbsp;{{{Fato}}}
</div>
<?php

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
$tal=0;
$total =0;
$res=0;
$x=0;
$pegaid = (int) $_GET["idOcr"];
$id = $pegaid;
$sqlquery = "SELECT distinct Cond,RG,CPF,NomEnv,TipSit FROM RAC_New.rac.CivisRAC where idocr='$id'";
$res = odbc_exec($connect, $sqlquery);
$tamanho =odbc_fetch_array($res);
if($tamanho >0){
$res = odbc_exec($connect, $sqlquery);
echo "<h4><b style=color:#0000FF>Civis Envolvidos: </b><br>";
while ($linha = odbc_fetch_array($res)) {
$ver = count($linha["Cond"]);
if($ver >0){
echo utf8_encode(($linha["Cond"]));
}
$ver = count($linha["NomEnv"]);
if($ver >0){
echo " - ";
echo utf8_encode(($linha["NomEnv"]));
}
$ver = count($linha["CPF"]);
if($ver >0){
echo " CPF";
echo ($linha["CPF"]);
}
$ver = count($linha["RG"]);
if($ver >0){
echo " RG ";
echo ($linha["RG"]);
}


$ver = count($linha["TipSit"]);
if($ver >0){
echo " - ";
echo utf8_encode(($linha["TipSit"]));
}
echo "<br>";
}
}
?>

</div>
<div>
<h4><b style="color:#0000FF">Dia:</b>&nbsp;{{{DtFto}}}
</div>
<div>
<h4><b style="color:#0000FF">Hora:</b>&nbsp;{{{HrFto}}}
</div>
<div>
<h4> <b style="color:#0000FF">Endere├žo:</b>&nbsp;{{{Ende}}}
</div>
rodrigofaustino2
 
Posts: 33
Joined: Thu Jul 23, 2015 7:01 pm

Re: Integration helps to

Postby motfs » Thu Apr 21, 2016 11:33 am

Try to learn C# and convert it. Some simple conversion:

Quote:
$tal=0;
echo " CPF";

int tal = 0;
ew_Write("CPF");

You need to find related function in C#. Try to google for that.
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm


Return to General Discussion (ASP.NET Report Maker)