private void ListZones() { base.ServiceBroker.Service.ServiceObjects[0].Properties.InitResultTable(); DataTable results = base.ServiceBroker.ServicePackage.ResultTable; WorkflowManagementServer mngServer = this.ServiceBroker.K2Connection.GetConnection <WorkflowManagementServer>(); using (mngServer.Connection) { List <string> zoneList = mngServer.ZoneListAll(); foreach (string zone in zoneList) { DataRow dRow = results.NewRow(); dRow[Constants.SOProperties.WorkingHoursConfiguration.ZoneName] = zone; results.Rows.Add(dRow); } } }
private void ListZones() { base.ServiceBroker.Service.ServiceObjects[0].Properties.InitResultTable(); DataTable results = base.ServiceBroker.ServicePackage.ResultTable; WorkflowManagementServer mngServer = new WorkflowManagementServer(); using (mngServer.CreateConnection()) { mngServer.Open(BaseAPIConnectionString); List<string> zoneList = mngServer.ZoneListAll(); foreach (string zone in zoneList) { DataRow dRow = results.NewRow(); dRow[Constants.SOProperties.WorkingHoursConfiguration.ZoneName] = zone; results.Rows.Add(dRow); } } }