private void buttonX6_Click(object sender, EventArgs e) { if (dataGridViewX1.Rows.Count != 0) { String Nmvt = dataGridViewX1.SelectedRows[0].Cells["NuM"].Value + ""; String ent = "eentd"; String lent = "lentd"; String numero = "Devis"; String typedition = "D"; impression form = new impression(ent, lent, Nmvt, numero, typedition); form.ShowDialog(); } }
private void buttonItem8_Click(object sender, EventArgs e) { if (dataGridViewX1.Rows.Count != 0) { if (dataGridViewX1.SelectedRows[0].Cells["mode"].Value.Equals("D")) { String Nmvt = dataGridViewX1.SelectedRows[0].Cells["NuM"].Value + ""; String ent = "eentcs"; String lent = "lentcs"; String numero = "Facture"; String typedition = "F"; impression form = new impression(ent, lent, Nmvt, numero, typedition); form.ShowDialog(); } else if (dataGridViewX1.SelectedRows[0].Cells["mode"].Value.Equals("L")) { String Nmvt = dataGridViewX1.SelectedRows[0].Cells["NuM"].Value + ""; String ent = "eentcs"; String lent = "lentl"; String numero = "Facture"; String typedition = "FL"; impression form = new impression(ent, lent, Nmvt, numero, typedition); form.ShowDialog(); } else if (dataGridViewX1.SelectedRows[0].Cells["mode"].Value.Equals("B")) { String Nmvt = dataGridViewX1.SelectedRows[0].Cells["NuM"].Value + ""; String ent = "eentcs"; String lent = "lentcsb"; String numero = "Facture"; String typedition = "FB"; impression form = new impression(ent, lent, Nmvt, numero, typedition); form.ShowDialog(); } } }
private void buttonX6_Click(object sender, EventArgs e) { if (dataGridViewX1.Rows.Count != 0) { String Nmvt = dataGridViewX1.SelectedRows[0].Cells["NuM"].Value + ""; String ent = "eentcb"; String lent = "lentcb"; String numero = "Bon Comptoir"; String typedition = "B"; string impbon = ""; string sql = "Select value From parametre where param ='BonTicket'"; DataSet tmp = met.recuperer_table(sql); if (tmp.Tables[0].Rows.Count != 0) { impbon = (string)tmp.Tables[0].Rows[0].ItemArray[0]; } if (impbon == "Oui") { ds = new DataSet(); sql = "select * from exercice where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "'"; met.recuperer_table(sql, ds, "exercice"); sql = "select * from ste where code='" + Program.Societe + "'"; met.recuperer_table(sql, ds, "ste"); sql = "SELECT * FROM entete where codes='" + Program.Societe + "'"; met.recuperer_table(sql, ds, "entete"); sql = "select * from magasin where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "' and code = '" + Program.Magasin + "'"; met.recuperer_table(sql, ds, "magasin"); sql = "select * from " + ent + " where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "' and codem = '" + Program.Magasin + "' and num ='" + Nmvt + "'"; met.recuperer_table(sql, ds, "eentl"); sql = "select * from " + lent + " where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "' and codem = '" + Program.Magasin + "' and num ='" + Nmvt + "'"; met.recuperer_table(sql, ds, "lentl"); sql = "select * from client where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "' order by code"; met.recuperer_table(sql, ds, "client"); sql = "SELECT * FROM sarticle where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "' "; met.recuperer_table(sql, ds, "sarticle"); sql = "SELECT * FROM gamme where codes='" + Program.Societe + "' and codee = '" + Program.Exercice + "' "; met.recuperer_table(sql, ds, "gamme"); sql = "SELECT * FROM article WHERE codes='" + Program.Societe + "' AND codee='" + Program.Exercice + "' Order by code"; met.recuperer_table(sql, ds, "article"); commerciale.rptedit.Iticket ij = new commerciale.rptedit.Iticket(); ij.numero = numero; ij.ds = ds; ij.ShowDialog(); } else { impression form = new impression(ent, lent, Nmvt, numero, typedition); form.ShowDialog(); } } }