private void button1_Click(object sender, EventArgs e) { if (dgv_Facture.SelectedRows.Count == 1) { DateTime dt = DateTime.Parse(dgv_Facture.CurrentRow.Cells[3].Value.ToString()); string dtn = dt.Day + "_" + dt.Month + "_" + dt.Year; string fileName = "\\" + "No" + dgv_Facture.CurrentRow.Cells[0].Value.ToString() + "_" + dtn + ".pdf"; AjtVente mdVnt = new AjtVente(int.Parse(dgv_Facture.CurrentRow.Cells[0].Value.ToString()), this, fileName, FrmAcc); mdVnt.ShowDialog(); } }
private void dgv_Facture_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (dgv_Facture.SelectedRows.Count == 1) { DateTime dt = DateTime.Parse(dgv_Facture.CurrentRow.Cells[3].Value.ToString()); string dtn = dt.Day + "_" + dt.Month + "_" + dt.Year; string fileName = "\\" + "No" + dgv_Facture.CurrentRow.Cells[0].Value.ToString() + "_" + dtn + ".pdf"; AjtVente mdVnt = new AjtVente(int.Parse(dgv_Facture.CurrentRow.Cells[0].Value.ToString()), this, fileName, FrmAcc); mdVnt.ShowDialog(); } } catch (Exception ex) { MessageBox.Show("هناك خطأ أثناء العملية المرجوا إعادة المحاولة"); string Err = "[" + DateTime.Now + "] [Exception] __ [Form :" + this.Name + " ; Button: " + sender.ToString() + " ; Event: " + e.ToString() + "] __ ExceptionMessage : " + ex.Message; Acceuil.WriteLog(Err); } }
public MdfProduit(int idP, AjtVente f) { InitializeComponent(); idpr = idP; frmAjV = f; }