init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,464 @@
|
||||
/******************************
|
||||
* 说明:基础模块(P_SystemDllTab)实体对象
|
||||
* 创建人:龚宇超
|
||||
* 创建日期:2017-11-21
|
||||
* 修改人:
|
||||
* 修改日期:
|
||||
* 修改备注:
|
||||
* 版本:1.0.0.0
|
||||
******************************/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
|
||||
namespace Lskj.MyControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础模块(P_SystemDllTab)实体对象
|
||||
/// </summary>
|
||||
public class ModuleModel
|
||||
{
|
||||
#region private property
|
||||
private int _menuDirId;
|
||||
private int _menuType;
|
||||
private int _printType;
|
||||
private bool _canEdit;
|
||||
private bool _hasReport;
|
||||
private bool _addEnable;
|
||||
private bool _addCopyEnabled;
|
||||
private bool _deleteEnable;
|
||||
private bool _modifyEnable;
|
||||
private bool _importEnable;
|
||||
private bool _exportEnable;
|
||||
private bool _searchEnable;
|
||||
private bool _saveApplyEnable;
|
||||
private bool _modifyClose;
|
||||
private bool _anyAdd;
|
||||
private string _menuName;
|
||||
private string _menuText;
|
||||
private string _menuSql;
|
||||
private string _menuTable;
|
||||
private string _menuAddName;
|
||||
private string _menuBmpSpec;
|
||||
private string _formKey;
|
||||
private string _condKey;
|
||||
private string _modifyCond;
|
||||
private string _deleteCond;
|
||||
private string _addCond;
|
||||
private string _dragCond;
|
||||
private string _exportCond;
|
||||
private string _overBackOper;
|
||||
private string _overBackCond;
|
||||
private string _printSql;
|
||||
private string _printSql1;
|
||||
private string _printSql2;
|
||||
private string _printFile;
|
||||
private string _printCond;
|
||||
private string _basePrintSql;
|
||||
private string _basePrintSql1;
|
||||
private string _basePrintSql2;
|
||||
private string _addCaption;
|
||||
private string _modifyCaption;
|
||||
private string _applyCaption;
|
||||
private string _backSelected;
|
||||
#endregion
|
||||
|
||||
#region public property
|
||||
/// <summary>
|
||||
/// 附件目录ID
|
||||
/// </summary>
|
||||
/// <value>The menu dir identifier.</value>
|
||||
public int MenuDirId
|
||||
{
|
||||
get { return _menuDirId; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块类型(1.左侧树.2.左侧表格.3.无)
|
||||
/// </summary>
|
||||
/// <value>The type of the menu.</value>
|
||||
public int MenuType
|
||||
{
|
||||
get { return _menuType; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印模版类型
|
||||
/// </summary>
|
||||
/// <value>The type of the print.</value>
|
||||
public int PrintType
|
||||
{
|
||||
get { return this._printType; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 表格是否可以编辑
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can edit; otherwise, <c>false</c>.</value>
|
||||
public bool CanEdit
|
||||
{
|
||||
get { return _canEdit; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否为报表
|
||||
/// </summary>
|
||||
/// <value>The has report.</value>
|
||||
public bool HasReport { get { return _hasReport; } }
|
||||
/// <summary>
|
||||
/// 添加按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [add enable]; otherwise, <c>false</c>.</value>
|
||||
public bool AddEnable
|
||||
{
|
||||
get { return _addEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [add copy enabled].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [add copy enabled]; otherwise, <c>false</c>.</value>
|
||||
public bool AddCopyEnabled
|
||||
{
|
||||
get { return _addCopyEnabled; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [delete enable]; otherwise, <c>false</c>.</value>
|
||||
public bool DeleteEnable
|
||||
{
|
||||
get { return _deleteEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [modify enable]; otherwise, <c>false</c>.</value>
|
||||
public bool ModifyEnable
|
||||
{
|
||||
get { return _modifyEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 导入按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [import enable]; otherwise, <c>false</c>.</value>
|
||||
public bool ImportEnable
|
||||
{
|
||||
get { return _importEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 导出按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [export enable]; otherwise, <c>false</c>.</value>
|
||||
public bool ExportEnable
|
||||
{
|
||||
get { return _exportEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [search enable]; otherwise, <c>false</c>.</value>
|
||||
public bool SearchEnable
|
||||
{
|
||||
get { return _hasReport ? true : _searchEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存提交按钮是否可用
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [save apply enable]; otherwise, <c>false</c>.</value>
|
||||
public bool SaveApplyEnable
|
||||
{
|
||||
get { return _saveApplyEnable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 无视左侧树结构、左侧表格,添加数据
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [any add]; otherwise, <c>false</c>.</value>
|
||||
public bool AnyAdd
|
||||
{
|
||||
get { return this._anyAdd; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改保存后是否关闭窗口,默认关闭.false:不关闭,true:关闭
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [modify close]; otherwise, <c>false</c>.</value>
|
||||
public bool ModifyClose
|
||||
{
|
||||
get { return _modifyClose; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
/// <value>The name of the menu.</value>
|
||||
public string MenuName
|
||||
{
|
||||
get { return _menuName; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块标题
|
||||
/// </summary>
|
||||
/// <value>The menu text.</value>
|
||||
public string MenuText
|
||||
{
|
||||
get { return _menuText; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块sql
|
||||
/// </summary>
|
||||
/// <value>The menu SQL.</value>
|
||||
public string MenuSql
|
||||
{
|
||||
get { return _menuSql; }
|
||||
set { this._menuSql = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块表名
|
||||
/// </summary>
|
||||
/// <value>The menu table.</value>
|
||||
public string MenuTable
|
||||
{
|
||||
get { return _menuTable; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块添加界面展示方式
|
||||
/// </summary>
|
||||
/// <value>The name of the menu add.</value>
|
||||
public string MenuAddName
|
||||
{
|
||||
get { return _menuAddName; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 附件目录编号
|
||||
/// </summary>
|
||||
/// <value>The menu BMP spec.</value>
|
||||
public string MenuBmpSpec
|
||||
{
|
||||
get { return _menuBmpSpec; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 当前模块key
|
||||
/// </summary>
|
||||
/// <value>The form key.</value>
|
||||
public string FormKey
|
||||
{
|
||||
get { return _formKey; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 当前模块查询条件key
|
||||
/// </summary>
|
||||
/// <value>The cond key.</value>
|
||||
public string CondKey
|
||||
{
|
||||
get { return _condKey; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改条件
|
||||
/// </summary>
|
||||
/// <value>The modify cond.</value>
|
||||
public string ModifyCond
|
||||
{
|
||||
get { return _modifyCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除条件
|
||||
/// </summary>
|
||||
/// <value>The delete cond.</value>
|
||||
public string DeleteCond
|
||||
{
|
||||
get { return _deleteCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加条件
|
||||
/// </summary>
|
||||
/// <value>The add cond.</value>
|
||||
public string AddCond
|
||||
{
|
||||
get { return _addCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 拖动条件
|
||||
/// </summary>
|
||||
/// <value>The drag cond.</value>
|
||||
public string DragCond
|
||||
{
|
||||
get { return _dragCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 导出条件
|
||||
/// </summary>
|
||||
/// <value>The export cond.</value>
|
||||
public string ExportCond
|
||||
{
|
||||
get { return _exportCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 审核回退可操作人
|
||||
/// </summary>
|
||||
/// <value>The over back oper.</value>
|
||||
public string OverBackOper
|
||||
{
|
||||
get { return _overBackOper; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 审核可回退条件
|
||||
/// </summary>
|
||||
/// <value>The over back cond.</value>
|
||||
public string OverBackCond
|
||||
{
|
||||
get { return _overBackCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印SQL
|
||||
/// </summary>
|
||||
/// <value>The print SQL.</value>
|
||||
public string PrintSql
|
||||
{
|
||||
get { return _printSql; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印SQL1
|
||||
/// </summary>
|
||||
/// <value>The print SQL1.</value>
|
||||
public string PrintSql1
|
||||
{
|
||||
get { return _printSql1; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印SQL2.
|
||||
/// </summary>
|
||||
/// <value>The print SQL2.</value>
|
||||
public string PrintSql2
|
||||
{
|
||||
get { return _printSql2; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印文件
|
||||
/// </summary>
|
||||
/// <value>The print file.</value>
|
||||
public string PrintFile
|
||||
{
|
||||
get { return _printFile; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印条件
|
||||
/// </summary>
|
||||
/// <value>The print cond.</value>
|
||||
public string PrintCond
|
||||
{
|
||||
get { return _printCond; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改界面打印sql
|
||||
/// </summary>
|
||||
/// <value>The base print SQL.</value>
|
||||
public string BasePrintSql
|
||||
{
|
||||
get { return _basePrintSql; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改界面打印sql1
|
||||
/// </summary>
|
||||
/// <value>The base print SQL1.</value>
|
||||
public string BasePrintSql1
|
||||
{
|
||||
get { return _basePrintSql1; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改界面打印sql2
|
||||
/// </summary>
|
||||
/// <value>The base print SQL2.</value>
|
||||
public string BasePrintSql2
|
||||
{
|
||||
get { return _basePrintSql2; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加按钮显示文本
|
||||
/// </summary>
|
||||
/// <value>The add caption.</value>
|
||||
public string AddCaption
|
||||
{
|
||||
get { return _addCaption; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改按钮显示文本
|
||||
/// </summary>
|
||||
/// <value>The modify caption.</value>
|
||||
public string ModifyCaption
|
||||
{
|
||||
get { return _modifyCaption; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 提交按钮显示文本
|
||||
/// </summary>
|
||||
/// <value>The apply caption.</value>
|
||||
public string ApplyCaption
|
||||
{
|
||||
get { return _applyCaption; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 返退标记
|
||||
/// </summary>
|
||||
/// <value>The back selected.</value>
|
||||
public string BackSelected
|
||||
{
|
||||
get { return _backSelected; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块主键
|
||||
/// </summary>
|
||||
public string ParmaryKey;
|
||||
/// <summary>
|
||||
/// 列前缀
|
||||
/// </summary>
|
||||
public string PrefixKey;
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 基础模块(P_SystemDllTab)实体对象
|
||||
/// </summary>
|
||||
/// <param name="rowItem">The row item.</param>
|
||||
public ModuleModel(DataRow rowItem)
|
||||
{
|
||||
if (rowItem == null) return;
|
||||
this._menuDirId = string.IsNullOrEmpty(rowItem["dirId"] + "") ? 0 : Convert.ToInt32(rowItem["dirId"] + "");
|
||||
this._menuType = string.IsNullOrEmpty(rowItem["dllType"] + "") ? 3 : Convert.ToInt32(rowItem["dllType"] + "");
|
||||
this._printType = string.IsNullOrEmpty(rowItem["printType"] + "") ? 1 : Convert.ToInt32(rowItem["printType"] + "");
|
||||
this._canEdit = "1".Equals(rowItem["selfEdit"] + "");
|
||||
this._addEnable = "1".Equals(rowItem["addEnable"] + "");
|
||||
this._addCopyEnabled = rowItem.Table.Columns.Contains("addCopyEnabled") ? "1".Equals(rowItem["addCopyEnabled"] + "") : true;
|
||||
this._deleteEnable = "1".Equals(rowItem["deleteEnable"] + "");
|
||||
this._modifyEnable = "1".Equals(rowItem["modifyEnable"] + "");
|
||||
this._importEnable = "1".Equals(rowItem["importEnable"] + "");
|
||||
this._exportEnable = "1".Equals(rowItem["exportEnable"] + "");
|
||||
this._searchEnable = rowItem.Table.Columns.Contains("searchEnable") ? "1".Equals(rowItem["searchEnable"] + "") : true;
|
||||
this._saveApplyEnable = rowItem.Table.Columns.Contains("saveApplyEnabled") ? "1".Equals(rowItem["saveApplyEnabled"] + "") : false;
|
||||
this._modifyClose = rowItem.Table.Columns.Contains("ModifyClose") ? string.IsNullOrEmpty(rowItem["ModifyClose"] + "") || "1".Equals(rowItem["ModifyClose"] + "") : true;
|
||||
this._anyAdd = rowItem.Table.Columns.Contains("AnyAdd") ? "true".Equals((rowItem["AnyAdd"] + "").ToLower()) : false;
|
||||
this._menuName = rowItem["dllName"] + "";
|
||||
this._menuText = rowItem["toolsName"] + "";
|
||||
this._menuSql = rowItem["SQL"] + "";
|
||||
this._menuTable = rowItem["SQLDT1"] + "";
|
||||
this._menuAddName = rowItem["AddDllName"] + "";
|
||||
this._menuBmpSpec = rowItem["BmpSpec"] + "";
|
||||
this._formKey = rowItem["formKey"] + "";
|
||||
this._condKey = rowItem["condKey"] + "";
|
||||
this._modifyCond = rowItem["modifyCond"] + "";
|
||||
this._deleteCond = rowItem["deleteCond"] + "";
|
||||
this._addCond = rowItem["addCond"] + "";
|
||||
this._hasReport = "1".Equals(rowItem["isReport"] + "");
|
||||
this._dragCond = rowItem.Table.Columns.Contains("dragCond") ? rowItem["dragCond"] + "" : string.Empty;
|
||||
this._exportCond = rowItem.Table.Columns.Contains("exportCond") ? rowItem["exportCond"] + "" : string.Empty;
|
||||
this._overBackOper = rowItem.Table.Columns.Contains("overBackOper") ? rowItem["overBackOper"] + "" : string.Empty;
|
||||
this._overBackCond = rowItem.Table.Columns.Contains("overBackCond") ? rowItem["overBackCond"] + "" : string.Empty;
|
||||
this._printSql = rowItem["printSql"] + "";
|
||||
this._printSql1 = rowItem["printSql1"] + "";
|
||||
this._printSql2 = rowItem["printSql2"] + "";
|
||||
this._printFile = rowItem["printFile"] + "";
|
||||
this._printCond = rowItem.Table.Columns.Contains("printCond") ? rowItem["printCond"] + "" : "";
|
||||
this._backSelected = rowItem.Table.Columns.Contains("backSelected") ? rowItem["backSelected"] + "" : "0";
|
||||
this._basePrintSql = rowItem.Table.Columns.Contains("basePrintSql") ? rowItem["basePrintSql"] + "" : string.Empty;
|
||||
this._basePrintSql1 = rowItem.Table.Columns.Contains("basePrintSql1") ? rowItem["basePrintSql1"] + "" : string.Empty;
|
||||
this._basePrintSql2 = rowItem.Table.Columns.Contains("asePrintSql2") ? rowItem["_basePrintSql2"] + "" : string.Empty;
|
||||
this._addCaption = rowItem.Table.Columns.Contains("addCaption") ? rowItem["addCaption"] + "" : string.Empty;
|
||||
this._modifyCaption = rowItem.Table.Columns.Contains("modifyCaption") ? rowItem["modifyCaption"] + "" : string.Empty;
|
||||
this._applyCaption = rowItem.Table.Columns.Contains("applyCaption") ? rowItem["applyCaption"] + "" : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,270 @@
|
||||
namespace Lskj.MyControl.TreeGridControl
|
||||
{
|
||||
partial class MouduleTreeGrid
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnCondSearch = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.txtKey = new System.Windows.Forms.TextBox();
|
||||
this.cbField = new System.Windows.Forms.ComboBox();
|
||||
this.pl_bottom = new DevExpress.XtraEditors.PanelControl();
|
||||
this.btnSave = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnUpdate = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnDelete = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnAdd = new DevExpress.XtraEditors.DropDownButton();
|
||||
this.pm_AddNode = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.treeGridControlEx = new Lskj.MyControl.TreeGridControl.TreeGridControlEx();
|
||||
this.barManager1 = new DevExpress.XtraBars.BarManager(this.components);
|
||||
this.barDockControlTop = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControlRight = new DevExpress.XtraBars.BarDockControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
|
||||
this.panelControl1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).BeginInit();
|
||||
this.pl_bottom.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pm_AddNode)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panelControl1
|
||||
//
|
||||
this.panelControl1.Controls.Add(this.treeGridControlEx);
|
||||
this.panelControl1.Controls.Add(this.panel1);
|
||||
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panelControl1.Name = "panelControl1";
|
||||
this.panelControl1.Size = new System.Drawing.Size(639, 377);
|
||||
this.panelControl1.TabIndex = 0;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Controls.Add(this.btnCondSearch);
|
||||
this.panel1.Controls.Add(this.txtKey);
|
||||
this.panel1.Controls.Add(this.cbField);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(2, 2);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(635, 33);
|
||||
this.panel1.TabIndex = 1;
|
||||
this.panel1.Visible = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(4, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(29, 12);
|
||||
this.label1.TabIndex = 41;
|
||||
this.label1.Text = "查询";
|
||||
//
|
||||
// btnCondSearch
|
||||
//
|
||||
this.btnCondSearch.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnCondSearch.Appearance.Options.UseFont = true;
|
||||
this.btnCondSearch.Location = new System.Drawing.Point(267, 5);
|
||||
this.btnCondSearch.Name = "btnCondSearch";
|
||||
this.btnCondSearch.Size = new System.Drawing.Size(63, 26);
|
||||
this.btnCondSearch.TabIndex = 40;
|
||||
this.btnCondSearch.Text = "查询";
|
||||
this.btnCondSearch.Click += new System.EventHandler(this.OnCondSearchClick);
|
||||
//
|
||||
// txtKey
|
||||
//
|
||||
this.txtKey.Location = new System.Drawing.Point(134, 7);
|
||||
this.txtKey.Name = "txtKey";
|
||||
this.txtKey.Size = new System.Drawing.Size(126, 21);
|
||||
this.txtKey.TabIndex = 39;
|
||||
//
|
||||
// cbField
|
||||
//
|
||||
this.cbField.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbField.FormattingEnabled = true;
|
||||
this.cbField.Location = new System.Drawing.Point(38, 8);
|
||||
this.cbField.Name = "cbField";
|
||||
this.cbField.Size = new System.Drawing.Size(88, 20);
|
||||
this.cbField.TabIndex = 38;
|
||||
this.cbField.Tag = "";
|
||||
//
|
||||
// pl_bottom
|
||||
//
|
||||
this.pl_bottom.Controls.Add(this.btnSave);
|
||||
this.pl_bottom.Controls.Add(this.btnUpdate);
|
||||
this.pl_bottom.Controls.Add(this.btnDelete);
|
||||
this.pl_bottom.Controls.Add(this.btnAdd);
|
||||
this.pl_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.pl_bottom.Location = new System.Drawing.Point(0, 377);
|
||||
this.pl_bottom.Name = "pl_bottom";
|
||||
this.pl_bottom.Size = new System.Drawing.Size(639, 32);
|
||||
this.pl_bottom.TabIndex = 1;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSave.Location = new System.Drawing.Point(555, 4);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSave.TabIndex = 17;
|
||||
this.btnSave.Text = "保存(&S)";
|
||||
this.btnSave.Click += new System.EventHandler(this.OnSaveClick);
|
||||
//
|
||||
// btnUpdate
|
||||
//
|
||||
this.btnUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnUpdate.Location = new System.Drawing.Point(474, 4);
|
||||
this.btnUpdate.Name = "btnUpdate";
|
||||
this.btnUpdate.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnUpdate.TabIndex = 16;
|
||||
this.btnUpdate.Text = "修改(&U)";
|
||||
this.btnUpdate.Click += new System.EventHandler(this.OnTreeDoubleClick);
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDelete.Location = new System.Drawing.Point(393, 4);
|
||||
this.btnDelete.Name = "btnDelete";
|
||||
this.btnDelete.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnDelete.TabIndex = 15;
|
||||
this.btnDelete.Text = "删除(&D)";
|
||||
this.btnDelete.Click += new System.EventHandler(this.OnDeleteClick);
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnAdd.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnAdd.Appearance.Options.UseFont = true;
|
||||
this.btnAdd.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
|
||||
this.btnAdd.DropDownControl = this.pm_AddNode;
|
||||
this.btnAdd.Location = new System.Drawing.Point(312, 4);
|
||||
this.btnAdd.Name = "btnAdd";
|
||||
this.btnAdd.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnAdd.TabIndex = 14;
|
||||
this.btnAdd.Text = "增加节点";
|
||||
//
|
||||
// pm_AddNode
|
||||
//
|
||||
this.pm_AddNode.Manager = this.barManager1;
|
||||
this.pm_AddNode.Name = "pm_AddNode";
|
||||
//
|
||||
// treeGridControlEx
|
||||
//
|
||||
this.treeGridControlEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeGridControlEx.Location = new System.Drawing.Point(2, 35);
|
||||
this.treeGridControlEx.Name = "treeGridControlEx";
|
||||
this.treeGridControlEx.Size = new System.Drawing.Size(635, 340);
|
||||
this.treeGridControlEx.TabIndex = 0;
|
||||
//
|
||||
// barManager1
|
||||
//
|
||||
this.barManager1.DockControls.Add(this.barDockControlTop);
|
||||
this.barManager1.DockControls.Add(this.barDockControlBottom);
|
||||
this.barManager1.DockControls.Add(this.barDockControlLeft);
|
||||
this.barManager1.DockControls.Add(this.barDockControlRight);
|
||||
this.barManager1.Form = this;
|
||||
this.barManager1.MaxItemId = 0;
|
||||
//
|
||||
// barDockControlTop
|
||||
//
|
||||
this.barDockControlTop.CausesValidation = true;
|
||||
this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.barDockControlTop.Location = new System.Drawing.Point(0, 0);
|
||||
this.barDockControlTop.Size = new System.Drawing.Size(639, 0);
|
||||
//
|
||||
// barDockControlBottom
|
||||
//
|
||||
this.barDockControlBottom.CausesValidation = true;
|
||||
this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.barDockControlBottom.Location = new System.Drawing.Point(0, 377);
|
||||
this.barDockControlBottom.Size = new System.Drawing.Size(639, 0);
|
||||
//
|
||||
// barDockControlLeft
|
||||
//
|
||||
this.barDockControlLeft.CausesValidation = true;
|
||||
this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.barDockControlLeft.Location = new System.Drawing.Point(0, 0);
|
||||
this.barDockControlLeft.Size = new System.Drawing.Size(0, 377);
|
||||
//
|
||||
// barDockControlRight
|
||||
//
|
||||
this.barDockControlRight.CausesValidation = true;
|
||||
this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.barDockControlRight.Location = new System.Drawing.Point(639, 0);
|
||||
this.barDockControlRight.Size = new System.Drawing.Size(0, 377);
|
||||
//
|
||||
// MouduleTreeGrid
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.barDockControlLeft);
|
||||
this.Controls.Add(this.barDockControlRight);
|
||||
this.Controls.Add(this.barDockControlBottom);
|
||||
this.Controls.Add(this.barDockControlTop);
|
||||
this.Controls.Add(this.panelControl1);
|
||||
this.Controls.Add(this.pl_bottom);
|
||||
this.Name = "MouduleTreeGrid";
|
||||
this.Size = new System.Drawing.Size(639, 409);
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
|
||||
this.panelControl1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
|
||||
this.pl_bottom.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pm_AddNode)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.PanelControl panelControl1;
|
||||
private DevExpress.XtraEditors.PanelControl pl_bottom;
|
||||
private TreeGridControlEx treeGridControlEx1;
|
||||
private DevExpress.XtraEditors.DropDownButton btnAdd;
|
||||
private DevExpress.XtraEditors.SimpleButton btnUpdate;
|
||||
private DevExpress.XtraEditors.SimpleButton btnDelete;
|
||||
private DevExpress.XtraEditors.SimpleButton btnSave;
|
||||
private DevExpress.XtraBars.PopupMenu pm_AddNode;
|
||||
private TreeGridControlEx treeGridControlEx;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnCondSearch;
|
||||
private System.Windows.Forms.TextBox txtKey;
|
||||
private System.Windows.Forms.ComboBox cbField;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private DevExpress.XtraBars.BarManager barManager1;
|
||||
private DevExpress.XtraBars.BarDockControl barDockControlTop;
|
||||
private DevExpress.XtraBars.BarDockControl barDockControlBottom;
|
||||
private DevExpress.XtraBars.BarDockControl barDockControlLeft;
|
||||
private DevExpress.XtraBars.BarDockControl barDockControlRight;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,798 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraBars;
|
||||
using DevExpress.XtraTreeList.Nodes;
|
||||
using CommonLib.utils;
|
||||
using CommonLib;
|
||||
using DevExpress.XtraTab;
|
||||
using System.Data.SqlClient;
|
||||
using DevExpress.XtraEditors;
|
||||
using DevExpress.XtraTreeList.Columns;
|
||||
using Lskj.Common;
|
||||
namespace Lskj.MyControl.TreeGridControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MouduleTreeGrid.
|
||||
/// </summary>
|
||||
public partial class MouduleTreeGrid : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 模块ID
|
||||
/// </summary>
|
||||
public string DLLCoid { get; set; }
|
||||
/// <summary>
|
||||
/// 管理员ID
|
||||
/// </summary>
|
||||
public string OperatorId { get; set; }
|
||||
/// <summary>
|
||||
/// 管理员名称
|
||||
/// </summary>
|
||||
public string OperatorName { get; set; }
|
||||
/// <summary>
|
||||
/// 权限
|
||||
/// </summary>
|
||||
public string Privilege { get; set; }
|
||||
/// <summary>
|
||||
/// 窗体标题
|
||||
/// </summary>
|
||||
public string FormText { get; set; }
|
||||
/// <summary>
|
||||
/// 对象ID
|
||||
/// </summary>
|
||||
public string ObjectId { get; set; }
|
||||
/// <summary>
|
||||
/// 对象值
|
||||
/// </summary>
|
||||
public string ObjectValue { get; set; }
|
||||
/// <summary>
|
||||
/// 类库sql
|
||||
/// </summary>
|
||||
public string DllSql { get; set; }
|
||||
/// <summary>
|
||||
/// 树节点绑定字段
|
||||
/// </summary>
|
||||
/// <value>The name of the tree key field.</value>
|
||||
public string TreeKeyFieldName = "ID";
|
||||
/// <summary>
|
||||
/// 树父节点绑定字段
|
||||
/// </summary>
|
||||
public string TreeParentFieldName = "tree_pid";
|
||||
/// <summary>
|
||||
/// 树来源Sql
|
||||
/// </summary>
|
||||
/// <value>The tree source SQL.</value>
|
||||
public string TreeSourceSql { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 树的列
|
||||
/// </summary>
|
||||
public DataTable TreeColumnSource;
|
||||
/// <summary>
|
||||
/// 操作权限
|
||||
/// </summary>
|
||||
public int ParentPriv;
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string _primaryKey;
|
||||
/// <summary>
|
||||
/// 主表数据
|
||||
/// </summary>
|
||||
private DataTable _dtSystemDlltab;
|
||||
/// <summary>
|
||||
/// 基础模型
|
||||
/// </summary>
|
||||
private ModuleModel _modeObj;
|
||||
/// <summary>
|
||||
/// 树数据源
|
||||
/// </summary>
|
||||
private DataTable _dtSource;
|
||||
|
||||
public MouduleTreeGrid()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:初始化</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="e">包含事件数据的 <see cref="T:System.EventArgs" />。</param>
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
_dtSystemDlltab = CommonLib.SqlHelper.ExecuteDataSet("select * from P_systemDlltab where DLLCoid='" + DLLCoid + "'").Tables[0];
|
||||
if (_dtSystemDlltab != null && _dtSystemDlltab.Rows.Count > 0)
|
||||
{
|
||||
_modeObj = new ModuleModel(_dtSystemDlltab.Rows[0]);
|
||||
this.InitSetting();
|
||||
this.InitControl();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置按钮权限</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void SetButtonState()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_modeObj != null && ParentPriv == 1)
|
||||
{
|
||||
this.btnAdd.Enabled = _modeObj.AddEnable;
|
||||
this.btnDelete.Enabled = _modeObj.DeleteEnable;
|
||||
this.btnUpdate.Enabled = this.btnSave.Enabled = this._modeObj.ModifyEnable;
|
||||
// 当前标签为报表
|
||||
if (_modeObj.HasReport)
|
||||
{
|
||||
btnAdd.Visible = btnDelete.Visible = btnUpdate.Visible = btnSave.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnAdd.Enabled = this.btnDelete.Enabled = this.btnSave.Enabled = this.btnUpdate.Enabled = false;
|
||||
//this.pl_bottom.Visible = false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:初始化设置</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void InitSetting()
|
||||
{
|
||||
string sqlValue = "select top 1 * from P_systemwordbooktab where tab='" + DLLCoid + "' order by orderid";
|
||||
DataTable dt = CommonLib.SqlHelper.ExecuteDataTable(sqlValue);
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
this._primaryKey = dt.Rows[0]["fieldname"] + "";
|
||||
//绑定树
|
||||
this.treeGridControlEx.BindTreeGridEx(TreeKeyFieldName, TreeParentFieldName);
|
||||
this.SetGridMenu();
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置表格菜单</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void SetGridMenu()
|
||||
{
|
||||
GridMenu gm = null;
|
||||
if (ParentPriv == 1)
|
||||
{
|
||||
gm = new GridMenu(FormText, OperatorId, OperatorName, Privilege, DLLCoid, "", this.treeGridControlEx.TreeListObj);
|
||||
gm.DirId = _modeObj.MenuDirId + "";
|
||||
gm.filedKey = this._primaryKey;
|
||||
gm.BindGridMenuTreeList(DLLCoid);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:初始化控件</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void InitControl()
|
||||
{
|
||||
this.InitSearchControl();
|
||||
this.treeGridControlEx.SetTreeColumn(TreeColumnSource, this._modeObj.CanEdit);
|
||||
this.treeGridControlEx.TreeDoubleClick += new EventHandler(OnTreeDoubleClick);
|
||||
this.AddTreeNodeState();
|
||||
this.SetButtonState();
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:初始化搜索控件</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void InitSearchControl()
|
||||
{
|
||||
DataTable cbSearchFiled = CommonLib.SqlHelper.ExecuteDataSet("select * from P_systemwordbooktab where tab='" + DLLCoid + "' and ifSearch =0 and isnull(username1,'')<>''").Tables[0];
|
||||
//加载筛选框
|
||||
cbField.DataSource = cbSearchFiled;
|
||||
cbField.DisplayMember = "username1";
|
||||
cbField.ValueMember = "fieldname";
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:新增树节点同级下级</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void AddTreeNodeState()
|
||||
{
|
||||
BarButtonItem item = new BarButtonItem();
|
||||
item.Caption = "同级节点";
|
||||
item.ItemClick += new ItemClickEventHandler(itemAdd_ItemClick);
|
||||
|
||||
BarButtonItem subItem = new BarButtonItem();
|
||||
subItem.Caption = "下级节点";
|
||||
subItem.ItemClick += new ItemClickEventHandler(subItemAdd_ItemClick);
|
||||
this.pm_AddNode.AddItem(item);
|
||||
this.pm_AddNode.AddItem(subItem);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:添加同级节点</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void itemAdd_ItemClick(object sender, EventArgs e)
|
||||
{
|
||||
CommonAddNode();
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:添加</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void CommonAddNode(bool lowerNode = false)
|
||||
{
|
||||
DataRow item = getSelectNodeRow(this.treeGridControlEx.TreeListObj.FocusedNode);
|
||||
if (!string.IsNullOrEmpty(_modeObj.MenuAddName))
|
||||
{
|
||||
string[] args ={
|
||||
FormText,
|
||||
OperatorId,
|
||||
OperatorName,
|
||||
Privilege,
|
||||
DLLCoid,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
ObjectId,
|
||||
ObjectValue,
|
||||
DllSql,
|
||||
lowerNode?item[TreeKeyFieldName]+"":item[TreeParentFieldName]+""
|
||||
};
|
||||
ExecuteAddDll(args, item, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTreeNodeRow(lowerNode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:添加一行</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void AddTreeNodeRow(bool lowerNode)
|
||||
{
|
||||
TreeListNode node = this.treeGridControlEx.TreeListObj.FocusedNode;
|
||||
//if (node != null)
|
||||
//{
|
||||
// DataRow row = getSelectNodeRow(node);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
//}
|
||||
//新增树节点
|
||||
TreeListNode addNode = this.treeGridControlEx.AddTreeNode(lowerNode);
|
||||
DataTable dt = null;
|
||||
if (!string.IsNullOrEmpty(DllSql) && DllSql.Contains("select"))
|
||||
{
|
||||
dt = SqlHelper.ExecuteDataSet(DllSql).Tables[0];
|
||||
}
|
||||
//默认值
|
||||
SetDefaultValue(dt, addNode);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置默认值</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void SetDefaultValue(DataTable dt, TreeListNode addNode)
|
||||
{
|
||||
foreach (TreeListColumn item in this.treeGridControlEx.TreeListObj.Columns)
|
||||
{
|
||||
if (item.Tag != null)
|
||||
{
|
||||
MyTagModel cmt = item.Tag as MyTagModel;
|
||||
if (cmt != null)
|
||||
{
|
||||
string defaultValue = PubClass.GetDefaultValue(cmt.DefaultValue.ToString(), OperatorId, OperatorName);
|
||||
if (item.FieldName.ToUpper().Equals(ObjectId.ToUpper()))
|
||||
{
|
||||
addNode.SetValue(item, ObjectValue);
|
||||
}
|
||||
else if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataColumn dc in dt.Columns)
|
||||
{
|
||||
if (dc.ColumnName.ToUpper() == item.FieldName.ToUpper())
|
||||
{
|
||||
addNode.SetValue(item, dt.Rows[0][dc.ColumnName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(defaultValue))
|
||||
{
|
||||
addNode.SetValue(item, defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:添加下级节点</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void subItemAdd_ItemClick(object sender, EventArgs e)
|
||||
{
|
||||
CommonAddNode(true);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:双击和按钮修改树回调</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void OnTreeDoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
//当前树节点
|
||||
//TreeListNode node = sender as TreeListNode;
|
||||
DataRow item = getSelectNodeRow(this.treeGridControlEx.TreeListObj.FocusedNode);
|
||||
if (item == null) return;
|
||||
string productId = item[_primaryKey] + "";
|
||||
//修改条件验证
|
||||
bool canEdit = ModifyValidate(item);
|
||||
canEdit = canEdit && !Privilege.Equals("1");
|
||||
if (!string.IsNullOrEmpty(this._modeObj.MenuAddName))
|
||||
{
|
||||
string[] args ={
|
||||
FormText,
|
||||
OperatorId,
|
||||
OperatorName,
|
||||
Privilege,
|
||||
DLLCoid,
|
||||
"",
|
||||
Convert.ToInt32(canEdit).ToString(),
|
||||
productId,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
item[TreeKeyFieldName]+"",
|
||||
DllSql
|
||||
};
|
||||
ExecuteAddDll(args, item);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:修改验证</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
private bool ModifyValidate(DataRow row)
|
||||
{
|
||||
bool canEdit = string.IsNullOrEmpty(this._modeObj.ModifyCond);
|
||||
if (this._modeObj.ModifyEnable)
|
||||
{
|
||||
string cond = this._modeObj.ModifyCond;
|
||||
cond = PubClass.ReqSqlParam(cond, OperatorId, OperatorName);
|
||||
cond = PubClass.ReqSqlWhere(row, cond);
|
||||
canEdit = Convert.ToBoolean(Evaluator.Eval(cond));
|
||||
}
|
||||
else
|
||||
{
|
||||
canEdit = false;
|
||||
}
|
||||
return canEdit;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取选中行数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private DataRow getSelectNodeRow(DevExpress.XtraTreeList.Nodes.TreeListNode node)
|
||||
{
|
||||
DataRowView dataRowView = this.treeGridControlEx.TreeListObj.GetDataRecordByNode(node) as DataRowView;
|
||||
return dataRowView != null ? dataRowView.Row : null;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:调用Add模块</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="args">add参数</param>
|
||||
/// <param name="row">当前行</param>
|
||||
/// <param name="excuteState">true是新增反之</param>
|
||||
private void ExecuteAddDll(string[] args, DataRow row, bool isAdd = false)
|
||||
{
|
||||
if (row == null && !isAdd)
|
||||
{
|
||||
MessageBox.Show("请先选中一行");
|
||||
return;
|
||||
}
|
||||
IForm form = PubUtil.LoadDllForm(this._modeObj.MenuAddName, args);
|
||||
DialogResult result = form.SubForm.ShowDialog();
|
||||
if (result != DialogResult.Cancel)
|
||||
RefreshData();
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:刷新数据</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void RefreshData()
|
||||
{
|
||||
TreeListNode focusedNode = this.treeGridControlEx.TreeListObj.FocusedNode;
|
||||
|
||||
List<TreeListNode> parentnodeNodes = this.treeGridControlEx.TreeListObj.Nodes.Cast<TreeListNode>().Where(o => o.Expanded).ToList();
|
||||
List<TreeListNode> nodes = new List<TreeListNode>();
|
||||
foreach (TreeListNode parentnode in parentnodeNodes)
|
||||
{
|
||||
GetChildTreeNode(parentnode, nodes);
|
||||
}
|
||||
nodes.AddRange(parentnodeNodes);
|
||||
//设置树数据
|
||||
SetTreeSource(TreeSourceSql);
|
||||
//刷新标题
|
||||
RefreshTabPageTitle();
|
||||
//刷新树节点
|
||||
this.treeGridControlEx.RefreshTreeNode(nodes, focusedNode);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:树表保存(可批量)</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void TreeGridSave()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_modeObj.MenuTable))
|
||||
{
|
||||
MessageBox.Show("检测到未设置表名");
|
||||
return;
|
||||
}
|
||||
DataColumnCollection columns = SqlHelper.ExecuteDataTable(string.Format("select * from {0} where 1<>1", _modeObj.MenuTable)).Columns;
|
||||
DataTable dtSource = this.treeGridControlEx.TreeListObj.DataSource as DataTable;
|
||||
List<DataRow> modifiedRows = dtSource.Rows.Cast<DataRow>().Where(x => x.RowState == DataRowState.Modified || x.RowState == DataRowState.Added).ToList();
|
||||
List<string> sqls = GetModifiedSql(modifiedRows, columns);
|
||||
ExcuteSaveData(sqls);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:执行保存存储过程</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void ExcuteSaveData(List<string> sqls)
|
||||
{
|
||||
int resultCount = 0;
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (int i = 0; i < sqls.Count; i++)
|
||||
{
|
||||
if (i == sqls.Count - 1 || (i != 0 && i % 5 == 0))
|
||||
{
|
||||
if (i == sqls.Count - 1)
|
||||
str.Append(sqls[i]);
|
||||
SqlParameter pMsg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
|
||||
pMsg.Direction = ParameterDirection.Output;
|
||||
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
|
||||
returnValue.Direction = ParameterDirection.ReturnValue;
|
||||
SqlParameter[] param =
|
||||
{
|
||||
new SqlParameter("@baseSql",SqlDbType.VarChar,8000),
|
||||
new SqlParameter("@saveType",SqlDbType.Int),
|
||||
new SqlParameter("@modid",SqlDbType.VarChar,20),
|
||||
new SqlParameter("@tablename",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@keyfield",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@keyvalue",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@Operatorid",SqlDbType.Int),
|
||||
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
||||
pMsg,
|
||||
returnValue
|
||||
};
|
||||
param[0].Value = str.ToString();
|
||||
param[1].Value = 8;// --8新增保存,9修改保存,10 删除条码
|
||||
param[2].Value = DLLCoid;
|
||||
param[3].Value = this._modeObj.MenuTable;
|
||||
param[4].Value = _primaryKey;
|
||||
param[5].Value = "";
|
||||
param[6].Value = OperatorId;
|
||||
param[7].Value = OperatorName;
|
||||
DataSet ds = SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "P_BaseSave", "baseSave", param);
|
||||
string rMsg = pMsg.Value.ToString();
|
||||
resultCount += Convert.ToInt32(returnValue.Value.ToString());
|
||||
if (returnValue.Value + "" != "1")
|
||||
{
|
||||
XtraMessageBox.Show("保存失败.错误原因:" + rMsg);
|
||||
break;
|
||||
}
|
||||
str.Clear();
|
||||
}
|
||||
str.Append(sqls[i]);
|
||||
}
|
||||
if (resultCount > 0)
|
||||
{
|
||||
XtraMessageBox.Show("保存成功");
|
||||
RefreshData();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:构造Sql</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private List<string> GetModifiedSql(List<DataRow> rows, DataColumnCollection dt)
|
||||
{
|
||||
List<string> sqls = new List<string>();
|
||||
foreach (DataRow row in rows)
|
||||
{
|
||||
string updateSql = "update {0} set {1} where {2}='{3}'";
|
||||
string insertSql = "insert into {0}({1}) values({2});";
|
||||
string updateFields = string.Empty;
|
||||
string insertFields = string.Empty;
|
||||
string insertValues = string.Empty;
|
||||
|
||||
foreach (DataColumn col in dt)
|
||||
{
|
||||
DataRow item = TreeColumnSource.Rows.Cast<DataRow>().FirstOrDefault(x => x["fieldname"] + "" == col.ColumnName);
|
||||
if (item != null && col.ColumnName != _primaryKey && col.ColumnName != "id")
|
||||
{
|
||||
//当拖动树节点到另个节点时候列编辑状态不存这里单独对它处理
|
||||
if (col.ColumnName == TreeParentFieldName)
|
||||
{
|
||||
updateFields += string.Format("{0}='{1}',", col.ColumnName, row[col.ColumnName]);
|
||||
}
|
||||
//修改状态
|
||||
if (item.RowState == DataRowState.Modified)
|
||||
{
|
||||
updateFields += string.Format("{0}='{1}',", col.ColumnName, row[col.ColumnName]);
|
||||
}
|
||||
//新增状态
|
||||
else if (row.RowState == DataRowState.Added)
|
||||
{
|
||||
insertFields += col.ColumnName + ",";
|
||||
insertValues += "'" + row[col.ColumnName] + "',";
|
||||
}
|
||||
}
|
||||
}
|
||||
updateFields = updateFields.TrimEnd(',');
|
||||
insertFields = insertFields.TrimEnd(',');
|
||||
insertValues = insertValues.TrimEnd(',');
|
||||
if (!string.IsNullOrEmpty(updateFields))
|
||||
{
|
||||
updateSql = string.Format(updateSql, _modeObj.MenuTable, updateFields, _primaryKey, row[_primaryKey]);
|
||||
sqls.Add(updateSql);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(insertFields))
|
||||
{
|
||||
insertSql = string.Format(insertSql, _modeObj.MenuTable, insertFields, insertValues);
|
||||
sqls.Add(insertSql);
|
||||
}
|
||||
}
|
||||
return sqls;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:刷新标题</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void RefreshTabPageTitle()
|
||||
{
|
||||
XtraTabPage tab = this.Tag as XtraTabPage;
|
||||
tab.Text = FormText + "(" + _dtSource.Rows.Count + ")";
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置树数据</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void SetTreeSource(string sql)
|
||||
{
|
||||
_dtSource = SqlHelper.ExecuteDataTable(sql);
|
||||
this.treeGridControlEx.SetDataSource(_dtSource);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:保存事件</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void OnSaveClick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
TreeGridSave();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XtraMessageBox.Show("保存失败");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:搜索查询事件</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void OnCondSearchClick(object sender, EventArgs e)
|
||||
{
|
||||
RefreshData();
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:删除事件</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void OnDeleteClick(object sender, EventArgs e)
|
||||
{
|
||||
TreeListNode selectNode = this.treeGridControlEx.TreeListObj.FocusedNode;
|
||||
if (selectNode == null)
|
||||
{
|
||||
XtraMessageBox.Show("没有符合删除条件的记录");
|
||||
}
|
||||
if (MessageBox.Show("您确定要删除选中记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
string ids = string.Empty;
|
||||
List<TreeListNode> nodes = new List<TreeListNode>();
|
||||
GetChildTreeNode(selectNode, nodes);
|
||||
nodes.Add(selectNode);
|
||||
foreach (TreeListNode node in nodes)
|
||||
{
|
||||
DataRow row = getSelectNodeRow(node);
|
||||
if (string.IsNullOrEmpty(_primaryKey + "")) continue;
|
||||
ids += "'" + row[TreeKeyFieldName] + "',";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ids))
|
||||
{
|
||||
//执行删除
|
||||
string sql = string.Format("delete from {0} where {1} in ({2})", this._modeObj.MenuTable, this._primaryKey, ids.Trim(','));
|
||||
int result = SqlHelper.ExecuteNonQuery(sql);
|
||||
if (result > 0)
|
||||
{
|
||||
XtraMessageBox.Show("记录删除成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
XtraMessageBox.Show("没有符合删除条件的记录");
|
||||
}
|
||||
}
|
||||
this.treeGridControlEx.TreeListObj.DeleteNode(selectNode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:获取子节点</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void GetChildTreeNode(TreeListNode parentNode, List<TreeListNode> nodes)
|
||||
{
|
||||
if (parentNode.Nodes.Count > 0)
|
||||
{
|
||||
foreach (TreeListNode node in parentNode.Nodes)
|
||||
{
|
||||
nodes.Add(node);
|
||||
if (node.Nodes.Count > 0)
|
||||
{
|
||||
GetChildTreeNode(node, nodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="pm_AddNode.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>147, 21</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,64 @@
|
||||
namespace Lskj.MyControl.TreeGridControl
|
||||
{
|
||||
partial class TreeGridControlEx
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.treeList1 = new DevExpress.XtraTreeList.TreeList();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeList1
|
||||
//
|
||||
this.treeList1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeList1.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeList1.Name = "treeList1";
|
||||
this.treeList1.OptionsBehavior.DragNodes = true;
|
||||
this.treeList1.OptionsFind.AllowFindPanel = true;
|
||||
this.treeList1.Size = new System.Drawing.Size(565, 265);
|
||||
this.treeList1.TabIndex = 0;
|
||||
this.treeList1.BeforeDragNode += new DevExpress.XtraTreeList.BeforeDragNodeEventHandler(this.OnBeforeDragNode);
|
||||
this.treeList1.AfterDragNode += new DevExpress.XtraTreeList.NodeEventHandler(this.OnAfterDragNode);
|
||||
this.treeList1.DoubleClick += new System.EventHandler(this.OnDoubleClick);
|
||||
//
|
||||
// TreeGridControlEx
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.treeList1);
|
||||
this.Name = "TreeGridControlEx";
|
||||
this.Size = new System.Drawing.Size(565, 265);
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeList1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraTreeList.TreeList treeList1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
/***********************
|
||||
* 说明:树控件
|
||||
* 创建人:姜棚
|
||||
* 创建日期:
|
||||
* 修改人:
|
||||
* 修改日期:
|
||||
* 修改备注:
|
||||
* 版本:1.0.0.0
|
||||
***********************/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraTreeList.Columns;
|
||||
using DevExpress.XtraTreeList;
|
||||
using DevExpress.XtraTreeList.Menu;
|
||||
using DevExpress.Utils.Menu;
|
||||
using DevExpress.XtraTreeList.Nodes;
|
||||
|
||||
namespace Lskj.MyControl.TreeGridControl
|
||||
{
|
||||
public partial class TreeGridControlEx : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 树模型
|
||||
/// </summary>
|
||||
/// <value>The tree list object.</value>
|
||||
public TreeList TreeListObj { get { return this.treeList1; } }
|
||||
/// <summary>
|
||||
/// 树双击
|
||||
/// </summary>
|
||||
public EventHandler TreeDoubleClick;
|
||||
|
||||
public TreeGridControlEx()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:绑定树表</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="keyFieldName">节点</param>
|
||||
/// <param name="parentFieldName">父节点</param>
|
||||
public void BindTreeGridEx(string keyFieldName, string parentFieldName)
|
||||
{
|
||||
this.treeList1.KeyFieldName = keyFieldName;
|
||||
this.treeList1.ParentFieldName = parentFieldName;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置列</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="table">The table.</param>
|
||||
/// <param name="customColumKey">The custom colum key.</param>
|
||||
/// <summary>
|
||||
/// 设置树表格列
|
||||
/// </summary>
|
||||
/// <param name="dtFileds"></param>
|
||||
public void SetTreeColumn(DataTable dtFileds, bool isEdit = false)
|
||||
{
|
||||
for (int i = 0; i < dtFileds.Rows.Count; i++)
|
||||
{
|
||||
DataRow row = dtFileds.Rows[i];
|
||||
TreeListColumn gridColumn = new TreeListColumn();
|
||||
gridColumn.FieldName = row["fieldname"] + "";
|
||||
gridColumn.Name = row["fieldname"] + "";
|
||||
gridColumn.VisibleIndex = i;
|
||||
gridColumn.Caption = row["username1"] + "";
|
||||
gridColumn.Width = Convert.ToInt32(row["width"]);
|
||||
gridColumn.Visible = ((Convert.ToInt32(row["width"]) > 0));
|
||||
gridColumn.OptionsFilter.FilterPopupMode = DevExpress.XtraTreeList.FilterPopupMode.CheckedList;
|
||||
gridColumn.OptionsColumn.AllowEdit = isEdit;
|
||||
MyTagModel mode = new MyTagModel() { DefaultValue = row["defaultdate"].ToString(), Tag = gridColumn.Tag, calcExpr = row["calcExpr"].ToString(), unionFields = row["unionFields"] + "", unionValue = row["unionValue"] + "", lookupSql = row["fieldsql"] + "", lookupKey = row["fieldsqlid"] + "", lookupValue = row["fieldsqlname"] + "", fieldTypeId = Convert.ToInt32(row["fieldsqlTag"]) };
|
||||
gridColumn.Tag = mode;
|
||||
string dataFormat = row["DataFormat"] + "";
|
||||
Lskj.PubUtils.CommonUtils.DataFormat(gridColumn, row["DataFormat"] + "", 7); // 单据来源明细没有定义列类型,默认按照数字方式格式化
|
||||
if (dtFileds.Columns.Contains("Accuracy"))
|
||||
SetColumnFormat(dtFileds.Rows[i]["Accuracy"] + "", gridColumn);
|
||||
bool isSum = dtFileds.Columns.Contains("isSum") && !String.IsNullOrEmpty(row["isSum"] + "") && Convert.ToInt32(row["isSum"]) == 1;
|
||||
SetColumnSummary(gridColumn, isSum, dataFormat);
|
||||
treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { gridColumn });
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置列统计</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void SetColumnSummary(TreeListColumn gridColumn, bool isSum, string dataFormat)
|
||||
{
|
||||
if (gridColumn.VisibleIndex == 0)
|
||||
{
|
||||
this.treeList1.OptionsView.ShowSummaryFooter = true;
|
||||
gridColumn.AllNodesSummary = true;
|
||||
gridColumn.SummaryFooter = SummaryItemType.Count;
|
||||
gridColumn.RowFooterSummaryStrFormat = "合计:{0:#,###}行";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isSum)
|
||||
{
|
||||
this.treeList1.OptionsView.ShowSummaryFooter = true;
|
||||
gridColumn.RowFooterSummary = DevExpress.XtraTreeList.SummaryItemType.Sum;
|
||||
gridColumn.AllNodesSummary = true;
|
||||
gridColumn.SummaryFooter = DevExpress.XtraTreeList.SummaryItemType.Sum;
|
||||
gridColumn.RowFooterSummaryStrFormat = "{0:" + dataFormat + "}";
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置列格式化</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void SetColumnFormat(string accuracy, TreeListColumn gridColumn)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(accuracy) && accuracy != "0")
|
||||
{
|
||||
gridColumn.Format.FormatType = DevExpress.Utils.FormatType.Numeric;
|
||||
gridColumn.Format.FormatString = "F2";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置数据源</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void SetDataSource(DataTable dtSource)
|
||||
{
|
||||
this.treeList1.DataSource = dtSource;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:添加树节点</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public TreeListNode AddTreeNode(bool lowerNode)
|
||||
{
|
||||
TreeListNode selectNode = this.treeList1.FocusedNode;
|
||||
if (!lowerNode && selectNode != null) selectNode = selectNode.ParentNode;
|
||||
return this.treeList1.AppendNode(null, selectNode);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:刷新树节点(以先前展开状态进行刷新)</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void RefreshTreeNode(List<TreeListNode> treeNodes, TreeListNode focusNode)
|
||||
{
|
||||
foreach (TreeListNode node in treeNodes)
|
||||
{
|
||||
TreeListNode selectNode = this.treeList1.FindNodeByID(node.Id);
|
||||
if (selectNode != null)
|
||||
selectNode.Expanded = true;
|
||||
}
|
||||
if (focusNode != null)
|
||||
{
|
||||
//由于绑定数据源变了,要在现在树中找到原来记录的节点
|
||||
focusNode = this.treeList1.FindNodeByID(focusNode.Id);
|
||||
this.treeList1.FocusedNode = focusNode;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:拖动节点前</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="DevExpress.XtraTreeList.BeforeDragNodeEventArgs"/> instance containing the event data.</param>
|
||||
private void OnBeforeDragNode(object sender, DevExpress.XtraTreeList.BeforeDragNodeEventArgs e)
|
||||
{
|
||||
// 根据存储过程进行验证是否可拖动
|
||||
|
||||
|
||||
//禁止拖动
|
||||
//e.CanDrag = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:拖动节点后</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="DevExpress.XtraTreeList.NodeEventArgs"/> instance containing the event data.</param>
|
||||
private void OnAfterDragNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e)
|
||||
{
|
||||
//存储过程验证
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:获取选中行数据</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-17 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
/// <returns>DataRow.</returns>
|
||||
private DataRow GetForcedNodeDataRow(TreeListNode node)
|
||||
{
|
||||
DataRowView dataRowView = this.treeList1.GetDataRecordByNode(node) as DataRowView;
|
||||
return dataRowView != null ? dataRowView.Row : null;
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:双击树表</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void OnDoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (TreeDoubleClick != null)
|
||||
TreeDoubleClick(this.treeList1.FocusedNode, null);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:打开查找控件</para>
|
||||
/// <para>创建人:姜棚</para>
|
||||
/// <para>创建日期:2018-08-23 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="msg">通过引用传递的 <see cref="T:System.Windows.Forms.Message" />,它表示要处理的窗口消息。</param>
|
||||
/// <param name="keyData"><see cref="T:System.Windows.Forms.Keys" /> 值之一,它表示要处理的键。</param>
|
||||
/// <returns>如果字符已由控件处理,则为 true;否则为 false。</returns>
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
switch (keyData)
|
||||
{
|
||||
//ctrl键按下
|
||||
case Keys.Control | Keys.F:
|
||||
this.treeList1.ShowFindPanel();
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user