اینم کد لایه دیتا اکسس :
public void Update_m_asli(DataEntityLayer.modiriat_asli m_asli_ToUpdate)
{
//string updateQuery = "UPDATE m_asli SET tarikh=@tarikh,naghdi=@naghdi,pos=@pos,dakhl=@dakhl,hazine=@hazine,kole_forosh=@kole_forosh,"+
// "mojodi_sandogh=@mojodi_sandogh,variz=@variz,sharhe_variz=@sharhe_variz WHERE ID=@ID";
//OleDbCommand updateCommand = new OleDbCommand (updateQuery, this.databaseconnection );
//updateCommand.Parameters.AddWithValue("@ID", index );
//updateCommand.Parameters.AddWithValue("@tarikh", m_asli_ToUpdate.tarikh );
//updateCommand.Parameters.AddWithValue("@naghdi", m_asli_ToUpdate.naghdi );
//updateCommand.Parameters.AddWithValue("@pos", m_asli_ToUpdate.pos);
//updateCommand.Parameters.AddWithValue("@dakhl", m_asli_ToUpdate.dakhl );
//updateCommand.Parameters.AddWithValue("@hazine", m_asli_ToUpdate.hazine);
//updateCommand.Parameters.AddWithValue("@kole_forosh", m_asli_ToUpdate.kole_forosh);
//updateCommand.Parameters.AddWithValue("@mojodi_sandogh", m_asli_ToUpdate.mojodi_sandogh);
//updateCommand.Parameters.AddWithValue("@variz", m_asli_ToUpdate.variz);
//updateCommand.Parameters.AddWithValue("@sharhe_variz", m_asli_ToUpdate.sharhe_variz);
////DataTable dt = new DataTable();
//OleDbDataAdapter oda = new OleDbDataAdapter();
// OleDbCommandBuilder ocb = new OleDbCommandBuilder(oda);
//oda.Update(dt);
try
{
}
catch (Exception ex)
{
throw ex;
}
finally
{
this.databaseconnection.Close();
}
}
توسط
marham
(124 امتیاز)
●1 ●14