Yooj yim thiab ceev thaum: Provision ib lub Web Site uas siv SharePoint kwv qauv hauv C#

Kuv sim searching rau me ntsis snippet rau chaws uas yuav ua li cas kuv yuav tsim ib SPWeb tshiab nyob rau hauv ib qhov chaw sau ntawv. Kuv tsis nrhiav nws ceev nrooj los yooj yim raws li kuv paub zoo ces kuv xav tias kuv yuav ncuav ua ke me ntsis nkag teb chaws rau cov kawm.

Cov cai no ua ib qho Wiki site:

 SPSite siteCollection;

    siteCollection = tshiab SPSite("http://conchang-o9l8qi");

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("xyzzy", "xyzzy Title",
        "xyzzy hauj lwm", 1033, SPWebTemplate.WebTemplateWIKI, tsis tseeb, tsis tseeb);

Kuv thawj zaug kev luag tshawb tau tejyam vim kuv twb nrhiav tau rau cov nqe lus xws li "provision ib lub web site uas siv cov qauv kwv sharepoint" thiab cov zoo li.

Yog hais tias koj nrhiav rau cov "Webs.Add()", koj mam li nrhiav ib tug xov tooj uas pab tau heev blog nkag, Cov khoom MSDN thiab SDK cov ntaub ntawv uas yuav mus rau qhov tob no kawm. Kuv twv yuav raug hu kom qhov chaw nov.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Integrate SharePoint Designer Workflows nrog cov qhov Web Services

Kuv twb tau ua si ib ncig nrog rau tej yam kev cai rau SharePoint Designer rau tej lub sij hawm (saib ntawm no rau tej yam khoom uas koj xav paub, Yog hais tias qhov uas nyiaj koj).

Nyob rau hauv kuv qhov project no, peb yuav tau ua ib co haum heavy lifting thiab peb xav kom siv cov declarative SPD workflow kom raug raws txoj kab ua lag ua luam.

Ntev dab neeg luv luv, qhov no tej zaum nkaus. Kuv Codeplex peb tes num yuav ua tau rau tus "nws qhov ncua kuv" thiab tam sim no peb yuav ua tau rau tus Web site qhov ncaj qha los ntawm ib lub workflow SPD.

Ntawm no yog lub npe:

 pej xeem hlua Dispatcher(
        Guid WebID, // Dhau ntawm qhov ib puag ncig runtime
        Guid SiteID, // Dhau ntawm qhov ib puag ncig runtime
        hlua ListID, // Dhau ntawm cov khoom (tsis paub vim li cas qhov no yog ib txoj hlua, tsis muaj GUID)
        rau cov menyuam ListItemID, // Dhau ntawm cov khoom.
        hlua XmlMessage) // Dhau ntawm tus neeg siv raws li tus me nyob rau hauv SPD.

Fact uas peb tau txais ntawm cov ntaub ntawv tseem ceeb workflow leverages no, zoo li lub site, daim ntawv ID, yam. Qhov no thiab yav tas los nyob rau ntau qhov chaw rau cov neeg uas koj xav npaj koj tus kheej tej yam kev cai. Tsab cai idea yog extract cov XML hlua li yog muab los ntawm cov neeg siv yuav dispatch ib txoj kev zoo. Fun khoom!

Sadly, qhov no nws yog obviously ib daim pib mus rau "Loosey Goosey" txawv los tiv thaiv daim av, tab sis, nws yog ib qho zoo tshaj los tsoo lub cib ntsa 🙂

Yog muaj kev txawv los tiv thaiv yog tias koj ua nws txawm tias koj paub tias nws yog ib cov qauv los tiv thaiv?

Kuv vam los qhwv qhov no nyob rau hauv Codeplex near yav tom ntej. Yog hais tias koj xav kom kuv ua tau li, muab kuv taum (email los yog tawm ib saib) Kuv mas li uas txaus siab heev hais txog ua 🙂

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati: ,

