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
|
List<string> list_comm = Profil.GET_COMMERCIAUX(Session["session"].ToString());
Panel _pan = (Panel)this.Page.Master.FindControl("Pan_ADV");
PROD _produit = new PROD ();
Label _lb_prod = new Label();
_lb_prod.ID = "lb_prod";
_lb_prod.Text = "Demande en cours : ";
_lb_prod.ForeColor = System.Drawing.Color.Red;
_pan.Controls.Add(_lb_prod);
int count = 0;
foreach (string _user in list_comm)
{
count += _produit.GET_PROP_COM(_user).Count;
}
int cpt = 0;
foreach(string _user in list_comm)
{
foreach (PROD _unit in _produit.GET_PROP_COM(_user))
{
cpt++;
HyperLink _hl = new HyperLink();
_hl.ID = "hl"+_unit .identifiant;
_hl.NavigateUrl = "MonURL";
if(count == cpt)
_hl.Text = _unit .identifiant + " de " + Utilisateur.GET_NOM_PRENOM_FR_LOGIN(_user).nom + " " + Utilisateur.GET_NOM_PRENOM_FR_LOGIN(_user).prenom + ".";
else
_hl.Text = _unit .identifiant + " de " + Utilisateur.GET_NOM_PRENOM_FR_LOGIN(_user).nom + " " + Utilisateur.GET_NOM_PRENOM_FR_LOGIN(_user).prenom + " / ";
_hl.ForeColor = System.Drawing.Color.Red;
_pan.Controls.Add(_hl);
}
} |