public void UpdateJob(DataRow drJob)
{
OleDbCommand updateCommand = new OleDbCommand("Update Job SET m_fonction = @m_fonction, m_detailcloture = @m_detailcloture, m_annonce = @m_annonce, m_contact = @m_contact, m_site = @m_site where m_numero = @m_numero", m_dbConnection);
updateCommand.Parameters.Add("@m_fonction", OleDbType.VarChar, 50, "m_fonction");
updateCommand.Parameters.Add("@m_date", OleDbType.DBDate, 15, "m_date");
updateCommand.Parameters.Add("@m_annonce", OleDbType.VarChar, 255, "m_annonce");
updateCommand.Parameters.Add("@m_contact", OleDbType.VarChar, 50, "m_contact");
updateCommand.Parameters.Add("@m_site", OleDbType.Integer, 10, "m_site");
updateCommand.Parameters.Add("@m_detailcloture", OleDbType.VarChar, 50, "m_detailcloture");
updateCommand.Parameters.Add("@m_cloture", OleDbType.Integer, 5, "m_cloture");
OleDbParameter param = new OleDbParameter("@m_numero", OleDbType.Integer, 10, "m_numero");
param.SourceVersion = DataRowVersion.Current;
m_dbAdapter.UpdateCommand = updateCommand;
DataRow rowresult = (m_dbDataSet.Tables["Job"].Select("m_numero = " + drJob["m_numero"].ToString()))[0];
rowresult["m_fonction"] = drJob["m_fonction"];
rowresult["m_date"] = drJob["m_date"];
rowresult["m_annonce"] = drJob["m_annonce"];
rowresult["m_contact"] = drJob["m_contact"];
rowresult["m_site"] = drJob["m_site"];
rowresult["m_detailcloture"] = "test"; //drJob["m_cloturee"];
m_dbAdapter.Update(m_dbDataSet.Tables["Job"]);
}
Partager