Programmatically Aqra Allerti għall-utenti fl-ġbir tas-sit

Klassi SPAlerCollection jistgħu jintużaw biex jiksbu l-Ġbir ta 'Twissija għall-Utent.

Il-snippet kodiċi hawn taħt jintuża biex jaqra kollha allerti reġistrati għall-utenti ta 'ġbir tas-sit.

privat
statiku
null GetAlerts()

{


SPSite currSite = ġdid
SPSite(“http://uday”);


SPWeb currWeb = currSite.OpenWeb();


SPUserCollection collUsers = l currWeb.Users;


jippruvaw

{


foreach (SPUser usr fl collUsers)

{


Console.WriteLine(“Allerti għall-Utent : “ + usr.Name);


foreach (SPAlert alrt fl usr.Alerts)

{


Console.WriteLine(alrt.Item.Title + ” –> “ + alrt.AlertFrequency);

}

}

}


qabda

{

}


Console.ReadLine();

}

}



Leave a Reply

Tista 'tuża dawn it-tags HTML

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>