public FormTypeDocument(int type1, int id) { InitializeComponent(); type = type1; id1 = id; CacherErreurFr(); if (id != 0) { Entities.TypeDocument C1 = new Entities.TypeDocument(); DAL.DALTypeDocument D = new DAL.DALTypeDocument(); C1 = D.SelectById(id); BindDataToTheInterface(C1); } }
//private void labelDocuments_Click(object sender, EventArgs e) //{ // GestionDocument frm = new GestionDocument(id); // frm.ShowDialog(); //} //000////document///////// public void RaffraichirGridDoc() { mode = 0; DAL.DALDocuments d = new DAL.DALDocuments(); dt = d.SelectAllDocument(id); DGVDocument.Rows.Clear(); DAL.DALTypeDocument TDOC = new DAL.DALTypeDocument(); Entities.TypeDocument doc = new Entities.TypeDocument(); for (int i = 0; i < dt.Rows.Count; i++) { doc = TDOC.SelectById(int.Parse(dt.Rows[i][2].ToString())); DGVDocument.Rows.Add(doc.LibelleFr.Trim(), dt.Rows[i][4].ToString().Trim(), "Voir"); } DataTable dt200 = new DataTable(); DAL.DALTypeDocument t = new DAL.DALTypeDocument(); //dt200 = t.SelectAllTypeDocument(); //cmbTypeDocument.DataSource = dt1; //cmbTypeDocument.ValueMember = "IdTypeDocument"; //cmbTypeDocument.DisplayMember = "Code"; }