1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| private void dataGridViewX1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
{
//try
//{
DataTable dt = new DataTable();
String Matricule = dataGridViewX1.CurrentRow.Cells[1].Value.ToString();
dt = Data_Entity.DataMission.GetTypeCarburant(dataGridViewX1.CurrentRow.Cells[1].Value.ToString());
String TypeCarburant = "";
TypeCarburant = dt.Rows[0]["Type_carburant"].ToString();
//MessageBox.Show(TypeCarburant);
long Kilometrage = long.Parse(dataGridViewX1.CurrentRow.Cells[13].Value.ToString());
String Objectif = dataGridViewX1.CurrentRow.Cells[10].Value.ToString();
String Utilisateur = dataGridViewX1.CurrentRow.Cells[3].Value.ToString();
String Destination = dataGridViewX1.CurrentRow.Cells[2].Value.ToString();
DateTime datedepart = DateTime.Parse(dataGridViewX1.CurrentRow.Cells[5].Value.ToString());
DateTime dateretour = DateTime.Parse(dataGridViewX1.CurrentRow.Cells[7].Value.ToString());
String Participant = dataGridViewX1.CurrentRow.Cells[4].Value.ToString();
ReportParameter Matriculee = new ReportParameter("Matricule", Matricule);
// ReportParameter Kilometragee = new ReportParameter("Kilometrage", Kilometrage.ToString());
ReportParameter objectiff = new ReportParameter("Objectif", Objectif);
ReportParameter Utilisateurr = new ReportParameter("Utilisateur", Utilisateur);
ReportParameter Destinationn = new ReportParameter("Destination", Destination);
ReportParameter datedepartt = new ReportParameter("Datedepart", datedepart.ToString("yyyy-MM-dd"));
ReportParameter dateretourr = new ReportParameter("Dateretour", dateretour.ToString("yyyy-MM-dd"));
ReportParameter Participants = new ReportParameter("Participants", Participant);
ReportParameter TypeCarburantt = new ReportParameter("Type", TypeCarburant);
reportViewer1.LocalReport.SetParameters(new ReportParameter[] { Matriculee
,objectiff, Utilisateurr,Destinationn, datedepartt ,dateretourr,Participants,TypeCarburantt
});
this.reportViewer1.RefreshReport();
//}
//catch (Exception) { }
} |
Partager