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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
private void AfficherPJ(List<string> l)
{
PanelDynamique.Controls.Clear();
//on affiche les fileupload
Label lab;
FileUpload f;
Panel pan;
Panel p1;
string Madate = "";
if (ListePI.Count > 0)
{
BtnEnvoyerPJ.Visible = true;
foreach (PI _p in ListePI)
{
pan = new Panel();
pan.GroupingText = "PI " + _p.NumPI;
PanelDynamique.Controls.Add(pan);
int x = 0;
//pj de la PI
p1 = new Panel();
f = new FileUpload();
f.ID ="PI" + _p.Id;
lab = new Label();
lab.Text = "PI : ";
p1.Controls.Add(lab);
p1.Controls.Add(f);
pan.Controls.Add(p1);
foreach (Demande _d in _p.Listedemande)
{
f = new FileUpload();
Madate = _d.DateDemande.Replace("/", "_");
Madate = Madate.Replace(":", "_");
f.ID = Madate;
lab = new Label();
lab.Text = "Ref " + _d.Ref;
p1 = new Panel();
p1.Controls.Add(lab);
p1.Controls.Add(f);
pan.Controls.Add(p1);
}
}
} |
Partager