Sunday Funny: “Kuv xav hais tias koj lo lus zais yog …”

Tau kuv nyuam qhuav yuav su noj rau kuv cov kwv tij (li qub) thiab peb twb tuaj tham tsis tau txog funny yam uas peb ua rau peb cov qib siab duas paub. Rau kuv alma mater, Lafayette College, cov kev kawm txhawb nws koom tau ib txoj kev tes heev txog nws. Peb kuj tau hlua heev thiab kuv thiaj coj kom zoo dua uas lub caij.

Ob tug kuv nyiam kev puas txheeb rau kuv tus phooj ywg zoo, Gabe. Nws kom muaj qhov yuam kev phem heev uas qhia rau tus neeg nws freshman xyoo tias "Kuv yog ib tug freshman, tab sis kuv muaj los sis qib thoob" vim cov kawm siab heev tso kawm ntau yam nws tau noj, yam. Ntau peb tau mob(nurses) situated, tiam sis peb tsis tham txog nws npaum li. Nws senior xyoo, Thaum peb ua tswvcuab nws kom cov neeg, peb yuav hais tias "no yog Gabe. Nws yog ib qhov kev, tiam sis nws muaj los sis qib thoob ".

Cov kawm ntawv qib siab muaj tej hnub workstation/servers si laim X-qhov rai. Lawv yuav tsum saib gigantic thiab cov engineers siv lawv CAD thiab lwm tug engineer boring khoom. Peb CS neeg siv lawv kawm tau programming thiab, tau mas, mus ua si.

Peb tsis li lub computer-tsis paub pab engineers kom ntau ntau li peb nyiam yam uas yuav ua ib tug yuav mus telnet rau lub thawv lawv tau nyob thiab khiav X-qhov muag nws. Qhov no yuav pop li ib ob lub qhov muag uas ua raws li tus nas ib ncig ntawm qhov screen nkawm. Koj yuav pop los tseem tshaj thiab muaj cia teb los yog ntau dua cov kev siv X-qhov muag si laim. Tau muab ua kom luag nrov nrov tawm thaum ib tug engineer hapless sim mus kaw qhov muag X X-muag thiab muttering raws li nws ua tsis taus pa los txog nws tsis 🙂

Peb kuj ua si X-trek rau cov thawv. Yuav kom paub, koj yuav tsum mus download tau yog qhov, tau ntau dependencies peb txog qhov twg koj yuav nrhiav tau cov ntawv thiab tuam nws. Kuv tsis yog ib tug sophisticated C programmer, tab sis kuv txawj nyeem ntaub ntawv header. Kuv nrhiav ntawm no thiab pom zoo ib yam li cov kev tswj "#DEFINE MAX_TORPEDO_DISTANCE 10". Kuv ua si ib ncig uas uas ua rau kom ntau thiab hwj huam rau theem thiab torpedoes, rov los ua nws thiab ces puas Gabe lwm zaus peb ua si.

Gabe kuj yog kiv cua ntawm tus yeeb yam TV hu ua loj loj Lub Blake 7. Kuv twb tsis pom nws, tab sis cov uas ho tsis kom kuv txhob insisting tias Dr. Leej twg yog tus yeeb yam superior. Cov lus yuav tau dua lub caij 🙂

Muaj ib hnub, nws tshwm sim rau kuv hais tias kuv yuav zaum kwv yees nws lo lus zais UNIX. Kuv zaum ze nws ib hnub thiab tshaj tawm rau ib tug laus nrov, "Kuv yuav twv koj lo lus zais tamsim, Gabe." "muaj, txoj cai" yog nws teb tias. Kuv ces in thiaj li tso, nkag mus rau nws cov neeg siv daim id, nres tsis fim nws, ntaus thiab hais nrov nrov., "Kuv xav tias nws yog B-L-A-K-E-7" ? So typing lawm yeej tsis them li handsomely li cas hnub ntawd nws.

lub lim piam tom ntej (los sai sai): Ntau lub chav antics ntawm kev kawm ntawv qib siab.

