1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| public void LoadMaxBVByDate(short annee)
{
System.Data.SqlClient.SqlDataReader oDBDataReader;
try
{
oDBDataReader = oBData.LoadDeclarationsByagrement(Agrement, annee);
while (oDBDataReader.Read())
{
Entity.DECLARARION oDeclaration;
oDeclaration = new Entity.DECLARARION();
oDeclaration.AgrCVT = Convert.ToString(oDBDataReader["AgrCVT"]);
oDeclaration.AnneeDec = Convert.ToInt16(oDBDataReader["AnneeDec"]);
oDeclaration.DateDec = Convert.ToDateTime(oDBDataReader["DateDec"]);
this.Add(oDeclaration);
}
oBData.CloseDataReader();
oBData.CloseConnection();
}
catch (Exception ex)
{
throw ex;
}
} |
Partager