Click here to Skip to main content
15,900,973 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mutlithreading application threading and semaphores? Pin
Richard MacCutchan23-Mar-20 3:58
mveRichard MacCutchan23-Mar-20 3:58 
GeneralRe: Mutlithreading application threading and semaphores? Pin
auting8223-Mar-20 4:14
auting8223-Mar-20 4:14 
GeneralRe: Mutlithreading application threading and semaphores? Pin
Dave Kreskowiak23-Mar-20 4:36
mveDave Kreskowiak23-Mar-20 4:36 
GeneralRe: Mutlithreading application threading and semaphores? Pin
Richard MacCutchan23-Mar-20 4:41
mveRichard MacCutchan23-Mar-20 4:41 
AnswerRe: Mutlithreading application threading and semaphores? Pin
Gerry Schmitz23-Mar-20 8:05
mveGerry Schmitz23-Mar-20 8:05 
AnswerRe: Mutlithreading application threading and semaphores? Pin
Bohdan Stupak24-Mar-20 1:14
professionalBohdan Stupak24-Mar-20 1:14 
QuestionRDLC printing without print preview Pin
Member 1419221622-Mar-20 21:20
Member 1419221622-Mar-20 21:20 
AnswerRe: RDLC printing without print preview Pin
OriginalGriff22-Mar-20 21:34
mveOriginalGriff22-Mar-20 21:34 
GeneralRe: RDLC printing without print preview Pin
Member 1419221622-Mar-20 21:49
Member 1419221622-Mar-20 21:49 
GeneralRe: RDLC printing without print preview Pin
OriginalGriff22-Mar-20 21:51
mveOriginalGriff22-Mar-20 21:51 
GeneralRe: RDLC printing without print preview Pin
Member 1419221622-Mar-20 22:08
Member 1419221622-Mar-20 22:08 
SuggestionRe: RDLC printing without print preview Pin
Richard Deeming23-Mar-20 0:22
mveRichard Deeming23-Mar-20 0:22 
AnswerRe: RDLC printing without print preview Pin
Gerry Schmitz23-Mar-20 7:49
mveGerry Schmitz23-Mar-20 7:49 
QuestionNotify User From Server Pin
Kevin Marois22-Mar-20 16:11
professionalKevin Marois22-Mar-20 16:11 
AnswerRe: Notify User From Server Pin
Dave Kreskowiak22-Mar-20 18:41
mveDave Kreskowiak22-Mar-20 18:41 
GeneralRe: Notify User From Server Pin
Kevin Marois22-Mar-20 18:50
professionalKevin Marois22-Mar-20 18:50 
GeneralRe: Notify User From Server Pin
Dave Kreskowiak23-Mar-20 4:18
mveDave Kreskowiak23-Mar-20 4:18 
GeneralRe: Notify User From Server Pin
Gerry Schmitz23-Mar-20 6:24
mveGerry Schmitz23-Mar-20 6:24 
QuestionCreate Custom File Property/Attribute Pin
Kevin Marois22-Mar-20 9:30
professionalKevin Marois22-Mar-20 9:30 
AnswerRe: Create Custom File Property/Attribute Pin
Tony Hill22-Mar-20 10:02
professionalTony Hill22-Mar-20 10:02 
AnswerRe: Create Custom File Property/Attribute Pin
OriginalGriff22-Mar-20 10:14
mveOriginalGriff22-Mar-20 10:14 
GeneralRe: Create Custom File Property/Attribute Pin
Kevin Marois22-Mar-20 13:02
professionalKevin Marois22-Mar-20 13:02 
AnswerRe: Abuse Standard File Property/Attribute Pin
Luc Pattyn22-Mar-20 10:36
sitebuilderLuc Pattyn22-Mar-20 10:36 
GeneralRe: Abuse Standard File Property/Attribute Pin
Kevin Marois22-Mar-20 13:04
professionalKevin Marois22-Mar-20 13:04 
Questionupdate problem Pin
ago248619-Mar-20 23:31
ago248619-Mar-20 23:31 
Quote:
hello gentlemen and thank you to you who bring me your help. I am almost at the end of my program and I have an update problem. I don't see any change in my stock.
I have no error when I validate but the quantity does not change in the access database


C#
for (int i = 0; i < dataGridView1.Rows.Count; i++) //Car tu fais une infériorité stricte
                               {
                                   ref_prod = Convert.ToString(dataGridView1.Rows[i].Cells[0].Value);
                                   Qte_prod = Convert.ToInt64(dataGridView1.Rows[i].Cells[1].Value);

                                   using (OleDbCommand cmd3 = sql_con.CreateCommand())
                                   {

                                       cmd3.CommandText = "INSERT INTO Detail_commandes (com_det, ref_det, qute_det) VALUES (@com_det,@ref_det,@qute_det)";
                                       cmd3.Parameters.AddWithValue("@com_det", TxtNunCmd.Text);
                                       cmd3.Parameters.AddWithValue("@ref_det", ref_prod);
                                       cmd3.Parameters.AddWithValue("@qute_det", Qte_prod);
                                       sql_con.Open();
                                       cmd3.ExecuteNonQuery();
                                       sql_con.Close();

                                   }

                                   using (OleDbCommand cmd4 = sql_con.CreateCommand())
                                   {
                                       //setConnection();
                                       OleDbCommand QteStock = sql_con.CreateCommand();
                                       QteStock.CommandText = "SELECT Quantite FROM Catalogue";
                                       sql_con.Open();
                                       int LastQteStock = Convert.ToInt32(QteStock.ExecuteScalar());
                                       sql_con.Close();
                                       cmd4.CommandText = "UPDATE Catalogue SET Quantite = @Quantite - @QteStc WHERE code_article = (@code_article)";
                                       cmd4.Parameters.AddWithValue("@Quantite", LastQteStock);
                                       cmd4.Parameters.AddWithValue("@QteStc", Qte_prod);
                                       cmd4.Parameters.AddWithValue("@code_article", TxtRefProduit.Text);
                                       sql_con.Open();
                                       cmd4.ExecuteNonQuery();
                                       sql_con.Close();

                                   }
                           }

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.