Showing posts with label eprise. Show all posts
Showing posts with label eprise. Show all posts

Friday, June 3, 2011

Silkroad Eprise: Publish page using C# Powercode

using System;
using System.Web;
using DotNetScriptEngines;
using System.Data;
using System.Data.SqlClient;

namespace Custom.EprisePublishPage{
class Publish {

// The 'main' entry point must exist.
public static void Main(String[] args){
EpsClient eps = new EpsClient(args[0]);
String objectId = "183880"; // the page object ID "<$client.URL.ObjectID>";
try
{

EpsEditPage pageToPublish = eps.GetEditPage(objectId);
pageToPublish.Save();
pageToPublish.SubmitForApproval("Some Comments here");
pageToPublish.Publish("Some Comments here");

}
catch (Exception ex)
{
eps.Write(ex.ToString());
}
}
}
}
Related Posts Plugin for WordPress, Blogger...