private static void ImportData(string importPath) { int totleCounter = 0, successCounter = 0; SyncData syncData = new SyncData(Teleware.SyncData.OperateType.Import, importPath); try { syncData.SyncTdzzData((totle, success) => { totleCounter = totle; successCounter = success; }); MessageBox.Show("操作成功!共有项目" + totleCounter + ",导入项目" + successCounter + "个."); } catch (Exception ex) { MessageBox.Show("导入失败!失败原因:" + ex.Message); } }
private static void ExportData(string beginDate, string endDate, string exportPath) { int totleCounter = 0, successCounter = 0; SyncData syncData = new SyncData(Teleware.SyncData.OperateType.Export, exportPath); try { syncData.SyncTdzzData((totle, success) => { totleCounter = totle; successCounter = success; }, beginDate, endDate); MessageBox.Show("操作成功!共有项目" + totleCounter + ",导出项目" + successCounter + "个."); } catch (Exception ex) { MessageBox.Show("导出失败!失败原因:" + ex.Message); } }