SVN r1017

SVN-Revision: r1017
This commit is contained in:
wyf
2025-10-27 02:14:26 +00:00
parent 1ecf46d04b
commit 04d748519a
2 changed files with 923 additions and 37 deletions
+388 -29
View File
@@ -79,6 +79,7 @@ namespace Lskj.PubApiSetModule
this.btnApiSave = new DevExpress.XtraEditors.SimpleButton();
this.btnApiDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnApiAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnApiRefresh = new DevExpress.XtraEditors.SimpleButton();
this.sendGcDetail = new DevExpress.XtraGrid.GridControl();
this.sendDetailView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.pmsIdColumn = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -103,14 +104,41 @@ namespace Lskj.PubApiSetModule
this.btnPmsSave = new DevExpress.XtraEditors.SimpleButton();
this.btnPmsDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnPmsAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnPmsRefresh = new DevExpress.XtraEditors.SimpleButton();
this.getPage = new DevExpress.XtraTab.XtraTabPage();
this.splitControlGet = new DevExpress.XtraEditors.SplitContainerControl();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.btnGetApiSave = new DevExpress.XtraEditors.SimpleButton();
this.btnGetApiDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnGetApiAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnGetApiRefresh = new DevExpress.XtraEditors.SimpleButton();
this.getGcMain = new DevExpress.XtraGrid.GridControl();
this.getMainView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.getIdColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getDescriptionColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getTableNameColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getActionTypeColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getPrimaryKeyColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getOutputKeyColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getAfterSqlColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getIsLoginColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getAfterSqlMemoExEdit = new DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit();
this.getActionTypeComboBox = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
this.getIsLoginComboBox = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.btnGetApiPmsSave = new DevExpress.XtraEditors.SimpleButton();
this.btnGetApiPmsDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnGetApiPmsAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnGetApiPmsRefresh = new DevExpress.XtraEditors.SimpleButton();
this.getGcDetail = new DevExpress.XtraGrid.GridControl();
this.getDetailView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.btnApiRefresh = new DevExpress.XtraEditors.SimpleButton();
this.btnPmsRefresh = new DevExpress.XtraEditors.SimpleButton();
this.getPmsIdColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getPmsFileNameColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getPmsDefaultValueColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getPmsDisInsertColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getPmsDisUpdateColumn = new DevExpress.XtraGrid.Columns.GridColumn();
this.getPmsDisInsertComboBox = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
this.getPmsDisUpdateComboBox = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
((System.ComponentModel.ISupportInitialize)(this.tabMain)).BeginInit();
this.tabMain.SuspendLayout();
this.sendPage.SuspendLayout();
@@ -145,10 +173,17 @@ namespace Lskj.PubApiSetModule
this.getPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitControlGet)).BeginInit();
this.splitControlGet.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.getGcMain)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getMainView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getAfterSqlMemoExEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getActionTypeComboBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getIsLoginComboBox)).BeginInit();
this.flowLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.getGcDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getDetailView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getPmsDisInsertComboBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.getPmsDisUpdateComboBox)).BeginInit();
this.SuspendLayout();
//
// tabMain
@@ -627,6 +662,17 @@ namespace Lskj.PubApiSetModule
this.btnApiAdd.TabStop = false;
this.btnApiAdd.Text = "新增(&A)";
//
// btnApiRefresh
//
this.btnApiRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnApiRefresh.Appearance.Options.UseFont = true;
this.btnApiRefresh.Location = new System.Drawing.Point(574, 3);
this.btnApiRefresh.Name = "btnApiRefresh";
this.btnApiRefresh.Size = new System.Drawing.Size(80, 28);
this.btnApiRefresh.TabIndex = 16;
this.btnApiRefresh.TabStop = false;
this.btnApiRefresh.Text = "刷新(&R)";
//
// sendGcDetail
//
this.sendGcDetail.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -886,6 +932,17 @@ namespace Lskj.PubApiSetModule
this.btnPmsAdd.TabStop = false;
this.btnPmsAdd.Text = "新增(&A)";
//
// btnPmsRefresh
//
this.btnPmsRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPmsRefresh.Appearance.Options.UseFont = true;
this.btnPmsRefresh.Location = new System.Drawing.Point(574, 3);
this.btnPmsRefresh.Name = "btnPmsRefresh";
this.btnPmsRefresh.Size = new System.Drawing.Size(80, 28);
this.btnPmsRefresh.TabIndex = 19;
this.btnPmsRefresh.TabStop = false;
this.btnPmsRefresh.Text = "刷新(&R)";
//
// getPage
//
this.getPage.Controls.Add(this.splitControlGet);
@@ -904,14 +961,73 @@ namespace Lskj.PubApiSetModule
this.splitControlGet.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.splitControlGet.Name = "splitControlGet";
this.splitControlGet.Panel1.Controls.Add(this.getGcMain);
this.splitControlGet.Panel1.Controls.Add(this.flowLayoutPanel1);
this.splitControlGet.Panel1.Text = "Panel1";
this.splitControlGet.Panel2.Controls.Add(this.getGcDetail);
this.splitControlGet.Panel2.Controls.Add(this.flowLayoutPanel2);
this.splitControlGet.Panel2.Text = "Panel2";
this.splitControlGet.Size = new System.Drawing.Size(915, 526);
this.splitControlGet.SplitterPosition = 237;
this.splitControlGet.TabIndex = 5;
this.splitControlGet.Text = "splitContainerControl1";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.btnGetApiSave);
this.flowLayoutPanel1.Controls.Add(this.btnGetApiDelete);
this.flowLayoutPanel1.Controls.Add(this.btnGetApiAdd);
this.flowLayoutPanel1.Controls.Add(this.btnGetApiRefresh);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 203);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(915, 34);
this.flowLayoutPanel1.TabIndex = 23;
//
// btnGetApiSave
//
this.btnGetApiSave.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiSave.Appearance.Options.UseFont = true;
this.btnGetApiSave.Location = new System.Drawing.Point(832, 3);
this.btnGetApiSave.Name = "btnGetApiSave";
this.btnGetApiSave.Size = new System.Drawing.Size(80, 28);
this.btnGetApiSave.TabIndex = 13;
this.btnGetApiSave.TabStop = false;
this.btnGetApiSave.Text = "保存(&S)";
//
// btnGetApiDelete
//
this.btnGetApiDelete.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiDelete.Appearance.Options.UseFont = true;
this.btnGetApiDelete.Location = new System.Drawing.Point(746, 3);
this.btnGetApiDelete.Name = "btnGetApiDelete";
this.btnGetApiDelete.Size = new System.Drawing.Size(80, 28);
this.btnGetApiDelete.TabIndex = 14;
this.btnGetApiDelete.TabStop = false;
this.btnGetApiDelete.Text = "删除(&D)";
//
// btnGetApiAdd
//
this.btnGetApiAdd.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiAdd.Appearance.Options.UseFont = true;
this.btnGetApiAdd.Location = new System.Drawing.Point(660, 3);
this.btnGetApiAdd.Name = "btnGetApiAdd";
this.btnGetApiAdd.Size = new System.Drawing.Size(80, 28);
this.btnGetApiAdd.TabIndex = 15;
this.btnGetApiAdd.TabStop = false;
this.btnGetApiAdd.Text = "新增(&A)";
//
// btnGetApiRefresh
//
this.btnGetApiRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiRefresh.Appearance.Options.UseFont = true;
this.btnGetApiRefresh.Location = new System.Drawing.Point(574, 3);
this.btnGetApiRefresh.Name = "btnGetApiRefresh";
this.btnGetApiRefresh.Size = new System.Drawing.Size(80, 28);
this.btnGetApiRefresh.TabIndex = 16;
this.btnGetApiRefresh.TabStop = false;
this.btnGetApiRefresh.Text = "刷新(&R)";
//
// getGcMain
//
this.getGcMain.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -923,8 +1039,12 @@ namespace Lskj.PubApiSetModule
this.getGcMain.MainView = this.getMainView;
this.getGcMain.Margin = new System.Windows.Forms.Padding(4);
this.getGcMain.Name = "getGcMain";
this.getGcMain.Size = new System.Drawing.Size(915, 237);
this.getGcMain.TabIndex = 5;
this.getGcMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.getAfterSqlMemoExEdit,
this.getActionTypeComboBox,
this.getIsLoginComboBox});
this.getGcMain.Size = new System.Drawing.Size(915, 203);
this.getGcMain.TabIndex = 24;
this.getGcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.getMainView});
//
@@ -941,6 +1061,15 @@ namespace Lskj.PubApiSetModule
this.getMainView.Appearance.Row.Options.UseBackColor = true;
this.getMainView.Appearance.Row.Options.UseFont = true;
this.getMainView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat;
this.getMainView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.getIdColumn,
this.getDescriptionColumn,
this.getTableNameColumn,
this.getActionTypeColumn,
this.getPrimaryKeyColumn,
this.getOutputKeyColumn,
this.getAfterSqlColumn,
this.getIsLoginColumn});
this.getMainView.GridControl = this.getGcMain;
this.getMainView.IndicatorWidth = 40;
this.getMainView.Name = "getMainView";
@@ -958,6 +1087,156 @@ namespace Lskj.PubApiSetModule
this.getMainView.OptionsView.ShowGroupPanel = false;
this.getMainView.PaintStyleName = "Skin";
//
// getIdColumn
//
this.getIdColumn.Caption = "接口Id";
this.getIdColumn.FieldName = "id";
this.getIdColumn.Name = "getIdColumn";
this.getIdColumn.Visible = true;
this.getIdColumn.VisibleIndex = 0;
//
// getDescriptionColumn
//
this.getDescriptionColumn.Caption = "接口标题";
this.getDescriptionColumn.FieldName = "description";
this.getDescriptionColumn.Name = "getDescriptionColumn";
this.getDescriptionColumn.Visible = true;
this.getDescriptionColumn.VisibleIndex = 1;
this.getDescriptionColumn.Width = 100;
//
// getTableNameColumn
//
this.getTableNameColumn.Caption = "操作表名";
this.getTableNameColumn.FieldName = "tableName";
this.getTableNameColumn.Name = "getTableNameColumn";
this.getTableNameColumn.Visible = true;
this.getTableNameColumn.VisibleIndex = 2;
this.getTableNameColumn.Width = 100;
//
// getActionTypeColumn
//
this.getActionTypeColumn.Caption = "操作方式";
this.getActionTypeColumn.ColumnEdit = this.getActionTypeComboBox;
this.getActionTypeColumn.FieldName = "actionType";
this.getActionTypeColumn.Name = "getActionTypeColumn";
this.getActionTypeColumn.Visible = true;
this.getActionTypeColumn.VisibleIndex = 3;
//
// getPrimaryKeyColumn
//
this.getPrimaryKeyColumn.Caption = "主键字段";
this.getPrimaryKeyColumn.FieldName = "primaryKey";
this.getPrimaryKeyColumn.Name = "getPrimaryKeyColumn";
this.getPrimaryKeyColumn.Visible = true;
this.getPrimaryKeyColumn.VisibleIndex = 4;
this.getPrimaryKeyColumn.Width = 100;
//
// getOutputKeyColumn
//
this.getOutputKeyColumn.Caption = "返回值";
this.getOutputKeyColumn.FieldName = "outputKey";
this.getOutputKeyColumn.Name = "getOutputKeyColumn";
this.getOutputKeyColumn.Visible = true;
this.getOutputKeyColumn.VisibleIndex = 5;
this.getOutputKeyColumn.Width = 150;
//
// getAfterSqlColumn
//
this.getAfterSqlColumn.Caption = "后处理逻辑";
this.getAfterSqlColumn.ColumnEdit = this.getAfterSqlMemoExEdit;
this.getAfterSqlColumn.FieldName = "afterSql";
this.getAfterSqlColumn.Name = "getAfterSqlColumn";
this.getAfterSqlColumn.Visible = true;
this.getAfterSqlColumn.VisibleIndex = 6;
this.getAfterSqlColumn.Width = 100;
//
// getIsLoginColumn
//
this.getIsLoginColumn.Caption = "登陆验证";
this.getIsLoginColumn.ColumnEdit = this.getIsLoginComboBox;
this.getIsLoginColumn.FieldName = "isLogin";
this.getIsLoginColumn.Name = "getIsLoginColumn";
this.getIsLoginColumn.Visible = true;
this.getIsLoginColumn.VisibleIndex = 7;
//
// getAfterSqlMemoExEdit
//
this.getAfterSqlMemoExEdit.AutoHeight = false;
this.getAfterSqlMemoExEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.getAfterSqlMemoExEdit.Name = "getAfterSqlMemoExEdit";
//
// getActionTypeComboBox
//
this.getActionTypeComboBox.AutoHeight = false;
this.getActionTypeComboBox.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.getActionTypeComboBox.Name = "getActionTypeComboBox";
//
// getIsLoginComboBox
//
this.getIsLoginComboBox.AutoHeight = false;
this.getIsLoginComboBox.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.getIsLoginComboBox.Name = "getIsLoginComboBox";
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Controls.Add(this.btnGetApiPmsSave);
this.flowLayoutPanel2.Controls.Add(this.btnGetApiPmsDelete);
this.flowLayoutPanel2.Controls.Add(this.btnGetApiPmsAdd);
this.flowLayoutPanel2.Controls.Add(this.btnGetApiPmsRefresh);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 250);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(915, 34);
this.flowLayoutPanel2.TabIndex = 24;
//
// btnGetApiPmsSave
//
this.btnGetApiPmsSave.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiPmsSave.Appearance.Options.UseFont = true;
this.btnGetApiPmsSave.Location = new System.Drawing.Point(832, 3);
this.btnGetApiPmsSave.Name = "btnGetApiPmsSave";
this.btnGetApiPmsSave.Size = new System.Drawing.Size(80, 28);
this.btnGetApiPmsSave.TabIndex = 13;
this.btnGetApiPmsSave.TabStop = false;
this.btnGetApiPmsSave.Text = "保存(&S)";
//
// btnGetApiPmsDelete
//
this.btnGetApiPmsDelete.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiPmsDelete.Appearance.Options.UseFont = true;
this.btnGetApiPmsDelete.Location = new System.Drawing.Point(746, 3);
this.btnGetApiPmsDelete.Name = "btnGetApiPmsDelete";
this.btnGetApiPmsDelete.Size = new System.Drawing.Size(80, 28);
this.btnGetApiPmsDelete.TabIndex = 14;
this.btnGetApiPmsDelete.TabStop = false;
this.btnGetApiPmsDelete.Text = "删除(&D)";
//
// btnGetApiPmsAdd
//
this.btnGetApiPmsAdd.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiPmsAdd.Appearance.Options.UseFont = true;
this.btnGetApiPmsAdd.Location = new System.Drawing.Point(660, 3);
this.btnGetApiPmsAdd.Name = "btnGetApiPmsAdd";
this.btnGetApiPmsAdd.Size = new System.Drawing.Size(80, 28);
this.btnGetApiPmsAdd.TabIndex = 15;
this.btnGetApiPmsAdd.TabStop = false;
this.btnGetApiPmsAdd.Text = "新增(&A)";
//
// btnGetApiPmsRefresh
//
this.btnGetApiPmsRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGetApiPmsRefresh.Appearance.Options.UseFont = true;
this.btnGetApiPmsRefresh.Location = new System.Drawing.Point(574, 3);
this.btnGetApiPmsRefresh.Name = "btnGetApiPmsRefresh";
this.btnGetApiPmsRefresh.Size = new System.Drawing.Size(80, 28);
this.btnGetApiPmsRefresh.TabIndex = 16;
this.btnGetApiPmsRefresh.TabStop = false;
this.btnGetApiPmsRefresh.Text = "刷新(&R)";
//
// getGcDetail
//
this.getGcDetail.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -969,8 +1248,11 @@ namespace Lskj.PubApiSetModule
this.getGcDetail.MainView = this.getDetailView;
this.getGcDetail.Margin = new System.Windows.Forms.Padding(4);
this.getGcDetail.Name = "getGcDetail";
this.getGcDetail.Size = new System.Drawing.Size(915, 284);
this.getGcDetail.TabIndex = 5;
this.getGcDetail.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.getPmsDisInsertComboBox,
this.getPmsDisUpdateComboBox});
this.getGcDetail.Size = new System.Drawing.Size(915, 250);
this.getGcDetail.TabIndex = 25;
this.getGcDetail.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.getDetailView});
//
@@ -986,6 +1268,12 @@ namespace Lskj.PubApiSetModule
this.getDetailView.Appearance.Row.Font = new System.Drawing.Font("宋体", 9F);
this.getDetailView.Appearance.Row.Options.UseBackColor = true;
this.getDetailView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat;
this.getDetailView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.getPmsIdColumn,
this.getPmsFileNameColumn,
this.getPmsDefaultValueColumn,
this.getPmsDisInsertColumn,
this.getPmsDisUpdateColumn});
this.getDetailView.GridControl = this.getGcDetail;
this.getDetailView.IndicatorWidth = 40;
this.getDetailView.Name = "getDetailView";
@@ -1003,27 +1291,62 @@ namespace Lskj.PubApiSetModule
this.getDetailView.OptionsView.ShowGroupPanel = false;
this.getDetailView.PaintStyleName = "Skin";
//
// btnApiRefresh
// getPmsIdColumn
//
this.btnApiRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnApiRefresh.Appearance.Options.UseFont = true;
this.btnApiRefresh.Location = new System.Drawing.Point(574, 3);
this.btnApiRefresh.Name = "btnApiRefresh";
this.btnApiRefresh.Size = new System.Drawing.Size(80, 28);
this.btnApiRefresh.TabIndex = 16;
this.btnApiRefresh.TabStop = false;
this.btnApiRefresh.Text = "刷新(&R)";
this.getPmsIdColumn.Caption = "字段Id";
this.getPmsIdColumn.FieldName = "id";
this.getPmsIdColumn.Name = "getPmsIdColumn";
this.getPmsIdColumn.Visible = true;
this.getPmsIdColumn.VisibleIndex = 0;
//
// btnPmsRefresh
// getPmsFileNameColumn
//
this.btnPmsRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPmsRefresh.Appearance.Options.UseFont = true;
this.btnPmsRefresh.Location = new System.Drawing.Point(574, 3);
this.btnPmsRefresh.Name = "btnPmsRefresh";
this.btnPmsRefresh.Size = new System.Drawing.Size(80, 28);
this.btnPmsRefresh.TabIndex = 19;
this.btnPmsRefresh.TabStop = false;
this.btnPmsRefresh.Text = "刷新(&R)";
this.getPmsFileNameColumn.Caption = "字段名";
this.getPmsFileNameColumn.FieldName = "fileName";
this.getPmsFileNameColumn.Name = "getPmsFileNameColumn";
this.getPmsFileNameColumn.Visible = true;
this.getPmsFileNameColumn.VisibleIndex = 1;
this.getPmsFileNameColumn.Width = 100;
//
// getPmsDefaultValueColumn
//
this.getPmsDefaultValueColumn.Caption = "默认值";
this.getPmsDefaultValueColumn.FieldName = "defaultValue";
this.getPmsDefaultValueColumn.Name = "getPmsDefaultValueColumn";
this.getPmsDefaultValueColumn.Visible = true;
this.getPmsDefaultValueColumn.VisibleIndex = 2;
this.getPmsDefaultValueColumn.Width = 150;
//
// getPmsDisInsertColumn
//
this.getPmsDisInsertColumn.Caption = "禁止写入";
this.getPmsDisInsertColumn.ColumnEdit = this.getPmsDisInsertComboBox;
this.getPmsDisInsertColumn.FieldName = "disInsert";
this.getPmsDisInsertColumn.Name = "getPmsDisInsertColumn";
this.getPmsDisInsertColumn.Visible = true;
this.getPmsDisInsertColumn.VisibleIndex = 3;
//
// getPmsDisUpdateColumn
//
this.getPmsDisUpdateColumn.Caption = "禁止更新";
this.getPmsDisUpdateColumn.ColumnEdit = this.getPmsDisUpdateComboBox;
this.getPmsDisUpdateColumn.Name = "getPmsDisUpdateColumn";
this.getPmsDisUpdateColumn.Visible = true;
this.getPmsDisUpdateColumn.VisibleIndex = 4;
//
// getPmsDisInsertComboBox
//
this.getPmsDisInsertComboBox.AutoHeight = false;
this.getPmsDisInsertComboBox.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.getPmsDisInsertComboBox.Name = "getPmsDisInsertComboBox";
//
// getPmsDisUpdateComboBox
//
this.getPmsDisUpdateComboBox.AutoHeight = false;
this.getPmsDisUpdateComboBox.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.getPmsDisUpdateComboBox.Name = "getPmsDisUpdateComboBox";
//
// FrmMain
//
@@ -1070,10 +1393,17 @@ namespace Lskj.PubApiSetModule
this.getPage.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitControlGet)).EndInit();
this.splitControlGet.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.getGcMain)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getMainView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getAfterSqlMemoExEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getActionTypeComboBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getIsLoginComboBox)).EndInit();
this.flowLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.getGcDetail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getDetailView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getPmsDisInsertComboBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.getPmsDisUpdateComboBox)).EndInit();
this.ResumeLayout(false);
}
@@ -1085,10 +1415,6 @@ namespace Lskj.PubApiSetModule
private DevExpress.XtraTab.XtraTabPage getPage;
private DevExpress.XtraEditors.SplitContainerControl splitControlSend;
private DevExpress.XtraEditors.SplitContainerControl splitControlGet;
public DevExpress.XtraGrid.GridControl getGcMain;
private DevExpress.XtraGrid.Views.Grid.GridView getMainView;
public DevExpress.XtraGrid.GridControl getGcDetail;
private DevExpress.XtraGrid.Views.Grid.GridView getDetailView;
public DevExpress.XtraGrid.GridControl sendGcMain;
private DevExpress.XtraGrid.Views.Grid.GridView sendMainView;
private DevExpress.XtraGrid.Columns.GridColumn idColumn;
@@ -1144,4 +1470,37 @@ namespace Lskj.PubApiSetModule
private DevExpress.XtraGrid.Columns.GridColumn unionPmsIdColumn;
private DevExpress.XtraGrid.Columns.GridColumn valueDataTypeColumn;
private DevExpress.XtraEditors.Repository.RepositoryItemComboBox valueDataTypeComboBox;
private Syst
private System.Windows.Forms.FlowLayoutPanel flowPanelBottom;
private DevExpress.XtraEditors.SimpleButton btnApiSave;
private DevExpress.XtraEditors.SimpleButton btnApiDelete;
private DevExpress.XtraEditors.SimpleButton btnApiAdd;
private DevExpress.XtraEditors.SimpleButton btnPmsSave;
private DevExpress.XtraEditors.SimpleButton btnPmsDelete;
private DevExpress.XtraEditors.SimpleButton btnPmsAdd;
private DevExpress.XtraGrid.Columns.GridColumn valueEncryptTypeColumn;
private DevExpress.XtraEditors.Repository.RepositoryItemComboBox valueEncryptTypeComboBox;
private DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit finshActionMemoExEdit;
private DevExpress.XtraGrid.Columns.GridColumn isTokenErrorCondColumn;
private DevExpress.XtraGrid.Columns.GridColumn orderValueColumn;
private DevExpress.XtraEditors.SimpleButton btnApiRefresh;
private DevExpress.XtraEditors.SimpleButton btnPmsRefresh;
public DevExpress.XtraGrid.GridControl getGcMain;
private DevExpress.XtraGrid.Views.Grid.GridView getMainView;
private DevExpress.XtraGrid.Columns.GridColumn getIdColumn;
private DevExpress.XtraGrid.Columns.GridColumn getDescriptionColumn;
private DevExpress.XtraGrid.Columns.GridColumn getTableNameColumn;
private DevExpress.XtraGrid.Columns.GridColumn getActionTypeColumn;
private DevExpress.XtraGrid.Columns.GridColumn getPrimaryKeyColumn;
private DevExpress.XtraGrid.Columns.GridColumn getOutputKeyColumn;
private DevExpress.XtraGrid.Columns.GridColumn getAfterSqlColumn;
private DevExpress.XtraGrid.Columns.GridColumn getIsLoginColumn;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private DevExpress.XtraEditors.SimpleButton btnGetApiSave;
private DevExpress.XtraEditors.SimpleButton btnGetApiDelete;
private DevExpress.XtraEditors.SimpleButton btnGetApiAdd;
private DevExpress.XtraEditors.SimpleButton btnGetApiRefresh;
private DevExpress.XtraEditors.Repository.RepositoryItemComboBox getActionTypeComboBox;
private DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit getAfterSqlMemoExEdit;
private DevExpress.XtraEditors.Repository.RepositoryItemComboBox getIsLoginComboBox;
public DevExpress.XtraGrid.GridControl getGcDetail;
+531 -4
View File
@@ -22,6 +22,8 @@ namespace Lskj.PubApiSetModule
public DynamicApiSetModel Model;
public SqlDataAdapter SendMainAdapterObj;
public SqlDataAdapter SendDetailAdapterObj;
public SqlDataAdapter GetMainAdapterObj;
public SqlDataAdapter GetDetailAdapterObj;
public FrmMain()
{
InitializeComponent();
@@ -37,9 +39,17 @@ namespace Lskj.PubApiSetModule
InitlizeSpiltLocation();
InitEventApiTable();
InitEventApiPmsTable();
InitToLsEventApiTable();
InitToLsEventApiPmsTable();
InitToLsEventApiDtlsTable();
InitToLsEventApiDtlsPmsTable();
InitEventApiLogTable();
InitEventApiLogErrorTable();
InitToLsEventApiLogTable();
InitEvents();
InitColumnsData();
InitApiTabDataSource();
InitGetApiTabDataSource();
}
/// <summary>
/// 初始化事件
@@ -47,19 +57,44 @@ namespace Lskj.PubApiSetModule
private void InitEvents()
{
splitControlSend.SplitterPositionChanged += OnSplitContainerPositionChanged;
#region send
sendMainView.CustomColumnDisplayText += OnCustomColumnDisplayText;
sendDetailView.CustomColumnDisplayText += OnCustomColumnDisplayText;
sendMainView.InitNewRow += OnViewInitNewRow;
sendDetailView.InitNewRow += OnViewInitNewRow;
sendMainView.FocusedRowObjectChanged += OnFocusedRowObjectChanged;
#endregion
#region get
getMainView.CustomColumnDisplayText += OnCustomColumnDisplayText;
getDetailView.CustomColumnDisplayText += OnCustomColumnDisplayText;
getMainView.InitNewRow += OnViewInitNewRow;
getDetailView.InitNewRow += OnViewInitNewRow;
getMainView.FocusedRowObjectChanged += OnFocusedRowObjectChanged;
#endregion
#region ADD
btnApiAdd.Click += OnBtnAddClick;
btnPmsAdd.Click += OnBtnAddClick;
btnGetApiAdd.Click += OnBtnAddClick;
btnGetApiPmsAdd.Click += OnBtnAddClick;
#endregion
#region SAVE
btnApiSave.Click += OnBtnSaveClick;
btnPmsSave.Click += OnBtnSaveClick;
btnGetApiSave.Click += OnBtnSaveClick;
btnGetApiPmsSave.Click += OnBtnSaveClick;
#endregion
#region DELETE
btnApiDelete.Click += OnBtnDeleteClick;
btnPmsDelete.Click += OnBtnDeleteClick;
btnGetApiDelete.Click += OnBtnDeleteClick;
btnGetApiPmsDelete.Click += OnBtnDeleteClick;
#endregion
#region REFRESH
btnApiRefresh.Click += OnBtnRefreshClick;
btnPmsRefresh.Click += OnBtnRefreshClick;
btnGetApiRefresh.Click += OnBtnRefreshClick;
btnGetApiPmsRefresh.Click += OnBtnRefreshClick;
#endregion
}
/// <summary>
/// 添加按钮点击
@@ -76,6 +111,14 @@ namespace Lskj.PubApiSetModule
{
sendDetailView.AddNewRow();
}
else if (sender == btnGetApiAdd)
{
getMainView.AddNewRow();
}
else if (sender == btnGetApiPmsAdd)
{
getDetailView.AddNewRow();
}
}
/// <summary>
/// 删除按钮点击
@@ -92,6 +135,14 @@ namespace Lskj.PubApiSetModule
{
sendDetailView.DeleteRow(sendDetailView.FocusedRowHandle);
}
else if (sender == btnGetApiDelete)
{
getMainView.DeleteRow(getMainView.FocusedRowHandle);
}
else if (sender == btnGetApiPmsDelete)
{
getDetailView.DeleteRow(getDetailView.FocusedRowHandle);
}
}
/// <summary>
/// 保存按钮点击
@@ -122,6 +173,30 @@ namespace Lskj.PubApiSetModule
sendDetailView.FocusedRowHandle = rowHandle;
}
}
else if (sender == btnGetApiSave)
{
if (getGcMain.DataSource != null && getGcMain.DataSource is DataTable sourceTable)
{
GetMainAdapterObj.Update(sourceTable);
DataRow focusedRow = getMainView.GetFocusedDataRow();
string apiId = focusedRow["id"] + "";
int rowHandle = getMainView.FocusedRowHandle;
InitGetApiTabDataSource();
getMainView.FocusedRowHandle = rowHandle;
}
}
else if (sender == btnGetApiPmsSave)
{
if (getGcDetail.DataSource != null && getGcDetail.DataSource is DataTable sourceTable)
{
GetDetailAdapterObj.Update(sourceTable);
DataRow focusedRow = getDetailView.GetFocusedDataRow();
string apiId = focusedRow["id"] + "";
int rowHandle = getDetailView.FocusedRowHandle;
InitGetApiPmsTabDataSource(apiId);
getDetailView.FocusedRowHandle = rowHandle;
}
}
}
/// <summary>
/// 刷新数据
@@ -144,6 +219,22 @@ namespace Lskj.PubApiSetModule
InitApiPmsTabDataSource(apiId);
sendDetailView.FocusedRowHandle = rowHandle;
}
else if (sender == btnGetApiRefresh)
{
DataRow focusedRow = getMainView.GetFocusedDataRow();
string apiId = focusedRow["id"] + "";
int rowHandle = getMainView.FocusedRowHandle;
InitGetApiTabDataSource();
getMainView.FocusedRowHandle = rowHandle;
}
else if (sender == btnGetApiPmsRefresh)
{
DataRow focusedRow = getDetailView.GetFocusedDataRow();
string apiId = focusedRow["id"] + "";
int rowHandle = getDetailView.FocusedRowHandle;
InitGetApiPmsTabDataSource(apiId);
getDetailView.FocusedRowHandle = rowHandle;
}
}
/// <summary>
/// 选中行改变时
@@ -151,6 +242,8 @@ namespace Lskj.PubApiSetModule
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnFocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
{
if (sender == sendMainView)
{
if (e.Row is DataRowView dataRowView)
{
@@ -159,6 +252,16 @@ namespace Lskj.PubApiSetModule
InitApiPmsTabDataSource(apiId);
}
}
else if (sender == getMainView)
{
if (e.Row is DataRowView dataRowView)
{
DataRow focusedRow = dataRowView.Row;
string apiId = focusedRow["id"] + "";
InitGetApiPmsTabDataSource(apiId);
}
}
}
/// <summary>
/// 显示下拉框的值
/// </summary>
@@ -193,6 +296,15 @@ namespace Lskj.PubApiSetModule
DataRow dataRow = gridView.GetDataRow(e.RowHandle);
dataRow["apiId"] = parentRow["id"];
}
if (gridView == getMainView)
{
}
else if (gridView == getDetailView)
{
DataRow parentRow = getMainView.GetFocusedDataRow();
DataRow dataRow = gridView.GetDataRow(e.RowHandle);
dataRow["mainId"] = parentRow["id"];
}
}
/// <summary>
/// 初始化接口主表数据源
@@ -219,6 +331,30 @@ namespace Lskj.PubApiSetModule
sendGcDetail.DataSource = sendDetailTable;
}
/// <summary>
/// 初始化朗速接口主表数据源
/// </summary>
private void InitGetApiTabDataSource()
{
//SendMain
GetMainAdapterObj = BaseImpl.GetAdapterResult("select * from P_SystemToLsApiTab");
SqlCommandBuilder sqlCommandBuilder = new SqlCommandBuilder(GetMainAdapterObj);
DataTable getMainTable = new DataTable();
GetMainAdapterObj.Fill(getMainTable);
getGcMain.DataSource = getMainTable;
}
/// <summary>
/// 初始化朗速接口参数数据源
/// </summary>
private void InitGetApiPmsTabDataSource(string apiId)
{
//SendDetail
GetDetailAdapterObj = BaseImpl.GetAdapterResult($"select * from P_SystemToLsApiPmsTab where mainId = '{apiId}'");
SqlCommandBuilder sqlCommandBuilder = new SqlCommandBuilder(GetDetailAdapterObj);
DataTable getDetailTable = new DataTable();
GetDetailAdapterObj.Fill(getDetailTable);
getGcDetail.DataSource = getDetailTable;
}
/// <summary>
/// 初始化表格列
/// </summary>
private void InitColumnsData()
@@ -291,6 +427,21 @@ namespace Lskj.PubApiSetModule
valueEncryptTypeComboBox.Items.Add(new ComBoxModel() { Value = 3, Text = "URL地址加密" });
valueEncryptTypeComboBox.Items.Add(new ComBoxModel() { Value = 4, Text = "URL文件Base64" });
#endregion
#region
getIdColumn.OptionsColumn.AllowEdit = false;
//IsLogin
getIsLoginComboBox.Items.Add(new ComBoxModel() { Value = 1, Text = "启用验证" });
getIsLoginComboBox.Items.Add(new ComBoxModel() { Value = 0, Text = "禁止验证" });
//actionType
getActionTypeComboBox.Items.Add(new ComBoxModel() { Value = 1, Text = "新增/更新" });
getActionTypeComboBox.Items.Add(new ComBoxModel() { Value = 2, Text = "删除" });
#endregion
#region
getPmsDisInsertComboBox.Items.Add(new ComBoxModel() { Value = 1, Text = "禁止插入" });
getPmsDisInsertComboBox.Items.Add(new ComBoxModel() { Value = 0, Text = "允许插入" });
getPmsDisUpdateComboBox.Items.Add(new ComBoxModel() { Value = 1, Text = "禁止更新" });
getPmsDisUpdateComboBox.Items.Add(new ComBoxModel() { Value = 0, Text = "允许更新" });
#endregion
sendMainView.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.MouseDown;
foreach (GridColumn gridColumn in sendMainView.Columns)
{
@@ -323,10 +474,44 @@ namespace Lskj.PubApiSetModule
repositoryItemCombo.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
}
}
getMainView.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.MouseDown;
foreach (GridColumn gridColumn in getMainView.Columns)
{
if (gridColumn.ColumnEdit is RepositoryItemComboBox repositoryItemCombo)
{
repositoryItemCombo.ParseEditValue += (s, e) =>
{
if (e.Value is ComBoxModel comBoxModel)
{
e.Value = comBoxModel.Value;
e.Handled = true;
}
};
repositoryItemCombo.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
}
}
getDetailView.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.MouseDown;
foreach (GridColumn gridColumn in getDetailView.Columns)
{
if (gridColumn.ColumnEdit is RepositoryItemComboBox repositoryItemCombo)
{
repositoryItemCombo.ParseEditValue += (s, e) =>
{
if (e.Value is ComBoxModel comBoxModel)
{
e.Value = comBoxModel.Value;
e.Handled = true;
}
};
repositoryItemCombo.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
}
}
}
#region
/// <summary>
/// 构建数据
/// 接口主
/// </summary>
/// <returns></returns>
private bool InitEventApiTable()
{
try
@@ -372,7 +557,7 @@ namespace Lskj.PubApiSetModule
}
else
{
string createTabSql = "create table p_systemEventApiTab(id int IDENTITY(1,1) NOT NULL,{0})";
string createTabSql = "create table p_systemEventApiTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
@@ -389,7 +574,7 @@ namespace Lskj.PubApiSetModule
}
}
/// <summary>
/// 构建数据
/// 接口参数
/// </summary>
private bool InitEventApiPmsTable()
{
@@ -424,7 +609,7 @@ namespace Lskj.PubApiSetModule
}
else
{
string createTabSql = "create table P_systemEventApiPmsTab(id int IDENTITY(1,1) NOT NULL,{0})";
string createTabSql = "create table P_systemEventApiPmsTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
@@ -441,5 +626,347 @@ namespace Lskj.PubApiSetModule
}
}
/// <summary>
/// 朗速接口主表
/// </summary>
private bool InitToLsEventApiTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("tableName", "varchar(100)");
colDic.Add("actionType", "int");
colDic.Add("primaryKey", "varchar(100)");
colDic.Add("outputKey", "varchar(100)");
colDic.Add("afterSql", "varchar(MAX)");
colDic.Add("isLogin", "int");
colDic.Add("description", "varchar(50)");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'P_SystemToLsApiTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('P_SystemToLsApiTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table P_SystemToLsApiTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table P_SystemToLsApiTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 朗速接口参数表
/// </summary>
private bool InitToLsEventApiPmsTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("mainId", "int");
colDic.Add("fileName", "varchar(500)");
colDic.Add("disInsert", "int");
colDic.Add("disUpdate", "int");
colDic.Add("defaultValue", "varchar(500)");
//colDic.Add("conditionInsert", "varchar(1000)");
//colDic.Add("condition", "varchar(1000)");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'P_SystemToLsApiPmsTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('P_SystemToLsApiPmsTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table P_SystemToLsApiPmsTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table P_SystemToLsApiPmsTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 朗速接口明细表
/// </summary>
private bool InitToLsEventApiDtlsTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("mainId", "int");
colDic.Add("fileName", "varchar(100)");
colDic.Add("tableName", "varchar(100)");
colDic.Add("primaryKey", "varchar(100)");
colDic.Add("afterSql", "varchar(MAX)");
colDic.Add("mainUnionKey", "varchar(100)");
colDic.Add("dtlUnionKey", "varchar(100)");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'P_SystemToLsApiDtlsTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('P_SystemToLsApiDtlsTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table P_SystemToLsApiDtlsTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table P_SystemToLsApiDtlsTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 朗速接口明细参数表
/// </summary>
private bool InitToLsEventApiDtlsPmsTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("mainId", "int");
colDic.Add("fileName", "varchar(500)");
colDic.Add("defaultValue", "varchar(500)");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'P_SystemToLsApiDtlsPmsTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('P_SystemToLsApiDtlsPmsTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table P_SystemToLsApiDtlsPmsTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table P_SystemToLsApiDtlsPmsTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 接口日志表
/// </summary>
private bool InitEventApiLogTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("url", "varchar(1000)");
colDic.Add("data", "varchar(MAX)");
colDic.Add("succeed", "varchar(100)");
colDic.Add("msg", "varchar(MAX)");
colDic.Add("sendDate", "datetime");
colDic.Add("datasourceRow", "varchar(MAX)");
colDic.Add("pmsHashData", "varchar(MAX)");
colDic.Add("returnCode", "varchar(100)");
colDic.Add("returnMsg", "varchar(MAX)");
colDic.Add("eventId", "int");
colDic.Add("dataIndex", "int");
colDic.Add("action", "varchar(100)");
colDic.Add("isRepeater", "varchar(100)");
colDic.Add("pushState", "varchar(100)");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'p_systemEventApiLogTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('p_systemEventApiLogTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table p_systemEventApiLogTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table p_systemEventApiLogTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 接口错误日志表
/// </summary>
private bool InitEventApiLogErrorTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("errorType", "varchar(200)");
colDic.Add("repushErrorMsg", "varchar(200)");
colDic.Add("repushMsg", "varchar(1000)");
colDic.Add("repushSucceed", "varchar(200)");
colDic.Add("errorMessage", "varchar(1000)");
colDic.Add("sendDate", "datetime");
colDic.Add("repushTag", "int");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'p_systemEventApiErrorLogTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('p_systemEventApiErrorLogTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table p_systemEventApiErrorLogTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table p_systemEventApiErrorLogTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 朗速接口日志表
/// </summary>
private bool InitToLsEventApiLogTable()
{
try
{
Dictionary<string, string> colDic = new Dictionary<string, string>();
colDic.Add("url", "varchar(1000)");
colDic.Add("apiNo", "int");
colDic.Add("tableName", "varchar(100)");
colDic.Add("actionType", "int");
colDic.Add("actionTypeName", "varchar(100)");
colDic.Add("data", "varchar(MAX)");
colDic.Add("succeed", "varchar(100)");
colDic.Add("returnMsg", "varchar(MAX)");
colDic.Add("sendDate", "datetime");
string isExitApiTab = "select top 1 * from sysObjects where Id=OBJECT_ID(N'P_SystemToLsApiLogTab') and xtype='U'";
DataTable apiTab = SqlHelper.ExecuteDataTable(isExitApiTab);
if (apiTab.Rows.Count > 0)//存在日志表
{
DataTable columnsTab = SqlHelper.ExecuteDataTable(string.Format("select name from syscolumns where id=object_id('P_SystemToLsApiLogTab')"));
foreach (KeyValuePair<string, string> colunmField in colDic)
{
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
string addColSql = string.Format("alter table P_SystemToLsApiLogTab add {0} {1}", colunmField.Key, colunmField.Value);
SqlHelper.ExecuteNonQuery(addColSql);//添加列
}
}
}
else
{
string createTabSql = "create table P_SystemToLsApiLogTab(id bigint IDENTITY(1,1) NOT NULL,{0})";
string createCol = string.Empty;
foreach (KeyValuePair<string, string> colunmField in colDic)
{
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
}
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
}
return true;
}
catch (Exception)
{
return false;
}
}
#endregion
/// <summary>
/// 设置分割条位置