Hi, when i implement the method MiseAjourEtatFactureWCF(ref string
REF_COMPTE_FACTURATION, ref int STATUT) in my wcf project this following
error has appeared:
error: Invalid expression term 'if'
code:
Bash
public retour
MiseAjourEtatFactureWCF(ref string REF_COMPTE_FACTURATION, ref int
STATUT)
{
Service1 ser = new
Service1();
retour rt = new
retour();
ser.MiseAJourFacture(
if
(ser.MiseAjourEtatFacture(REF_COMPTE_FACTURATION,STATUT).Equals(-1))
{
try
{
rt.CodeRetour = -1;
rt.msgRetour
= "mise à
jour etat facture échoué";
}
catch
(Exception e)
{
CreateLog log = new
CreateLog(e);
log.ErrorLog(@"C:\Documents and
Settings\Administrateur\Bureau\fichierLog.txt");
}
return rt;
}
else
{
rt.CodeRetour = 0;
rt.msgRetour =
"mise à jour
etat facture réussit";
return
rt;
}
}
knowing that the goal of this method is to return error an message and
to create log file in the case of failed call of the method MiseAjourEtatFacture(REF_COMPTE_FACTURATION,STATUT)
and the succes message in the case of succeeded call of this method.
Please
help me because i'm a beginner. :((((((((((
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
John Wiese106 reputationPosted Jun 1, 2010, 10:06 AM EDT
If you remove this line does that fix the problem?