NTXHUAB: Muab kho dua ib daim ntawv teev kev cai

Muaj ntau ntau yam zoo qauv uas tau muab kho dua kev cai lub npe ntawm tus SDK. Ntawm no yog tseem muaj lwm.

Cov teeb meem ua lag ua luam: InfoPath daim ntawv twb tau tsim cov neeg enables sau hauv internet muas requisitions. PO kev thov xovtooj yuav tsum muaj tsoos sib lawv liag raws integer qhov tseem ceeb thiab payment txiav.

Kev hais haum ua lag ua luam: Tsim kev cai NTXHUAB sau uas muaj txhua ob: "ControlField" thiab "ControlValue". Cov qhia kiag muaj pes tsawg kev thov tom ntej purchase. Nco ntsoov tias cov generic "tswj" naming convention thiab muab tej liaj teb kom yav tom ntej uas yuav siv raws li xav tau.

Kev tov: Tsim rau Web site qhov accessed los rau tus thov kev pab InfoPath. Cov Web site qhov rov qab rau tus tom ntej purchase kev thov tooj thiab siab tus nqi ntawm daim ntawv.

Cov tshooj lus kawm:

  • Thaum ntxiv no cov qhov Web site li ib lub qhov ntaub ntawv daim InfoPath, Kuv pom tias nws yuav hloov mus rau ib udc thiab muab tso rau hauv cov tsev qiv ntawv kev twb kev txuas.
  • Kuv kuj pom tias nws yuav pab kom cov sau khaub lig scripting ntawm central services administration // ntaub ntawv los xyuas dua // daim ntawv neeg rau zaub mov configuration.
  • Thawj zaug hauv daim ntawv sim mus saib hauv web rau, nws yuav siv ib pliag thiab yuam, nws yuav lub sij hawm tawm. Kuv muaj nqis nyob hauv daim ntawv rau neeg rau zaub mov configuration los nthuav lub timeout chaw fiddled thiab uas pab seemed.

Qhov chaws:

siv Tsim;
siv System.Web;
siv System.Web.Services;
siv System.Web.Services.Protocols;
siv Microsoft.SharePoint;
siv System.Configuration;

[WebService(Namespace = "http://www.conchango.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
pej xeem hoob PoService : System.Web.Services.WebService
{
pej xeem PoService () {

//Cov lus hauv qab no kab yog siv tsim Cheebtsam uncomment
//InitializeComponent();
}

/// <txoj kev>
/// Kom coob PO tom ntej sharepoint po tooj tswj daim ntawv.
/// Increment tus PO xov tooj nyob hauv daim ntawv ntawd.
/// </txoj kev>
/// <rov qab los></rov qab los>
[WebMethod]
pej xeem hlua GetNextPoNumber()
{
hlua SpPoControlSiteName; // Lub npe ntawm lub txoos NTXHUAB kawm uas hosts PO kom daim ntawv.
hlua SpPoControlListName; // Lub npe ntawm sij NTXHUAB daim ntawv uas muaj kev tswjhwm Po.

SpPoControlSiteName = ConfigurationSettings.AppSettings["PoControlListHostingSite"].ToString();
SpPoControlListName = ConfigurationSettings.AppSettings["PoControlList"].ToString();

hlua nextPoReqNumber = "xyzzy";

siv (SPSite kawm ntawv = tshiab SPSite(SpPoControlSiteName))
{
siv (SPWeb Web = kawm ntawv. OpenWeb())
{

Splist.Update() currentList = web. Teev[SpPoControlListName];

foreach (SPItem controlItem nyob rau hauv currentList.Items)
{

Yog hais tias (((hlua)controlItem["ControlField"]).Qhov sib npaug("NextPoNumber"))
{
nextPoReqNumber = (hlua)controlItem["ControlValue"];

rau cov menyuam int_nextPoReqNumber;
int_nextPoReqNumber = Hloov ua lwm yam.ToInt32(nextPoReqNumber);

int_nextPoReqNumber ;

controlItem["ControlValue"] = int_nextPoReqNumber;
controlItem.Update();
}

} // Nrhiav, nyeem ntawv thiab muab kho dua tus PO xov tooj nyob hauv daim ntawv.


} // siv lub web spweb = site.openweb()
} // siv qhov chaw spsite = spsite tshiab("http://localhost/mizuho")

rov qab los nextPoReqNumber;

}
}

Ib tug xav rau"NTXHUAB: Muab kho dua ib daim ntawv teev kev cai

  1. KSP sau tau:
    Kuv tuaj los pov,
    Peb muaj ib tus zoo li koj yog mentioning zoo li cas, tiam sis qhov teeb meem no kuv xav mus siv no tus web servie neeg rau zaub mov tshuav load.Li no,de concurrency thov qhov no yuav ua li cas los yog li cas ua tshiab thov tos thiab thov ib tug xwb yuav tau hloov tus xov tooj sau txog ces tag nrho lwm yam thov yuav tsum tau nyob rau hauv que.Thov qhia rau kuv paub after no.
    Tsaug ua ntej.
    Teb

sau ntawv cia

Koj email chaw nyob yuav tsis muab luam tawm. Search cim *