Programmatically Retrieve Orodha ya Maktaba Document

zifuatazo Snippet code ni kutumika kutafuta orodha ya maktaba hati.

SPWeb _web = SPContext.Current.Web;

SPListCollection ListColl = _web.Lists;

foreach (SPList _lst katika ListColl)

{

kama (_lst.BaseTemplate == SPListTemplateType.DocumentLibrary)

Novemba 26, 2009 | Tags: , , | Jamii: Moss 2007, SharePoint Object Model | Kuacha maoni

Jinsi ya kutumia rasilimali File katika SharePoint 2007

Kujenga Rasilimali faili kutumia Visual Studio IDE

Nakala faili rasilimali katika 12 mizinga ya rasilimali folder

GetLocalized njia kutoka SPUtility kusoma maadili kutoka faili rasilimali

Syntax:

SPUtility.GetLocalizedString(“$Rasilimali:<<ResourceFileName,ResourceKeyName>>”, “<<ResourceFileName>>”, muda mrefu);

Mfano:

SPUtility.GetLocalizedString(“$Rasilimali:MyResources,FIRSTNAME”, “MyResources”, muda mrefu);

Chanzo sampuli:

Novemba 8, 2009 | Tags: , , | Jamii: Moss 2007, SharePoint Object Model | Moja comment

Programmatically Soma Alerts kwa Watumiaji katika Collection Site

Darasa SPAlerCollection inaweza kutumika kupata Collection Alert kwa mtumiaji.

Snippet chini code ni kutumika kwa kusoma alerts wote waliosajiliwa kwa ajili ya watumiaji wa ukusanyaji tovuti.

tuli GetAlerts binafsi utupu()

{

SPSite currSite = SPSite mpya(“http://Uday”);

SPWeb currWeb = currSite.OpenWeb();

SPUserCollection […]

Jinsi ya kuweka Interval kwa Alerts katika SharePoint 2007

Kuweka timer kazi ya muda kwa alerts unaweza kuweka kwa kutumia setproperty kwa ajili ya mali kazi-haraka-alerts amri katika stsadm.

Syntax:STSADM-o-getproperty pn kazi-mara moja-alerts-PV <mali ya thamani ya> -url <URL ya Tovuti>

Mfano:STSADM-o-getproperty pn kazi-mara moja-alerts-PV “kila 2 dakika” -url http://Uday

[…]

Jinsi ya Hariri InfoPath XML File katika Library Forum Programmatically katika SharePoint 2007

chini ya mistari ya Snippet code ni update xml infopath rekodi(file)

SPWeb _web = SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];

MemoryStream myInStream = MemoryStream mpya(item.File.OpenBinary()); XmlTextReader msomaji = XmlTextReader mpya(myInStream);

XmlDocument doc = mpya XmlDocument(); doc.Load(msomaji);

reader.Close(); myInStream.Close();

XmlNamespaceManager nameSpaceManager = XmlNamespaceManager mpya(doc.NameTable); nameSpaceManager.AddNamespace(“yangu”, “http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);

doc.DocumentElement.SelectSingleNode(“yangu:Hali ya”, nameSpaceManager).Ndani Nakala = “Kuokolewa”; […]

Kupata Job Alerts Interval Timer

Kupata Interval timer kazi kwa alerts inaweza Rudishwa kwa kutumia amri getproperty katika stsadm.

Syntax:STSADM-o-getproperty pn kazi-mara moja-alerts-url <URL ya Tovuti>

Mfano:

STSADM-o getproperty -pn kazi-haraka-alerts -url http://Uday

Set Duration kwa Kiashiria New Icon katika SharePoint

Kwa Set Duration kwa icon New katika SharePoint (kiashiria ambayo inaonyesha karibu na vitu mpya) kupata SharePoint WebApplication kitu na kuweka thamani ya DaysToShowNewIndicator.

SPWebApplication webapp = SPWebApplication.Lookup(mpya Uri(WebAppURL.Text));

WebApp.DaysToShowNewIndicator = 3;

WebApp.Update();

[…]

Imetolewa SPDisposeCheck!

SPDisposeCheck v1.3.1 imekuwa iliyotolewa MSDN Code Nyumba ya sanaa, http://code.msdn.microsoft.com / SPDisposeCheck. Chombo hiki kusaidia kuboresha ubora wa SharePoint makanisa yako. Itakuwa kukagua SharePoint makanisa yako na kuangalia kwamba wewe ni usahihi kutupa baadhi ya vitu SharePoint (IDisposable vitu ambayo ni pamoja na SPSite na SPWeb). chombo ni ya msingi juu ya uongozi kuchapishwa katika hii […]

Programmatically Mwisho Orodha ya Yaliyomo katika SharePoint

Hi Devs,

Chini ni Code Mfano kwa update orodha Sharepoint maudhui programmatically kwa kutumia SharePoint Object Model.

SPSite Site = mpya SPSite(“http://kwenye localhost:21000”); SPWeb Mtandao = Site.OpenWeb(); SPList Orodha = Web.Lists[“Anwani ya Kitabu”]; SPListItem ListItem = List.GetItemById(0);

string FullName = string.Empty;

FullName = ListItem[“FIRSTNAME”].ToString() + ListItem[“Jina la familia”].ToString(); SPListItem[“FullName”] = FullName; ListItem.Update();