Koj puas muaj tej yam qhia? Cia ib tug saib los yog tug kuv thiab kuv mam li luam tawm tsab lawv ntawm no.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Me pej xeem ntawv tshaj tawm: Qhov rais tej chaw nyob ruaj ntseg thiab chaw Contacting tswv

Kuv tau txais ib handful cov lus los ntawm tus neeg ntawm tus built-in "xa lus" nuj nqi Microsoft qhia nrog rau tej qhov chaw nyob (uas tseem hosts kuv blog) txhua txhua lub hli.

Ib feem peb ntawm lub sij hawm, cov neeg siv cov muaj ruaj lawv tus account nyob tej qhov chaw xws tias kuv teb tsis tau lus. Qhov no yog tej yam los tiv thaiv spam feature kuv xav tias.

</kawg>

Tej yam yooj yim piav: “Tus nqi tsis poob li ntawm txoj kev tsim kev khwv.”

HLOOV TSHIAB: Ib daim ntawv loj loj anonymous tshuav ib koob saib txog lub npe. Nco ntsoov nyeem nws.

Thaum ua hauj lwm nrog cov kev tshwm sim receivers thiab lwm yam cai references SharePoint daim ntawv teev khoom ntawm tus kwv qauv, Kuv yeej ua yuam kev uas ua kom muaj qhov yuam kev ntawm runtime:

Yuam kev chaw thau khoom thiab khiav cov kev tshwm sim receiver Conchango.xyzzyEventReceiver nyob xyzzy, Version = 1.0.0.0, Culture = nruab nrab, PublicKeyToken = 0dc50a750396c3ac. Xav paub ntxiv hauv qab no yog. : Tus nqi tsis poob tsis pub dhau lub expected ntau yam.

Kuv xav tias qhov no yog ib qho yuam kev lawm generic haum uas uas vim muaj ntau yam. Txawm li cas los, ib cov lus qhia yog tias kuv nyob referencing teb incorrectly. Yog hais tias lub teb lub npe yog "Hnub so", Kuv yuav tsum reference nws zoo li no nyob rau hauv ib qhov kev tshwm sim receiver:

zog.ListItem["Hnub"]

Thaum twg kuv misspell los siv rau rooj plaub no tsis ncaj ncees lawm thaum referencing lub teb, SharePoint generates cov saum no lum runtime yuam kev. Piv txwv, qhov no tsis yog lawm:

zog.ListItem["hnub"]

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Cov neeg siv kawg ntsis ceev: Tsi Views nyob rau hauv ib daim ntawv qiv, Sau, yam.

Peb yuav tau, yuav tsum tau thiab tsim views ntau nyob rau hauv SharePoint muaj npe (daim ntawv qiv, kev cai npe, yam). SharePoint yeej teev muaj views hais alphabetical. Peb yuav hloov tsis tau qhov no uas siv rau hauv lub thawv functionality. Yog hais tias nws yuav ua tau ntawm customization (thiab kuv tsis paub hais tias nws yuav), Nws yog kev mus deb rau koj cov neeg siv kawg raug.

Yog hais tias koj xav tswj tau qhov kev txiav txim nyob rau hauv cov SharePoint uas teev muaj views, cias prepend tus xov tooj los yog tsab ntawv mus rau tus saib npe, raws li nyob rau hauv:

1 – Los ntawm hom Material
2 – Tag nrho cov ntawv
3 – Hnub so

-los sis-

IB – Los ntawm hom Material
B – Tag nrho cov ntawv
C – Hnub so

Kuv kuj tsim nws lub hom phiaj yog nruj me ntsis mus noj ib KPI views. Kuv tau soj qab no naming convention:

Z_KPI_[hauj lwm lawm]

Uas ua rau cov "KPI kuv" views los tshwm sim rau daim ntawv hauv qab.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati: ,

Sunday Funny: “Thaum kuv muaj ib tug me tub”

