private void LLAction(string action) { var param = new RestConnectionParameter(); param.RestURL = Properties.Settings.Default.RestURL; param.Userid = Properties.Settings.Default.Userid; param.Password = Properties.Settings.Default.Password; var ll = new ListLabel(); var dp = new OpenEdgeDataProvider(); dp.ServiceAdapter = new RestServiceAdapter(param); dp.ServiceName = Properties.Settings.Default.ServiceName; dp.Initialize(); ll.DataSource = dp; try { if (action == "DESIGN") { if (Properties.Settings.Default.DesignerPreviewMaxRows > 0) { dp.MaxRows = Properties.Settings.Default.DesignerPreviewMaxRows; } ll.Design(); } else if (action == "PRINT") { ll.Print(); } else { } } catch (ListLabelException e) { MessageBox.Show(e.Message); } ll.Dispose(); dp.Dispose(); }
public RestServiceAdapter(RestConnectionParameter restConnectionParameter) { _RestConnectionParameter = restConnectionParameter; }