====== Web-Plugin Code ======
To integrate your aspx page in the eBiss Web Page you have to implement eBiss.Api.IWebPlugin and we recommand to inherit from class eBiss.WebPlugin.Sample.WebPluginBasePage instead of Page.
In your Page_Load you call base.OnPageLoad() to check and initilize the EBissSession.
[DisplayName("Name Of Sidemenu Subpoint")] //This Attribut will be the name of the sidemenu subpoint.
public partial class SamplePage: WebPluginBasePage, IWebPlugin
{
//Implement interface member
public WebPageKind Kind
{
get { return WebPageKind.RootPage; }
}
//1. if DisplayName is not set, groupname will be used.
//2. Identifier for the pages. One Group is able to have more than one page
public string GroupName
{
get { return "Name for Sidemenu Group"; }
}
//Name of the page. In this Example: Sidemenu Name: MyPluginPage, Pagename: MyPage
public string PageName
{
get { return "MyPage"; }
}
//Uri for the .aspx site. Usually the same as the classname
public string Uri
{
get { return "PlugIns/MyPluginPage.aspx"; }
}
protected void Page_Load(object sender, EventArgs e)
{
base.OnPageLoad();
...
}
}
Using the property EBissSession you can search on eBiss, e.g. for documents:
foreach (IDocument doc in EBissSession.DataApplication.Find("eBiss.Data.Document", $"DocNumber.StartsWith(\"{value}\")"))
{
Data.MessageItem msgItem = new Data.MessageItem(doc);
source.Add(msgItem);
}
===== Exception Handling =====
Use RedirectToErrorPage() for error handling:
//Code-Beispiel2: Exception Handling.//
// don't catch redirect exception!
try
{
if (!IsPostBack)
{
...
}
}
catch (Exception ex)
{
RedirectToErrorPage(ex);
}
If you don't use the Build events for copy you should copy the ./Deploy/ folder with sub folders to the eBiss path.