Ib tug niam txiv, qhov chaw raws li cov kab kuv sab hauv "thaum kuv muaj ib tug me tub" ua kom yuam kev.

Kuv tus tub, tej zaum plaub los tsib lub sij hawm, ua si ib zais pa thiab tsis nyiam cov me tub hluas uas ua si nrog balloons, nws plaws tom. Nws chim heev. Lub ntiaj teb twb tuaj nto. Kuv hais rau nws, "thaum kuv muaj me tub, Kuv muaj ib tug zais pa thiab plaws tom nws thiab nws thiaj li, Kuv tau txais ib tug tshiab zais pa." Nws seemed kom pab nws khwv nws tsi paub daws thiab coj mus muaj kev lom zem nrog lawv tham txog dab tsi yog ib yam li thaum kuv muaj ib tug me tub.

Uas ua hauj lwm zoo raws li tus txheej txheem consolation thiab kuv siv ib ob peb zaug dhau lub sij hawm uas tom ntej. Kuv puas tau mus raug teeb meem ib zaug thaum nws dab Rancher 3 zeej tuag. Kuv tham txog kuv tus aub, Tub fuabtais, muaj tuag hauv tsheb sib tsoo. Lub sij hawm no, yog nws teb, "Tam sim no kuv hnov ob txog tej yam phem!" Kuv shied txhob siv cov "thaum kuv tus me tub" cov txheej txheem rau consolation tom qab ntawd.

Ua ntej cov dev tuag xwm, Txawm li cas los, Kuv yuav tsum tau pib siv tus txheej txheem convince nws ua haujlwm. "Thaum kuv muaj ib tug me tub, Kuv yuav tsum tau tawm rooj thiab txais cov ntawv xov xwm", "ntxuav kuv chav", "tau Mommy nws lub khob kas fes", yam.

Dhau qhov no zoo zoo nkauj ib pliag, tab sis, nws pib qhia rebel tiv thaiv tsis tau qhov tyranny ntawm kuv thaum yau. Kas, hauv particular, cim xaus. Kuv hais kom nws coj lub kaus poom khib nyiab ntawm teeb rov qab mus rau qhov chaw rau tsheb. Nws tau argued thiab kuv yeej teb, "Thaum kuv muaj ib tug me tub, Kuv yuav tsum tau nqa lub khib nyiab rov qab mus rau qhov chaw rau tsheb." Nws yeej teb, "Huag muaj! Zoo thaum koj tau ib tug me tub, uas yog STUPID!".

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Views thiab txhua rau npe thiab daim ntawv qiv tsis tau yuav ruaj

HLOOV TSHIAB (02/29/08): No yog ib qhov codeplex tshiab rau nkawd muab rau phiaj txhua tug: http://www.codeplex.com/SPListDisplaySetting. Yog hais tias koj muaj tej kev ua hauj lwm nrog nws, thov cia ib saib.

Rooj sab laj zog nquag hais ib lo lus nug li no: "Kuv muaj ib tug neeg saib xyuas pom thiab thiab tus neeg ua hauj lwm pom ntawm ib daim ntawv teev. Cas ua kuv luag cov neeg saib xyuas pom kom neeg ua hauj lwm yuav tsis siv nws?"

Lawv tseem pheej hais lwm yam lus nug: "Kuv xav kom muaj kev metadata sab kom tswj xwb tej zaum yuav txawv ntawd qhia kiag thaum lwm tus tsis txawm pom nws."

Cov lus teb hais txog leej WSS 3.0 thiab NTXHUAB:

  • SharePoint tsis muab qhov nyiaj them yug tawm-of-the-kem rau phiaj views.
  • SharePoint tsis muab qhov nyiaj them yug tawm-of-the-kem kev ruaj ntseg txhua.

