Programmatically nyeem Alerts rau cov neeg nyob rau hauv lub Site Collection

SPAlerCollection cov chav kawm ntawv yuav siv tau ntawm sau ceeb toom rau tus neeg siv.

Cov nram qab no chaws snippet yog siv los nyeem tag nrho cov alerts uas tau sau npe rau cov cov neeg kawm ntawv sau.

lwm yam
zoo li qub
khoob lug GetAlerts()

{


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


SPWeb currWeb = currSite.OpenWeb();


SPUserCollection collUsers = currWeb.Users;


sim

{


foreach (SPUser usr nyob rau hauv collUsers)

{


Console.WriteLine(“Alerts rau tus neeg siv : “ + usr.Lub npe);


foreach (SPAlert alrt nyob rau hauv usr.Alerts)

{


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

}

}

}


ntes

{

}


Console.ReadLine();

}

}



sau ntawv cia

Koj siv tau qhov cim npe no HTML

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