private void navBarItem12_LinkClicked_2(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { passerCommandeFr passercmdfr = new passerCommandeFr(); passercmdfr.MdiParent = Form1.ActiveForm; passercmdfr.Show(); passercmdfr.BringToFront(); }
private void simpleButton4_Click(object sender, EventArgs e) { DataRowView rowView1 = (DataRowView)lookUpEdit1.GetSelectedDataRow(); if (rowView1 == null) { XtraMessageBox.Show("Choisir le fournisseur"); } else { if (id_cmd != 0) { UpdateCmdFournisseur(); } else { string etat = "en cours"; string etat_fac = "en cours"; string timbre = textBox5.Text; prixtotc = 0; double.TryParse(textBox5.Text.Replace('.', ','), out prixtotc); DataTable dt = new DataTable(); dt = fun.get_FeurByCode(lookUpEdit1.EditValue.ToString()); 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_commandefr(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_Commandefr(id_clt, etat, lookUpEdit1.Text, etat_fac, textBox1.Text, timbre, textEdit1.Text, textEdit2.Text, textEdit3.Text, textEdit4.Text, textEdit5.Text, textEdit6.Text, textEdit7.Text); MessageBox.Show("la commande est ajoutée avec succées veuillez consulter la liste des commandes crée"); this.Close(); passerCommandeFr lcmdclt = new passerCommandeFr(); lcmdclt.MdiParent = Form1.ActiveForm; lcmdclt.Show(); lcmdclt.BringToFront(); } else { MessageBox.Show("veuillez insérer les lignes de commande"); } } } }