Muaj ntau ntau hom kev kawm ib yuav ua raws li uas raws li tej yam kev ruaj ntseg yuav tsum. Ntawm no yog kuv yuav xav li cas txog:

  • Siv cov khoom tawm-ntawm-tus-kem theem ruaj ntseg. Ib txwm views tsim yam ruaj ntseg kawm configuration. Tej receivers thiab/los yog workflow yuav automate cov ntus ruaj ntseg.
  • Siv koj tus kheej views rau "privileged" views. Cov no yog cov yooj yim txaus teeb. Txawm li cas los, vim lawv "koj tus kheej" xwm, Cov no yuav tsum tau configured rau txhua tus neeg. Siv kev ruaj ntseg txheem configuration tiv thaiv leej twg los ntawm peb tus kheej saib.
  • Siv ib cov ntaub ntawv saib web feem thiab siv tej yam kev ruaj ntseg rau AJAXy trimming kua.
  • Dov rau koj daim ntawv teev zaub functionality thiab teeb ruaj ntseg trimming nyob sab.
  • Hloov cov ntaub ntawv cov ntaub ntawv nkag teb chaws thiab siv JavaScript tau nrog rau cov qauv ruaj kom muaj kev theem sab kev ruaj ntseg trimming.
  • Siv ib daim ntawv InfoPath rau cov ntaub ntawv nkag teb chaws. Kev ruaj ntseg kem duas trimming ntawm cov Web site qhov kev pab hu SharePoint thiab conditionally nkaum tom teb raws li xav tau.
  • Dov rau koj tus kheej ASP.NET tej ntaub ntawv nkag teb chaws muaj nuj nqi uas implements kem theem kev ruaj ntseg trimming.

Yog tsis muaj cov kev xaiv tiag tiag li yawm suab, tiamsis nws muaj tsawg kawg yog ib txog kev ua raws li yog hais tias koj xav tau, Txawm hais tias nws yog ib qho nyuaj.

CEEB TOOM: Yog hais tias koj nqes ib yam ntawm cov paths, tsis txhob hnov qab txog "kev-> Qhib cov qhov rais Explorer". Koj yuav tau nco ntsoov tias koj kuaj mob ntawd feature kom paub tseeb tias nws tsis ua hauj lwm raws li ib tug "qhov rooj nram qab" thiab defeat koj lub tswvyim ruaj ntseg.

Yog koj muaj lwm cov tswv yim rau los yog rua cov paub phiaj txhua los views, thov email rau kuv los yog tawm ib saib thiab kuv mam hloov no xo raws li tsim nyog.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Nreeb taub: BDC ADF Version tooj yog koj cov phooj ywg

Yog koj nyob nraum tes-coding ADF ntaub ntawv thiab ua chaws/ntshuam/kuaj mus ntau ntau, siv tus xov tooj version yuav ua rau koj lub neej yooj yim.

Kuv yuav lees nws ntxub, tab sis, txog rau lub lim tiam no, Kuv twb yeej Hmong cov ADF thiab rov importing nws. Qhov no yuav tawg kuv ua lag ua luam cov ntaub ntawv txhua thiab ua rau kuv rov wire lawv. Tag nrho ruaj.

Daim ntawv no nyob rau hauv "yog cuab kev thaum koj pom nws".

Piv txwv:

<LobSystem
xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-lom" xsi:schemaLocation="http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Hom="WebService" Version="1.2.0.0" Lub npe="xyzzyDocumentReview" xmlns="http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalog">

Tias version thiab rov import thiab ib lub lag luam cov ntaub ntawv sab siv kho tshiab cov version yeej uas tsis muaj ntxiv configuration yuav tsum tau hloov.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Kua: BDC Picker qhia tau hais tias tsuas muaj ib sab ntawm lub ntsiab

Hauv kuv npaj siab rau mus ntawm kev muab ib pab tau ntau lookup sab siv BDC, Kuv ntaus ib phab ntsa nrog rau lub BDC picker. Yog hais tias koj tsis tau pom nws, cov BDC picker yog zoo li ib tug neeg picker tsuas tias nws ua haujlwm nrog rau txhua yam "lag luam cov ntaub ntawv".

