private void simpleButton4_Click(object sender, EventArgs e) { string etat = "en cours"; string etat_fac = "en cours"; string timbre = textBox5.Text; prixtotc = 0; double.TryParse(timbre.Replace('.', ','), out prixtotc); DataTable dt = new DataTable(); dt = fun.get_cltByDesign(lookUpEdit1.Text); string id_clt = dt.Rows[0][0].ToString(); if (gridView1.RowCount != 0) { for (int i = 0; i < gridView1.RowCount; i++) { DataRow row = gridView1.GetDataRow(i); fun.insert_piecee_commande1(row[0].ToString(), row[1].ToString(), Convert.ToDouble(row[2].ToString().Replace('.', ',')), row[10].ToString(), row[5].ToString(), row[8].ToString(), row[9].ToString(), id_clt.ToString(), tnumcommandebase.Text, row[6].ToString(), row[11].ToString()); } fun.insert_into_Commandepasse(tnbcmd.Text, id_clt, etat, lookUpEdit1.Text, etat_fac, textBox1.Text, textBox5.Text); MessageBox.Show("la commande est ajoutée avec succées veuillez consulter la liste des commandes crée"); this.Close(); passerCommande lcmdclt = new passerCommande(); lcmdclt.MdiParent = Form1.ActiveForm; lcmdclt.Show(); lcmdclt.BringToFront(); } else { MessageBox.Show("veuillez insérer les lignes de commande"); } }
private void navBarItem21_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { timer2.Start(); passerCommande ft = new passerCommande(); ft.MdiParent = Form1.ActiveForm; ft.Show(); ft.BringToFront(); }