Edition du devis fonctionnelle

This commit is contained in:
Paul Schneider 2014-10-20 07:23:44 +02:00
commit 2ac2338939
22 changed files with 347 additions and 74 deletions

View file

@ -66,11 +66,6 @@ namespace WorkFlowProvider
throw new NotImplementedException ();
}
public void UpdateWritting (Writting wr)
{
throw new NotImplementedException ();
}
public void SetWrittingStatus (long wrtid, int status, string username)
{
throw new NotImplementedException ();
@ -197,6 +192,30 @@ namespace WorkFlowProvider
}
}
}
public void UpdateWritting (Writting wr)
{
using (NpgsqlConnection cnx = CreateConnection ()) {
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
cmd.CommandText =
"update writtings set " +
"description = @desc, " +
"ucost = @ucost, " +
"count = @count, " +
"productid = @prdid " +
"where _id = @wrid";
cmd.Parameters.Add ("@wrid", wr.Id);
cmd.Parameters.Add ("@desc", wr.Description);
cmd.Parameters.Add ("@ucost", wr.UnitaryCost);
cmd.Parameters.Add ("@prdid", wr.ProductReference);
cmd.Parameters.Add ("@count", wr.Count);
cnx.Open ();
cmd.ExecuteNonQuery ();
cnx.Close ();
}
}
}
public void SetTitle (long estid, string newTitle)
{