Koj saib tau cov picker los txhaj rau lub icon qhib phau ntawv uas qhia tus lag luam cov ntaub ntawv kiag li:

duab

Cov duab saum toj no qhia tau hais tias ib lub lag luam cov ntaub ntawv kem hu ua "Tswv daim ntawv Id". Qhia kiag qhov txuas nrog, ntawm BDC, rau qhov Web site. Cov Web site qhov rov txhua ob lus: Daim ntawv ID thiab Title. Tus ua hauj lwm ntawm no yog muab ib "daim ntawv no yog xyuas los ntawm" muaj nuj nqi. Cov neeg siv xaiv ib tug "tswv" ntaub ntawv thiab thaum lawv tseg, ib qhov kev tshwm sim receiver copies meta liaj teb cov ntaub ntawv los ntawm tus tswv tsuav.

Los vim, cov BDC picker zoo li no thaum kuv nrhiav kom tau ib qho ntaub ntawv uas nws daim ID = "38":

clip_image002

Tus ntawd yog yuav pab tau, tab sis tsis zoo txaus. Neeg tsis xav saib raws tawm lawv tus ID, lawv xav hais tias ntawd lub npe thiab/los yog lwm yam ntaub ntawv meta. Tus picker no tso cai rau koj mus nrhiav tau rau ntawm lwm txhua (e.g. Npe) tab sis yuav tsis qhia tau tias daim ntawv ntawm lub npe uas nws pom tseeb, tos lawv DocId tus li no:

clip_image002[1]

(Txhaj tshuaj ntsuam tsis zoo li ntawd, vim kuv tsis de mus nrhiav rov rau tej kev ntsuam mhuv, tab sis koj pom tau tias yog nws tau pom ib co ntsiab, nws yuav tsuas pom tus DocId, tsis tau muaj lub npe).

High tsis nrhiav rau lo lus teb rau qhov no thiab ua tsis tau tejyam. Kuv colleague, lub venerable Jonathan Bradshaw, muaj muag thiab solved no qhov teeb meem. Thaum kuv mus txog nws tau kev pab, Nws taw kuv ua raws li siab xav.

Configure lub picker qhia ntau txhua ntawm "ShowInPicker cov" cov cuab yeej nyob hauv lub ADF:

<Khoom Lub npe="ShowInPicker" Hom="System.Boolean">tseeb</Khoom>

Nyob rau ntau yam:

  <!-- Npe -->
  <TypeDescriptor TypeName="System.String" Lub npe="Npe" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Npe</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Khoom>
      <Khoom Lub npe="DisplayByDefault" Hom="System.Boolean">tseeb</Khoom>
      <Khoom Lub npe="ShowInPicker" Hom="System.Boolean">tseeb</Khoom>
    </Khoom>
  </TypeDescriptor>

Teev cov cuab yeej no ua kom paub cov teeb meem me. Thaum koj teev nws ib zaug, koj yuav tsum muab tso rau txhua sab koj yuav tau qhia. Hauv kuv tsev neeg, BDC picker tsom DocId yog vim. Txawm li cas los, ib zaug kuv ntxiv "ShowInPicker" rau npe, DocId tsis tso tawm kom pom. Kuv solved uas los ntawm ntsees teev cov cuab yeej ShowInPicker rau Doc ID.

Ntawm no yog cov:

duab

(Kuv mam li piav qhov odd-looking "168 – CamlSchema.xsd" siv hauv lub tsev xa blog yav tom ntej. Hauv ntej, Nws yog ib txoj hlua concatenated pub rau cov neeg siv kev zoo me ntsis).

tau mas, daim ntawv no qhov nkag teb chaws blog, Kuv cia li tsis nrhiav ib tug "ShowInPicker" ua heev heev hits, xws li cov no ib: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. Nws qhia txog lub ntsiab ntawm qhov cuab yeej nrog rau ib co lwm zoo BDC khoom.

</kawg>

Subscribe rau kuv blog!

Ntawv cim npe Technorati: