Professional InfoPath 2003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional InfoPath 2003 [Electronic resources] - نسخه متنی

Ian Williams, Pierre Greborio

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید











status is set to Spiked or Filed.

Then, the function skeleton is as follows:


function msoxd__status::OnAfterChange(eventObj)
{
if(eventObj.Operation == "Insert" && eventObj.Site.text == "Filed")
{
// code here
}

if(eventObj.Operation == "Insert" && eventObj.Site.text == "Spiked")
{
// code here
}
}

Depending on the status of the story, some action is applied. If the status is Spiked, you have to update the modificationTime element with the current time. This can be done by simply changing the element content for all meta elements with status equal to Spiked:


if(eventObj.Operation == "Insert" && eventObj.Site.text == "Embargoed")
{
var objMetaNodes = XDocument.DOM.selectNodes("//meta");

for (var i = 0; i < objMetaNodes.length; i++)
{
UpdateModificationTime(objMetaNodes.item(i));
}
}

UpdateModificationTime is a custom function that selects the modificationTime node and sets the current date and time:


function UpdateModificationTime(metaNode)
{
var modTime = metaNode.selectSingleNode("modificationTime");
modTime.nodeTypedValue = GetCurrentDateTime();
}
function GetCurrentDateTime()
{
var now = new Date();
return now.getFullYear() + "-" + (now.getMonth() + 1) + "-" +
now.getDate() + "T" + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
}

If the story is accepted (status = Filed), you have to compute more information. Some of these, as you will see later, depend on database content.

/ 166