增加数据库文件 部门 角色 功能

Beta
凯 王 2021-05-07 17:59:08 +08:00
parent 74786fa71b
commit 52107e0dca
20 changed files with 2771 additions and 59 deletions

BIN
DB/winformdevfarme.mdf Normal file

Binary file not shown.

BIN
DB/winformdevfarme_log.ldf Normal file

Binary file not shown.

View File

@ -17,7 +17,9 @@ namespace MES
public virtual DbSet<sysUserInfo> sysUserInfo { get; set; }
public virtual DbSet<sysDictDataInfo> sysDictDataInfo { get; set; }
public virtual DbSet<sysDictTypeInfo> sysDictTypeInfo { get; set; }
public virtual DbSet<stockInfo> stockInfo { get; set; }
public virtual DbSet<sysDeptInfo> sysDeptInfo { get; set; }
public virtual DbSet<sysFunctionInfo> sysFunctionInfo { get; set; }
public virtual DbSet<sysRoleInfo> sysRoleInfo { get; set; }
}
}

View File

@ -0,0 +1,34 @@
using WinformGeneralDeveloperFrame.Commons;
namespace MES.Entity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("sysDept")]
public partial class sysDeptInfo
{
[ModelBindControl("txtid")]
public int id{set;get;}
[ModelBindControl("txtpid")]
public int pid{set;get;}
[ModelBindControl("txtname")]
public string name{set;get;}
[ModelBindControl("txtaddress")]
public string address{set;get;}
[ModelBindControl("txtphone")]
public string phone{set;get;}
[ModelBindControl("txtcreatorId")]
public int creatorId{set;get;}
[ModelBindControl("txtcreateTime")]
public DateTime? createTime{set;get;}=DateTime.Now;
[ModelBindControl("txteditorId")]
public int editorId{set;get;}
[ModelBindControl("txteditTime")]
public DateTime? editTime{set;get;}=DateTime.Now;
}
}

View File

@ -0,0 +1,24 @@
using WinformGeneralDeveloperFrame.Commons;
namespace MES.Entity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("sysFunction")]
public partial class sysFunctionInfo
{
[ModelBindControl("txtid")]
public int id{set;get;}
[ModelBindControl("txtpid")]
public int pid{set;get;}
[ModelBindControl("txtname")]
public string name{set;get;}
[ModelBindControl("txtfunctionCode")]
public string functionCode{set;get;}
}
}

View File

@ -0,0 +1,32 @@
using WinformGeneralDeveloperFrame.Commons;
namespace MES.Entity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("sysRole")]
public partial class sysRoleInfo
{
[ModelBindControl("txtid")]
public int id{set;get;}
[ModelBindControl("txtcompanyId")]
public int companyId{set;get;}
[ModelBindControl("txtcompanyName")]
public string companyName{set;get;}
[ModelBindControl("txtname")]
public string name{set;get;}
[ModelBindControl("txtcreatorId")]
public int creatorId{set;get;}
[ModelBindControl("txtcreateTime")]
public DateTime? createTime{set;get;}=DateTime.Now;
[ModelBindControl("txteditorId")]
public int editorId{set;get;}
[ModelBindControl("txteditTime")]
public DateTime? editTime{set;get;}=DateTime.Now;
}
}

View File

@ -0,0 +1,197 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;
using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
namespace MES.Form
{
public partial class FrmsysDept : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public FrmsysDept()
{
InitializeComponent();
}
private void FrmsysDept_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysDeptInfo());
InitSearchDicData();
}
/// <summary>
/// 数据源初始化
/// </summary>
/// <returns></returns>
private void Init()
{
txtpid.Properties.DataSource = GetDataTableUtils.SqlTable("部门");
repositoryItemTreeListtxtpid.DataSource= GetDataTableUtils.SqlTable("部门");
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxteditorId.DataSource= GetDataTableUtils.SqlTable("用户");
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("ID","id");
fieldDictionary.Add("父ID","pid");
fieldDictionary.Add("名称","name");
fieldDictionary.Add("地址","address");
fieldDictionary.Add("电话","phone");
fieldDictionary.Add("创建人","creatorId");
fieldDictionary.Add("创建时间","createTime");
fieldDictionary.Add("编辑人","editorId");
fieldDictionary.Add("编辑时间","editTime");
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
try
{
sysDeptInfo info= (sysDeptInfo)this.ControlDataToModel(new sysDeptInfo());
using (var db = new MESDB())
{
db.sysDeptInfo.AddOrUpdate(info);
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
public override void InitgrdListDataSource()
{
using (var con=new MESDB())///
{
grdList.DataSource=con.sysDeptInfo.ToList();
}
Init();
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
//if(string.IsNullOrEmpty(txtpid.EditValue.ToString()))
//{
// "父ID不能为空".ShowWarning();
// txtpid.Focus();
// return false;
//}
if(string.IsNullOrEmpty(txtname.EditValue.ToString()))
{
"名称不能为空".ShowWarning();
txtname.Focus();
return false;
}
if(string.IsNullOrEmpty(txtaddress.EditValue.ToString()))
{
"地址不能为空".ShowWarning();
txtaddress.Focus();
return false;
}
if(string.IsNullOrEmpty(txtphone.EditValue.ToString()))
{
"电话不能为空".ShowWarning();
txtphone.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString()))
{
"创建人不能为空".ShowWarning();
txtcreatorId.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreateTime.EditValue.ToString()))
{
"创建时间不能为空".ShowWarning();
txtcreateTime.Focus();
return false;
}
if(string.IsNullOrEmpty(txteditorId.EditValue.ToString()))
{
"编辑人不能为空".ShowWarning();
txteditorId.Focus();
return false;
}
if(string.IsNullOrEmpty(txteditTime.EditValue.ToString()))
{
"编辑时间不能为空".ShowWarning();
txteditTime.Focus();
return false;
}
return true;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
sysDeptInfo info = (sysDeptInfo)this.ControlDataToModel(new sysDeptInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
{
if (string.IsNullOrEmpty(sql))
{
grdList.DataSource = db.sysDeptInfo.SqlQuery("select * from sysDept").ToList();
}
else
{
grdList.DataSource = db.sysDeptInfo.SqlQuery($"select * from sysDept where {sql}").ToList();
}
}
}
}
}
}

View File

@ -0,0 +1,651 @@
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using DevExpress.XtraTab;
namespace MES.Form
{
partial class FrmsysDept
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemTreeListtxtpid = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit();
this.repositoryItemTreeListtxtpidTreeList = new DevExpress.XtraTreeList.TreeList();
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemtxteditorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.tabDataList = new DevExpress.XtraTab.XtraTabPage();
this.grdList = new DevExpress.XtraGrid.GridControl();
this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtid = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtpid = new DevExpress.XtraEditors.TreeListLookUpEdit();
this.txtpidTreeList = new DevExpress.XtraTreeList.TreeList();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtname = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtaddress = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtphone = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit();
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtcreateTime = new DevExpress.XtraEditors.DateEdit();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.txteditorId = new DevExpress.XtraEditors.LookUpEdit();
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
this.txteditTime = new DevExpress.XtraEditors.DateEdit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxteditorId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.tabDataList.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit();
this.tabDataDetail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtpid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtpidTreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtname.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtaddress.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtphone.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txteditorId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties)).BeginInit();
this.SuspendLayout();
//
// gridColumn1
//
this.gridColumn1.Caption = "ID";
this.gridColumn1.FieldName = "id";
this.gridColumn1.Name = "gridColumn1";
this.gridColumn1.Visible = true;
this.gridColumn1.VisibleIndex = 0;
this.gridColumn1.Width = 201;
//
// gridColumn2
//
this.gridColumn2.Caption = "父ID";
this.gridColumn2.ColumnEdit = this.repositoryItemTreeListtxtpid;
this.gridColumn2.FieldName = "pid";
this.gridColumn2.Name = "gridColumn2";
this.gridColumn2.Visible = true;
this.gridColumn2.VisibleIndex = 1;
this.gridColumn2.Width = 201;
//
// repositoryItemTreeListtxtpid
//
this.repositoryItemTreeListtxtpid.AutoHeight = false;
this.repositoryItemTreeListtxtpid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemTreeListtxtpid.DisplayMember = "Name";
this.repositoryItemTreeListtxtpid.Name = "repositoryItemTreeListtxtpid";
this.repositoryItemTreeListtxtpid.TreeList = this.repositoryItemTreeListtxtpidTreeList;
this.repositoryItemTreeListtxtpid.ValueMember = "ID";
//
// repositoryItemTreeListtxtpidTreeList
//
this.repositoryItemTreeListtxtpidTreeList.Location = new System.Drawing.Point(0, 0);
this.repositoryItemTreeListtxtpidTreeList.Name = "repositoryItemTreeListtxtpidTreeList";
this.repositoryItemTreeListtxtpidTreeList.OptionsView.ShowIndentAsRowStyle = true;
this.repositoryItemTreeListtxtpidTreeList.ParentFieldName = "PID";
this.repositoryItemTreeListtxtpidTreeList.Size = new System.Drawing.Size(400, 200);
this.repositoryItemTreeListtxtpidTreeList.TabIndex = 0;
//
// gridColumn3
//
this.gridColumn3.Caption = "名称";
this.gridColumn3.FieldName = "name";
this.gridColumn3.Name = "gridColumn3";
this.gridColumn3.Visible = true;
this.gridColumn3.VisibleIndex = 2;
this.gridColumn3.Width = 201;
//
// gridColumn4
//
this.gridColumn4.Caption = "地址";
this.gridColumn4.FieldName = "address";
this.gridColumn4.Name = "gridColumn4";
this.gridColumn4.Visible = true;
this.gridColumn4.VisibleIndex = 3;
this.gridColumn4.Width = 201;
//
// gridColumn5
//
this.gridColumn5.Caption = "电话";
this.gridColumn5.FieldName = "phone";
this.gridColumn5.Name = "gridColumn5";
this.gridColumn5.Visible = true;
this.gridColumn5.VisibleIndex = 4;
this.gridColumn5.Width = 201;
//
// gridColumn6
//
this.gridColumn6.Caption = "创建人";
this.gridColumn6.ColumnEdit = this.repositoryItemtxtcreatorId;
this.gridColumn6.FieldName = "creatorId";
this.gridColumn6.Name = "gridColumn6";
this.gridColumn6.Visible = true;
this.gridColumn6.VisibleIndex = 5;
this.gridColumn6.Width = 201;
//
// repositoryItemtxtcreatorId
//
this.repositoryItemtxtcreatorId.AutoHeight = false;
this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemtxtcreatorId.DisplayMember = "Name";
this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId";
this.repositoryItemtxtcreatorId.ValueMember = "ID";
//
// gridColumn7
//
this.gridColumn7.Caption = "创建时间";
this.gridColumn7.DisplayFormat.FormatString = "G";
this.gridColumn7.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gridColumn7.FieldName = "createTime";
this.gridColumn7.Name = "gridColumn7";
this.gridColumn7.Visible = true;
this.gridColumn7.VisibleIndex = 6;
this.gridColumn7.Width = 201;
//
// gridColumn8
//
this.gridColumn8.Caption = "编辑人";
this.gridColumn8.ColumnEdit = this.repositoryItemtxteditorId;
this.gridColumn8.FieldName = "editorId";
this.gridColumn8.Name = "gridColumn8";
this.gridColumn8.Visible = true;
this.gridColumn8.VisibleIndex = 7;
this.gridColumn8.Width = 201;
//
// repositoryItemtxteditorId
//
this.repositoryItemtxteditorId.AutoHeight = false;
this.repositoryItemtxteditorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemtxteditorId.DisplayMember = "Name";
this.repositoryItemtxteditorId.Name = "repositoryItemtxteditorId";
this.repositoryItemtxteditorId.ValueMember = "ID";
//
// gridColumn9
//
this.gridColumn9.Caption = "编辑时间";
this.gridColumn9.DisplayFormat.FormatString = "G";
this.gridColumn9.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gridColumn9.FieldName = "editTime";
this.gridColumn9.Name = "gridColumn9";
this.gridColumn9.Visible = true;
this.gridColumn9.VisibleIndex = 8;
this.gridColumn9.Width = 201;
//
// xtraTabControl1
//
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabDataList,
this.tabDataDetail});
//
// tabDataList
//
this.tabDataList.Controls.Add(this.grdList);
this.tabDataList.Name = "tabDataList";
this.tabDataList.Size = new System.Drawing.Size(1294, 737);
this.tabDataList.Text = "数据列表";
//
// grdList
//
this.grdList.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdList.Location = new System.Drawing.Point(0, 0);
this.grdList.MainView = this.grdListView;
this.grdList.Name = "grdList";
this.grdList.Size = new System.Drawing.Size(1294, 737);
this.grdList.TabIndex = 0;
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.grdListView});
//
// grdListView
//
this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gridColumn1,
this.gridColumn2,
this.gridColumn3,
this.gridColumn4,
this.gridColumn5,
this.gridColumn6,
this.gridColumn7,
this.gridColumn8,
this.gridColumn9});
this.grdListView.GridControl = this.grdList;
this.grdListView.Name = "grdListView";
this.grdListView.OptionsBehavior.Editable = false;
this.grdListView.OptionsView.ColumnAutoWidth = false;
//
// tabDataDetail
//
this.tabDataDetail.Controls.Add(this.panelControl2);
this.tabDataDetail.Name = "tabDataDetail";
this.tabDataDetail.Size = new System.Drawing.Size(1294, 737);
this.tabDataDetail.Text = "数据编辑";
//
// panelControl2
//
this.panelControl2.Controls.Add(this.layoutControl1);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(1294, 737);
this.panelControl2.TabIndex = 0;
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.txtid);
this.layoutControl1.Controls.Add(this.txtpid);
this.layoutControl1.Controls.Add(this.txtname);
this.layoutControl1.Controls.Add(this.txtaddress);
this.layoutControl1.Controls.Add(this.txtphone);
this.layoutControl1.Controls.Add(this.txtcreatorId);
this.layoutControl1.Controls.Add(this.txtcreateTime);
this.layoutControl1.Controls.Add(this.txteditorId);
this.layoutControl1.Controls.Add(this.txteditTime);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(2, 2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(1290, 733);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1,
this.layoutControlItem2,
this.layoutControlItem3,
this.layoutControlItem4,
this.layoutControlItem5,
this.layoutControlItem6,
this.layoutControlItem7,
this.layoutControlItem8,
this.layoutControlItem9});
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733);
this.layoutControlGroup1.TextVisible = false;
//
// layoutControlItem1
//
this.layoutControlItem1.Control = this.txtid;
this.layoutControlItem1.CustomizationFormText = "ID";
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem1.Text = "ID";
this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14);
//
// txtid
//
this.txtid.Location = new System.Drawing.Point(63, 12);
this.txtid.Name = "txtid";
this.txtid.Size = new System.Drawing.Size(1215, 20);
this.txtid.StyleController = this.layoutControl1;
this.txtid.TabIndex = 1;
//
// layoutControlItem2
//
this.layoutControlItem2.Control = this.txtpid;
this.layoutControlItem2.CustomizationFormText = "父ID";
this.layoutControlItem2.Location = new System.Drawing.Point(0, 24);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem2.Text = "父ID";
this.layoutControlItem2.TextSize = new System.Drawing.Size(48, 14);
//
// txtpid
//
this.txtpid.EditValue = "";
this.txtpid.Location = new System.Drawing.Point(63, 36);
this.txtpid.Name = "txtpid";
this.txtpid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtpid.Properties.DisplayMember = "Name";
this.txtpid.Properties.TreeList = this.txtpidTreeList;
this.txtpid.Properties.ValueMember = "ID";
this.txtpid.Size = new System.Drawing.Size(1215, 20);
this.txtpid.StyleController = this.layoutControl1;
this.txtpid.TabIndex = 2;
//
// txtpidTreeList
//
this.txtpidTreeList.Location = new System.Drawing.Point(0, 0);
this.txtpidTreeList.Name = "txtpidTreeList";
this.txtpidTreeList.OptionsView.ShowIndentAsRowStyle = true;
this.txtpidTreeList.ParentFieldName = "PID";
this.txtpidTreeList.Size = new System.Drawing.Size(400, 200);
this.txtpidTreeList.TabIndex = 0;
//
// layoutControlItem3
//
this.layoutControlItem3.Control = this.txtname;
this.layoutControlItem3.CustomizationFormText = "名称";
this.layoutControlItem3.Location = new System.Drawing.Point(0, 48);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem3.Text = "名称";
this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14);
//
// txtname
//
this.txtname.Location = new System.Drawing.Point(63, 60);
this.txtname.Name = "txtname";
this.txtname.Size = new System.Drawing.Size(1215, 20);
this.txtname.StyleController = this.layoutControl1;
this.txtname.TabIndex = 3;
//
// layoutControlItem4
//
this.layoutControlItem4.Control = this.txtaddress;
this.layoutControlItem4.CustomizationFormText = "地址";
this.layoutControlItem4.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem4.Text = "地址";
this.layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
//
// txtaddress
//
this.txtaddress.Location = new System.Drawing.Point(63, 84);
this.txtaddress.Name = "txtaddress";
this.txtaddress.Size = new System.Drawing.Size(1215, 20);
this.txtaddress.StyleController = this.layoutControl1;
this.txtaddress.TabIndex = 4;
//
// layoutControlItem5
//
this.layoutControlItem5.Control = this.txtphone;
this.layoutControlItem5.CustomizationFormText = "电话";
this.layoutControlItem5.Location = new System.Drawing.Point(0, 96);
this.layoutControlItem5.Name = "layoutControlItem5";
this.layoutControlItem5.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem5.Text = "电话";
this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14);
//
// txtphone
//
this.txtphone.Location = new System.Drawing.Point(63, 108);
this.txtphone.Name = "txtphone";
this.txtphone.Size = new System.Drawing.Size(1215, 20);
this.txtphone.StyleController = this.layoutControl1;
this.txtphone.TabIndex = 5;
//
// layoutControlItem6
//
this.layoutControlItem6.Control = this.txtcreatorId;
this.layoutControlItem6.CustomizationFormText = "创建人";
this.layoutControlItem6.Location = new System.Drawing.Point(0, 120);
this.layoutControlItem6.Name = "layoutControlItem6";
this.layoutControlItem6.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem6.Text = "创建人";
this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14);
//
// txtcreatorId
//
this.txtcreatorId.EditValue = "";
this.txtcreatorId.Location = new System.Drawing.Point(63, 132);
this.txtcreatorId.Name = "txtcreatorId";
this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtcreatorId.Properties.DisplayMember = "Name";
this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtcreatorId.Properties.ValueMember = "ID";
this.txtcreatorId.Size = new System.Drawing.Size(1215, 20);
this.txtcreatorId.StyleController = this.layoutControl1;
this.txtcreatorId.TabIndex = 6;
//
// layoutControlItem7
//
this.layoutControlItem7.Control = this.txtcreateTime;
this.layoutControlItem7.CustomizationFormText = "创建时间";
this.layoutControlItem7.Location = new System.Drawing.Point(0, 144);
this.layoutControlItem7.Name = "layoutControlItem7";
this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem7.Text = "创建时间";
this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
//
// txtcreateTime
//
this.txtcreateTime.EditValue = null;
this.txtcreateTime.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtcreateTime.Location = new System.Drawing.Point(63, 156);
this.txtcreateTime.Name = "txtcreateTime";
this.txtcreateTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtcreateTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txtcreateTime.Properties.DisplayFormat.FormatString = "G";
this.txtcreateTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txtcreateTime.Size = new System.Drawing.Size(1215, 20);
this.txtcreateTime.StyleController = this.layoutControl1;
this.txtcreateTime.TabIndex = 7;
//
// layoutControlItem8
//
this.layoutControlItem8.Control = this.txteditorId;
this.layoutControlItem8.CustomizationFormText = "编辑人";
this.layoutControlItem8.Location = new System.Drawing.Point(0, 168);
this.layoutControlItem8.Name = "layoutControlItem8";
this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem8.Text = "编辑人";
this.layoutControlItem8.TextSize = new System.Drawing.Size(48, 14);
//
// txteditorId
//
this.txteditorId.EditValue = "";
this.txteditorId.Location = new System.Drawing.Point(63, 180);
this.txteditorId.Name = "txteditorId";
this.txteditorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txteditorId.Properties.DisplayMember = "Name";
this.txteditorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txteditorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txteditorId.Properties.ValueMember = "ID";
this.txteditorId.Size = new System.Drawing.Size(1215, 20);
this.txteditorId.StyleController = this.layoutControl1;
this.txteditorId.TabIndex = 8;
//
// layoutControlItem9
//
this.layoutControlItem9.Control = this.txteditTime;
this.layoutControlItem9.CustomizationFormText = "编辑时间";
this.layoutControlItem9.Location = new System.Drawing.Point(0, 192);
this.layoutControlItem9.Name = "layoutControlItem9";
this.layoutControlItem9.Size = new System.Drawing.Size(1270, 521);
this.layoutControlItem9.Text = "编辑时间";
this.layoutControlItem9.TextSize = new System.Drawing.Size(48, 14);
//
// txteditTime
//
this.txteditTime.EditValue = null;
this.txteditTime.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txteditTime.Location = new System.Drawing.Point(63, 204);
this.txteditTime.Name = "txteditTime";
this.txteditTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txteditTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txteditTime.Properties.DisplayFormat.FormatString = "G";
this.txteditTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txteditTime.Size = new System.Drawing.Size(1215, 20);
this.txteditTime.StyleController = this.layoutControl1;
this.txteditTime.TabIndex = 9;
//
// FrmsysDept
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1300, 800);
this.Controls.Add(this.xtraTabControl1);
this.Name = "FrmsysDept";
this.Text = "FrmsysDept";
this.Load += new System.EventHandler(this.FrmsysDept_Load);
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxteditorId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
this.xtraTabControl1.ResumeLayout(false);
this.tabDataList.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit();
this.tabDataDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtpid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtpidTreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtname.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtaddress.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtphone.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txteditorId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private XtraTabControl xtraTabControl1;
private XtraTabPage tabDataList;
private XtraTabPage tabDataDetail;
private DevExpress.XtraGrid.GridControl grdList;
private DevExpress.XtraGrid.Views.Grid.GridView grdListView;
private PanelControl panelControl2;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn6;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn7;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn8;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn9;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtid;
private DevExpress.XtraTreeList.TreeList txtpidTreeList;
private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtpid;
private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtpidTreeList;
private DevExpress.XtraEditors.TreeListLookUpEdit txtpid;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtname;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtaddress;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtphone;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId;
private DevExpress.XtraEditors.LookUpEdit txtcreatorId;
///////////////////////////////
private DevExpress.XtraEditors.DateEdit txtcreateTime;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxteditorId;
private DevExpress.XtraEditors.LookUpEdit txteditorId;
///////////////////////////////
private DevExpress.XtraEditors.DateEdit txteditTime;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
}
}

View File

@ -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>

View File

@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;
using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
namespace MES.Form
{
public partial class FrmsysFunction : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public FrmsysFunction()
{
InitializeComponent();
}
private void FrmsysFunction_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysFunctionInfo());
InitSearchDicData();
}
/// <summary>
/// 数据源初始化
/// </summary>
/// <returns></returns>
private void Init()
{
txtpid.Properties.DataSource = GetDataTableUtils.SqlTable("角色功能");
repositoryItemTreeListtxtpid.DataSource= GetDataTableUtils.SqlTable("角色功能");
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("ID","id");
fieldDictionary.Add("父ID","pid");
fieldDictionary.Add("名称","name");
fieldDictionary.Add("权限编码","functionCode");
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
try
{
sysFunctionInfo info= (sysFunctionInfo)this.ControlDataToModel(new sysFunctionInfo());
using (var db = new MESDB())
{
db.sysFunctionInfo.AddOrUpdate(info);
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
public override void InitgrdListDataSource()
{
using (var con=new MESDB())///
{
grdList.DataSource=con.sysFunctionInfo.ToList();
}
Init();
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
//if(string.IsNullOrEmpty(txtpid.EditValue.ToString()))
//{
// "父ID不能为空".ShowWarning();
// txtpid.Focus();
// return false;
//}
if(string.IsNullOrEmpty(txtname.EditValue.ToString()))
{
"名称不能为空".ShowWarning();
txtname.Focus();
return false;
}
if(string.IsNullOrEmpty(txtfunctionCode.EditValue.ToString()))
{
"权限编码不能为空".ShowWarning();
txtfunctionCode.Focus();
return false;
}
return true;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
sysFunctionInfo info = (sysFunctionInfo)this.ControlDataToModel(new sysFunctionInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
{
if (string.IsNullOrEmpty(sql))
{
grdList.DataSource = db.sysFunctionInfo.SqlQuery("select * from sysFunction").ToList();
}
else
{
grdList.DataSource = db.sysFunctionInfo.SqlQuery($"select * from sysFunction where {sql}").ToList();
}
}
}
}
}
}

View File

@ -0,0 +1,414 @@
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using DevExpress.XtraTab;
namespace MES.Form
{
partial class FrmsysFunction
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.tabDataList = new DevExpress.XtraTab.XtraTabPage();
this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage();
this.grdList = new DevExpress.XtraGrid.GridControl();
this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
//////////////////////
this.txtid=new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtpidTreeList = new DevExpress.XtraTreeList.TreeList();
this.repositoryItemTreeListtxtpid = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit();
this.repositoryItemTreeListtxtpidTreeList = new DevExpress.XtraTreeList.TreeList();
this.txtpid=new DevExpress.XtraEditors.TreeListLookUpEdit();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
//////////////////////
this.txtname=new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
//////////////////////
this.txtfunctionCode=new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
/////////////////////////
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtpidTreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtpid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
/////////////////////////
((System.ComponentModel.ISupportInitialize)(this.txtname.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
/////////////////////////
((System.ComponentModel.ISupportInitialize)(this.txtfunctionCode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.tabDataList.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit();
this.tabDataDetail.SuspendLayout();
this.SuspendLayout();
// layoutControl1
//
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(12, 8);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.layoutControlGroup1;
layoutControl1.AutoScroll=true;
this.layoutControl1.Size = new System.Drawing.Size(605, 363);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
this.layoutControl1.Controls.Add(this.txtid);
this.layoutControl1.Controls.Add(this.txtpid);
this.layoutControl1.Controls.Add(this.txtname);
this.layoutControl1.Controls.Add(this.txtfunctionCode);
//TextEdit
//DateEdit
//SimpleButton
//CheckEdit
//MemoEdit
//PictureEdit
//LookUpEdit
//ComboBoxEdit
//
// txt${ColumnInfo.Name.Alias.ToCapit()}
//
this.txtid.Location = new System.Drawing.Point(112, 12);
this.txtid.Name = "txtid";
this.txtid.Size = new System.Drawing.Size(481, 20);
this.txtid.StyleController = this.layoutControl1;
this.txtid.TabIndex = 1;
//
// layoutControlItem1
//
this.layoutControlItem1.Control = this.txtid;
this.layoutControlItem1.CustomizationFormText = "ID";
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(585, 24);
this.layoutControlItem1.Text = "ID";
this.layoutControlItem1.TextSize = new System.Drawing.Size(96, 14);
//
// treeListLookUpEdit1
//
this.txtpid.EditValue = "";
this.txtpid.Location = new System.Drawing.Point(120, 84);
this.txtpid.Name = "txtpid";
this.txtpid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtpid.Properties.DisplayMember = "Name";
this.txtpid.Properties.TreeList = this.txtpidTreeList;
this.txtpid.Properties.ValueMember = "ID";
this.txtpid.Size = new System.Drawing.Size(932, 20);
this.txtpid.StyleController = this.layoutControl1;
this.txtpid.TabIndex = 2;
//
// treeListLookUpEdit1TreeList
//
this.txtpidTreeList.Location = new System.Drawing.Point(0, 0);
this.txtpidTreeList.Name = "txtpidTreeList";
this.txtpidTreeList.OptionsView.ShowIndentAsRowStyle = true;
this.txtpidTreeList.ParentFieldName = "PID";
this.txtpidTreeList.Size = new System.Drawing.Size(400, 200);
this.txtpidTreeList.TabIndex = 0;
//
// layoutControlItem2
//
this.layoutControlItem2.Control = this.txtpid;
this.layoutControlItem2.CustomizationFormText = "父ID";
this.layoutControlItem2.Location = new System.Drawing.Point(0, 24);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(585, 24);
this.layoutControlItem2.Text = "父ID";
this.layoutControlItem2.TextSize = new System.Drawing.Size(96, 14);
//
// txt${ColumnInfo.Name.Alias.ToCapit()}
//
this.txtname.Location = new System.Drawing.Point(112, 60);
this.txtname.Name = "txtname";
this.txtname.Size = new System.Drawing.Size(481, 20);
this.txtname.StyleController = this.layoutControl1;
this.txtname.TabIndex = 3;
//
// layoutControlItem3
//
this.layoutControlItem3.Control = this.txtname;
this.layoutControlItem3.CustomizationFormText = "名称";
this.layoutControlItem3.Location = new System.Drawing.Point(0, 48);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.Size = new System.Drawing.Size(585, 24);
this.layoutControlItem3.Text = "名称";
this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14);
//
// txt${ColumnInfo.Name.Alias.ToCapit()}
//
this.txtfunctionCode.Location = new System.Drawing.Point(112, 84);
this.txtfunctionCode.Name = "txtfunctionCode";
this.txtfunctionCode.Size = new System.Drawing.Size(481, 20);
this.txtfunctionCode.StyleController = this.layoutControl1;
this.txtfunctionCode.TabIndex = 4;
//
// layoutControlItem4
//
this.layoutControlItem4.Control = this.txtfunctionCode;
this.layoutControlItem4.CustomizationFormText = "权限编码";
this.layoutControlItem4.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.Size = new System.Drawing.Size(585, 24);
this.layoutControlItem4.Text = "权限编码";
this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14);
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1
,this.layoutControlItem2
,this.layoutControlItem3
,this.layoutControlItem4
});
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlGroup1.Size = new System.Drawing.Size(605, 363);
this.layoutControlGroup1.Text = "layoutControlGroup1";
this.layoutControlGroup1.TextVisible = false;
//
// xtraTabControl1
//
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
this.xtraTabControl1.Size = new System.Drawing.Size(585, 436);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabDataList,
this.tabDataDetail});
//
// tabDataList
//
this.tabDataList.Controls.Add(this.grdList);
this.tabDataList.Name = "tabDataList";
this.tabDataList.Size = new System.Drawing.Size(579, 407);
this.tabDataList.Text = "数据列表";
//
// tabDataDetail
//
this.tabDataDetail.Controls.Add(this.panelControl2);
this.tabDataDetail.Name = "tabDataDetail";
this.tabDataDetail.Size = new System.Drawing.Size(579, 407);
this.tabDataDetail.Text = "数据编辑";
//
// grdList
//
this.grdList.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdList.Location = new System.Drawing.Point(0, 0);
this.grdList.MainView = this.grdListView;
this.grdList.Name = "grdList";
this.grdList.Size = new System.Drawing.Size(579, 407);
this.grdList.TabIndex = 0;
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.grdListView});
//
// grdListView
//
this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gridColumn1,
this.gridColumn2,
this.gridColumn3,
this.gridColumn4,
});
this.grdListView.OptionsBehavior.Editable = false;
this.grdListView.GridControl = this.grdList;
this.grdListView.Name = "grdListView";
this.grdListView.OptionsView.ColumnAutoWidth=false;
this.grdListView.BestFitColumns();
//
// panelControl2
//
this.panelControl2.Controls.Add(this.layoutControl1);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(579, 407);
this.panelControl2.TabIndex = 0;
////////////////////////////////
(this.gridColumn1).Caption = "ID";
(this.gridColumn1).Name = "gridColumn1";
(this.gridColumn1).FieldName = "id";
(this.gridColumn1).Visible = true;
(this.gridColumn1).VisibleIndex = 1;
// repositoryItemTreeListLookUpEdit1
//
(this.gridColumn2).ColumnEdit = this.repositoryItemTreeListtxtpid;
this.repositoryItemTreeListtxtpid.AutoHeight = false;
this.repositoryItemTreeListtxtpid.DisplayMember = "Name";
this.repositoryItemTreeListtxtpid.ValueMember = "ID";
this.repositoryItemTreeListtxtpid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemTreeListtxtpid.Name = "repositoryItemTreeListtxtpid";
this.repositoryItemTreeListtxtpid.TreeList = this.repositoryItemTreeListtxtpidTreeList;
//
// repositoryItemTreeListLookUpEdit1TreeList
//
this.repositoryItemTreeListtxtpidTreeList.Location = new System.Drawing.Point(0, 0);
this.repositoryItemTreeListtxtpidTreeList.ParentFieldName = "PID";
this.repositoryItemTreeListtxtpidTreeList.Name = "repositoryItemTreeListtxtpidTreeList";
this.repositoryItemTreeListtxtpidTreeList.OptionsView.ShowIndentAsRowStyle = true;
this.repositoryItemTreeListtxtpidTreeList.Size = new System.Drawing.Size(400, 200);
this.repositoryItemTreeListtxtpidTreeList.TabIndex = 0;
(this.gridColumn2).Caption = "父ID";
(this.gridColumn2).Name = "gridColumn2";
(this.gridColumn2).FieldName = "pid";
(this.gridColumn2).Visible = true;
(this.gridColumn2).VisibleIndex = 2;
////////////////////////////////
(this.gridColumn3).Caption = "名称";
(this.gridColumn3).Name = "gridColumn3";
(this.gridColumn3).FieldName = "name";
(this.gridColumn3).Visible = true;
(this.gridColumn3).VisibleIndex = 3;
////////////////////////////////
(this.gridColumn4).Caption = "权限编码";
(this.gridColumn4).Name = "gridColumn4";
(this.gridColumn4).FieldName = "functionCode";
(this.gridColumn4).Visible = true;
(this.gridColumn4).VisibleIndex = 4;
//
// XtraForm1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1300, 800);
this.Controls.Add(this.xtraTabControl1);
this.Name = "FrmsysFunction";
this.Text = "FrmsysFunction";
this.Load += new System.EventHandler(this.FrmsysFunction_Load);
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
/////////////////////////
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtpidTreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtpid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
/////////////////////////
((System.ComponentModel.ISupportInitialize)(this.txtname.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
/////////////////////////
((System.ComponentModel.ISupportInitialize)(this.txtfunctionCode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
this.xtraTabControl1.ResumeLayout(false);
this.tabDataList.ResumeLayout(false);
this.tabDataDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private XtraTabControl xtraTabControl1;
private XtraTabPage tabDataList;
private XtraTabPage tabDataDetail;
private DevExpress.XtraGrid.GridControl grdList;
private DevExpress.XtraGrid.Views.Grid.GridView grdListView;
private PanelControl panelControl2;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtid;
private DevExpress.XtraTreeList.TreeList txtpidTreeList;
private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtpid;
private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtpidTreeList;
private DevExpress.XtraEditors.TreeListLookUpEdit txtpid;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtname;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtfunctionCode;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
}
}

View File

@ -0,0 +1,222 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;
using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
using DevExpress.XtraTreeList.Nodes;
namespace MES.Form
{
public partial class FrmsysRole : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public FrmsysRole()
{
InitializeComponent();
}
private void FrmsysRole_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysRoleInfo());
InitSearchDicData();
}
/// <summary>
/// 数据源初始化
/// </summary>
/// <returns></returns>
private void Init()
{
txtcompanyId.Properties.DataSource = GetDataTableUtils.SqlTable("部门");
repositoryItemTreeListtxtcompanyId.DataSource= GetDataTableUtils.SqlTable("部门");
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxteditorId.DataSource= GetDataTableUtils.SqlTable("用户");
treeList1.DataSource = GetDataTableUtils.SqlTable("角色功能");
treeList1.OptionsSelection.MultiSelect = true;
treeList1.OptionsSelection.UseIndicatorForSelection = false;
treeList1.OptionsView.ShowCheckBoxes = true;
treeList1.ExpandAll();
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("ID","id");
fieldDictionary.Add("公司id","companyId");
fieldDictionary.Add("公司名称","companyName");
fieldDictionary.Add("角色名称","name");
fieldDictionary.Add("创建人","creatorId");
fieldDictionary.Add("创建时间","createTime");
fieldDictionary.Add("编辑人","editorId");
fieldDictionary.Add("编辑时间","editTime");
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
try
{
sysRoleInfo info= (sysRoleInfo)this.ControlDataToModel(new sysRoleInfo());
using (var db = new MESDB())
{
db.sysRoleInfo.AddOrUpdate(info);
db.SaveChanges();
}
if (treeList1.Nodes.Count > 0)
{
foreach (TreeListNode node in treeList1.Nodes)//拿所有结点
{
GetCheckedID(node);
}
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
public override void InitgrdListDataSource()
{
using (var con=new MESDB())
{
grdList.DataSource=con.sysRoleInfo.ToList();
}
Init();
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
if(string.IsNullOrEmpty(txtcompanyId.EditValue.ToString()))
{
"公司id不能为空".ShowWarning();
txtcompanyId.Focus();
return false;
}
////if(string.IsNullOrEmpty(txtcompanyName.EditValue.ToString()))
////{
//// "公司名称不能为空".ShowWarning();
//// txtcompanyName.Focus();
//// return false;
////}
if(string.IsNullOrEmpty(txtname.EditValue.ToString()))
{
"角色名称不能为空".ShowWarning();
txtname.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString()))
{
"创建人不能为空".ShowWarning();
txtcreatorId.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreateTime.EditValue.ToString()))
{
"创建时间不能为空".ShowWarning();
txtcreateTime.Focus();
return false;
}
if(string.IsNullOrEmpty(txteditorId.EditValue.ToString()))
{
"编辑人不能为空".ShowWarning();
txteditorId.Focus();
return false;
}
if(string.IsNullOrEmpty(txteditTime.EditValue.ToString()))
{
"编辑时间不能为空".ShowWarning();
txteditTime.Focus();
return false;
}
return true;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
sysRoleInfo info = (sysRoleInfo)this.ControlDataToModel(new sysRoleInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
{
if (string.IsNullOrEmpty(sql))
{
grdList.DataSource = db.sysRoleInfo.SqlQuery("select * from sysRole").ToList();
}
else
{
grdList.DataSource = db.sysRoleInfo.SqlQuery($"select * from sysRole where {sql}").ToList();
}
}
}
}
private void btnRefrsh_Click(object sender, EventArgs e)
{
treeList1.DataSource = GetDataTableUtils.SqlTable("角色功能");
treeList1.ExpandAll();
}
List<int> ids = new List<int>();//用来存储ID
private void GetCheckedID(TreeListNode parentNode)
{
if (parentNode.Nodes.Count == 0) return;//递归终止
foreach (TreeListNode node in parentNode.Nodes)
{
if (node.CheckState == CheckState.Checked)//判断当前节点选择状态
{
DataRowView drv = treeList1.GetDataRecordByNode(node) as DataRowView;//强转选中状态的行
var str = node.Id;
}
GetCheckedID(node);//执行递归
}
}
}
}

View File

@ -0,0 +1,692 @@
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using DevExpress.XtraTab;
namespace MES.Form
{
partial class FrmsysRole
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemTreeListtxtcompanyId = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit();
this.repositoryItemTreeListtxtcompanyIdTreeList = new DevExpress.XtraTreeList.TreeList();
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemtxteditorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.tabDataList = new DevExpress.XtraTab.XtraTabPage();
this.grdList = new DevExpress.XtraGrid.GridControl();
this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.xtraTabControl2 = new DevExpress.XtraTab.XtraTabControl();
this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.txtid = new DevExpress.XtraEditors.TextEdit();
this.txtcompanyId = new DevExpress.XtraEditors.TreeListLookUpEdit();
this.txtcompanyIdTreeList = new DevExpress.XtraTreeList.TreeList();
this.txtname = new DevExpress.XtraEditors.TextEdit();
this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit();
this.txtcreateTime = new DevExpress.XtraEditors.DateEdit();
this.txteditorId = new DevExpress.XtraEditors.LookUpEdit();
this.txteditTime = new DevExpress.XtraEditors.DateEdit();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
this.panelControl3 = new DevExpress.XtraEditors.PanelControl();
this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
this.btnRefrsh = new DevExpress.XtraEditors.SimpleButton();
this.treeList1 = new DevExpress.XtraTreeList.TreeList();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtcompanyId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtcompanyIdTreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxteditorId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.tabDataList.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit();
this.tabDataDetail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).BeginInit();
this.xtraTabControl2.SuspendLayout();
this.xtraTabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcompanyId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcompanyIdTreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtname.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txteditorId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
this.xtraTabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl3)).BeginInit();
this.panelControl3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl4)).BeginInit();
this.panelControl4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit();
this.SuspendLayout();
//
// gridColumn1
//
this.gridColumn1.Caption = "ID";
this.gridColumn1.FieldName = "id";
this.gridColumn1.Name = "gridColumn1";
this.gridColumn1.Visible = true;
this.gridColumn1.VisibleIndex = 0;
this.gridColumn1.Width = 201;
//
// gridColumn2
//
this.gridColumn2.Caption = "公司id";
this.gridColumn2.ColumnEdit = this.repositoryItemTreeListtxtcompanyId;
this.gridColumn2.FieldName = "companyId";
this.gridColumn2.Name = "gridColumn2";
this.gridColumn2.Visible = true;
this.gridColumn2.VisibleIndex = 1;
this.gridColumn2.Width = 201;
//
// repositoryItemTreeListtxtcompanyId
//
this.repositoryItemTreeListtxtcompanyId.AutoHeight = false;
this.repositoryItemTreeListtxtcompanyId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemTreeListtxtcompanyId.DisplayMember = "Name";
this.repositoryItemTreeListtxtcompanyId.Name = "repositoryItemTreeListtxtcompanyId";
this.repositoryItemTreeListtxtcompanyId.TreeList = this.repositoryItemTreeListtxtcompanyIdTreeList;
this.repositoryItemTreeListtxtcompanyId.ValueMember = "ID";
//
// repositoryItemTreeListtxtcompanyIdTreeList
//
this.repositoryItemTreeListtxtcompanyIdTreeList.Location = new System.Drawing.Point(0, 0);
this.repositoryItemTreeListtxtcompanyIdTreeList.Name = "repositoryItemTreeListtxtcompanyIdTreeList";
this.repositoryItemTreeListtxtcompanyIdTreeList.OptionsView.ShowIndentAsRowStyle = true;
this.repositoryItemTreeListtxtcompanyIdTreeList.ParentFieldName = "PID";
this.repositoryItemTreeListtxtcompanyIdTreeList.Size = new System.Drawing.Size(400, 200);
this.repositoryItemTreeListtxtcompanyIdTreeList.TabIndex = 0;
//
// gridColumn3
//
this.gridColumn3.Caption = "公司名称";
this.gridColumn3.FieldName = "companyName";
this.gridColumn3.Name = "gridColumn3";
this.gridColumn3.Visible = true;
this.gridColumn3.VisibleIndex = 2;
this.gridColumn3.Width = 201;
//
// gridColumn4
//
this.gridColumn4.Caption = "角色名称";
this.gridColumn4.FieldName = "name";
this.gridColumn4.Name = "gridColumn4";
this.gridColumn4.Visible = true;
this.gridColumn4.VisibleIndex = 3;
this.gridColumn4.Width = 201;
//
// gridColumn5
//
this.gridColumn5.Caption = "创建人";
this.gridColumn5.ColumnEdit = this.repositoryItemtxtcreatorId;
this.gridColumn5.FieldName = "creatorId";
this.gridColumn5.Name = "gridColumn5";
this.gridColumn5.Visible = true;
this.gridColumn5.VisibleIndex = 4;
this.gridColumn5.Width = 201;
//
// repositoryItemtxtcreatorId
//
this.repositoryItemtxtcreatorId.AutoHeight = false;
this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemtxtcreatorId.DisplayMember = "Name";
this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId";
this.repositoryItemtxtcreatorId.ValueMember = "ID";
//
// gridColumn6
//
this.gridColumn6.Caption = "创建时间";
this.gridColumn6.DisplayFormat.FormatString = "G";
this.gridColumn6.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gridColumn6.FieldName = "createTime";
this.gridColumn6.Name = "gridColumn6";
this.gridColumn6.Visible = true;
this.gridColumn6.VisibleIndex = 5;
this.gridColumn6.Width = 201;
//
// gridColumn7
//
this.gridColumn7.Caption = "编辑人";
this.gridColumn7.ColumnEdit = this.repositoryItemtxteditorId;
this.gridColumn7.FieldName = "editorId";
this.gridColumn7.Name = "gridColumn7";
this.gridColumn7.Visible = true;
this.gridColumn7.VisibleIndex = 6;
this.gridColumn7.Width = 201;
//
// repositoryItemtxteditorId
//
this.repositoryItemtxteditorId.AutoHeight = false;
this.repositoryItemtxteditorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemtxteditorId.DisplayMember = "Name";
this.repositoryItemtxteditorId.Name = "repositoryItemtxteditorId";
this.repositoryItemtxteditorId.ValueMember = "ID";
//
// gridColumn8
//
this.gridColumn8.Caption = "编辑时间";
this.gridColumn8.DisplayFormat.FormatString = "G";
this.gridColumn8.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gridColumn8.FieldName = "editTime";
this.gridColumn8.Name = "gridColumn8";
this.gridColumn8.Visible = true;
this.gridColumn8.VisibleIndex = 7;
this.gridColumn8.Width = 201;
//
// xtraTabControl1
//
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
this.xtraTabControl1.Size = new System.Drawing.Size(905, 433);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabDataList,
this.tabDataDetail});
//
// tabDataList
//
this.tabDataList.Controls.Add(this.grdList);
this.tabDataList.Name = "tabDataList";
this.tabDataList.Size = new System.Drawing.Size(899, 404);
this.tabDataList.Text = "数据列表";
//
// grdList
//
this.grdList.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdList.Location = new System.Drawing.Point(0, 0);
this.grdList.MainView = this.grdListView;
this.grdList.Name = "grdList";
this.grdList.Size = new System.Drawing.Size(899, 404);
this.grdList.TabIndex = 0;
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.grdListView});
//
// grdListView
//
this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gridColumn1,
this.gridColumn2,
this.gridColumn3,
this.gridColumn4,
this.gridColumn5,
this.gridColumn6,
this.gridColumn7,
this.gridColumn8});
this.grdListView.GridControl = this.grdList;
this.grdListView.Name = "grdListView";
this.grdListView.OptionsBehavior.Editable = false;
this.grdListView.OptionsView.ColumnAutoWidth = false;
//
// tabDataDetail
//
this.tabDataDetail.Controls.Add(this.panelControl2);
this.tabDataDetail.Name = "tabDataDetail";
this.tabDataDetail.Size = new System.Drawing.Size(899, 404);
this.tabDataDetail.Text = "数据编辑";
//
// panelControl2
//
this.panelControl2.Controls.Add(this.xtraTabControl2);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(899, 404);
this.panelControl2.TabIndex = 0;
//
// xtraTabControl2
//
this.xtraTabControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraTabControl2.Location = new System.Drawing.Point(2, 2);
this.xtraTabControl2.Name = "xtraTabControl2";
this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1;
this.xtraTabControl2.Size = new System.Drawing.Size(895, 400);
this.xtraTabControl2.TabIndex = 7;
this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.xtraTabPage1,
this.xtraTabPage2});
//
// xtraTabPage1
//
this.xtraTabPage1.Controls.Add(this.layoutControl1);
this.xtraTabPage1.Name = "xtraTabPage1";
this.xtraTabPage1.Size = new System.Drawing.Size(889, 371);
this.xtraTabPage1.Text = "角色基础信息";
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.txtid);
this.layoutControl1.Controls.Add(this.txtcompanyId);
this.layoutControl1.Controls.Add(this.txtname);
this.layoutControl1.Controls.Add(this.txtcreatorId);
this.layoutControl1.Controls.Add(this.txtcreateTime);
this.layoutControl1.Controls.Add(this.txteditorId);
this.layoutControl1.Controls.Add(this.txteditTime);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(889, 371);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
//
// txtid
//
this.txtid.Location = new System.Drawing.Point(63, 12);
this.txtid.Name = "txtid";
this.txtid.Size = new System.Drawing.Size(379, 20);
this.txtid.StyleController = this.layoutControl1;
this.txtid.TabIndex = 1;
//
// txtcompanyId
//
this.txtcompanyId.EditValue = "";
this.txtcompanyId.Location = new System.Drawing.Point(497, 12);
this.txtcompanyId.Name = "txtcompanyId";
this.txtcompanyId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtcompanyId.Properties.DisplayMember = "Name";
this.txtcompanyId.Properties.TreeList = this.txtcompanyIdTreeList;
this.txtcompanyId.Properties.ValueMember = "ID";
this.txtcompanyId.Size = new System.Drawing.Size(380, 20);
this.txtcompanyId.StyleController = this.layoutControl1;
this.txtcompanyId.TabIndex = 2;
//
// txtcompanyIdTreeList
//
this.txtcompanyIdTreeList.Location = new System.Drawing.Point(0, 0);
this.txtcompanyIdTreeList.Name = "txtcompanyIdTreeList";
this.txtcompanyIdTreeList.OptionsView.ShowIndentAsRowStyle = true;
this.txtcompanyIdTreeList.ParentFieldName = "PID";
this.txtcompanyIdTreeList.Size = new System.Drawing.Size(400, 200);
this.txtcompanyIdTreeList.TabIndex = 0;
//
// txtname
//
this.txtname.Location = new System.Drawing.Point(63, 36);
this.txtname.Name = "txtname";
this.txtname.Size = new System.Drawing.Size(814, 20);
this.txtname.StyleController = this.layoutControl1;
this.txtname.TabIndex = 4;
//
// txtcreatorId
//
this.txtcreatorId.EditValue = "";
this.txtcreatorId.Location = new System.Drawing.Point(63, 60);
this.txtcreatorId.Name = "txtcreatorId";
this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtcreatorId.Properties.DisplayMember = "Name";
this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtcreatorId.Properties.ValueMember = "ID";
this.txtcreatorId.Size = new System.Drawing.Size(379, 20);
this.txtcreatorId.StyleController = this.layoutControl1;
this.txtcreatorId.TabIndex = 5;
//
// txtcreateTime
//
this.txtcreateTime.EditValue = null;
this.txtcreateTime.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtcreateTime.Location = new System.Drawing.Point(497, 60);
this.txtcreateTime.Name = "txtcreateTime";
this.txtcreateTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtcreateTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txtcreateTime.Properties.DisplayFormat.FormatString = "G";
this.txtcreateTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txtcreateTime.Size = new System.Drawing.Size(380, 20);
this.txtcreateTime.StyleController = this.layoutControl1;
this.txtcreateTime.TabIndex = 6;
//
// txteditorId
//
this.txteditorId.EditValue = "";
this.txteditorId.Location = new System.Drawing.Point(63, 84);
this.txteditorId.Name = "txteditorId";
this.txteditorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txteditorId.Properties.DisplayMember = "Name";
this.txteditorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txteditorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txteditorId.Properties.ValueMember = "ID";
this.txteditorId.Size = new System.Drawing.Size(379, 20);
this.txteditorId.StyleController = this.layoutControl1;
this.txteditorId.TabIndex = 7;
//
// txteditTime
//
this.txteditTime.EditValue = null;
this.txteditTime.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txteditTime.Location = new System.Drawing.Point(497, 84);
this.txteditTime.Name = "txteditTime";
this.txteditTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txteditTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txteditTime.Properties.DisplayFormat.FormatString = "G";
this.txteditTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txteditTime.Size = new System.Drawing.Size(380, 20);
this.txteditTime.StyleController = this.layoutControl1;
this.txteditTime.TabIndex = 8;
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1,
this.layoutControlItem4,
this.layoutControlItem5,
this.layoutControlItem7,
this.layoutControlItem2,
this.layoutControlItem6,
this.emptySpaceItem1,
this.layoutControlItem8});
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlGroup1.Size = new System.Drawing.Size(889, 371);
this.layoutControlGroup1.TextVisible = false;
//
// layoutControlItem1
//
this.layoutControlItem1.Control = this.txtid;
this.layoutControlItem1.CustomizationFormText = "ID";
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(434, 24);
this.layoutControlItem1.Text = "ID";
this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem4
//
this.layoutControlItem4.Control = this.txtname;
this.layoutControlItem4.CustomizationFormText = "角色名称";
this.layoutControlItem4.Location = new System.Drawing.Point(0, 24);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.Size = new System.Drawing.Size(869, 24);
this.layoutControlItem4.Text = "角色名称";
this.layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem5
//
this.layoutControlItem5.Control = this.txtcreatorId;
this.layoutControlItem5.CustomizationFormText = "创建人";
this.layoutControlItem5.Location = new System.Drawing.Point(0, 48);
this.layoutControlItem5.Name = "layoutControlItem5";
this.layoutControlItem5.Size = new System.Drawing.Size(434, 24);
this.layoutControlItem5.Text = "创建人";
this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem7
//
this.layoutControlItem7.Control = this.txteditorId;
this.layoutControlItem7.CustomizationFormText = "编辑人";
this.layoutControlItem7.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem7.Name = "layoutControlItem7";
this.layoutControlItem7.Size = new System.Drawing.Size(434, 24);
this.layoutControlItem7.Text = "编辑人";
this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem2
//
this.layoutControlItem2.Control = this.txtcompanyId;
this.layoutControlItem2.CustomizationFormText = "公司";
this.layoutControlItem2.Location = new System.Drawing.Point(434, 0);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(435, 24);
this.layoutControlItem2.Text = "公司";
this.layoutControlItem2.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem6
//
this.layoutControlItem6.Control = this.txtcreateTime;
this.layoutControlItem6.CustomizationFormText = "创建时间";
this.layoutControlItem6.Location = new System.Drawing.Point(434, 48);
this.layoutControlItem6.Name = "layoutControlItem6";
this.layoutControlItem6.Size = new System.Drawing.Size(435, 24);
this.layoutControlItem6.Text = "创建时间";
this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14);
//
// emptySpaceItem1
//
this.emptySpaceItem1.AllowHotTrack = false;
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 96);
this.emptySpaceItem1.Name = "emptySpaceItem1";
this.emptySpaceItem1.Size = new System.Drawing.Size(869, 255);
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
//
// layoutControlItem8
//
this.layoutControlItem8.Control = this.txteditTime;
this.layoutControlItem8.CustomizationFormText = "编辑时间";
this.layoutControlItem8.Location = new System.Drawing.Point(434, 72);
this.layoutControlItem8.Name = "layoutControlItem8";
this.layoutControlItem8.Size = new System.Drawing.Size(435, 24);
this.layoutControlItem8.Text = "编辑时间";
this.layoutControlItem8.TextSize = new System.Drawing.Size(48, 14);
//
// xtraTabPage2
//
this.xtraTabPage2.Controls.Add(this.panelControl3);
this.xtraTabPage2.Name = "xtraTabPage2";
this.xtraTabPage2.Size = new System.Drawing.Size(889, 371);
this.xtraTabPage2.Text = "可操作功能";
//
// panelControl3
//
this.panelControl3.Controls.Add(this.panelControl4);
this.panelControl3.Controls.Add(this.treeList1);
this.panelControl3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl3.Location = new System.Drawing.Point(0, 0);
this.panelControl3.Name = "panelControl3";
this.panelControl3.Size = new System.Drawing.Size(889, 371);
this.panelControl3.TabIndex = 0;
//
// panelControl4
//
this.panelControl4.Controls.Add(this.btnRefrsh);
this.panelControl4.Dock = System.Windows.Forms.DockStyle.Top;
this.panelControl4.Location = new System.Drawing.Point(2, 2);
this.panelControl4.Name = "panelControl4";
this.panelControl4.Size = new System.Drawing.Size(885, 36);
this.panelControl4.TabIndex = 1;
//
// btnRefrsh
//
this.btnRefrsh.Location = new System.Drawing.Point(6, 8);
this.btnRefrsh.Name = "btnRefrsh";
this.btnRefrsh.Size = new System.Drawing.Size(75, 23);
this.btnRefrsh.TabIndex = 0;
this.btnRefrsh.Text = "刷新列表";
this.btnRefrsh.Click += new System.EventHandler(this.btnRefrsh_Click);
//
// treeList1
//
this.treeList1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.treeList1.Location = new System.Drawing.Point(2, 39);
this.treeList1.Name = "treeList1";
this.treeList1.OptionsBehavior.AllowRecursiveNodeChecking = true;
this.treeList1.ParentFieldName = "PID";
this.treeList1.Size = new System.Drawing.Size(887, 332);
this.treeList1.TabIndex = 0;
//
// FrmsysRole
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(905, 467);
this.Controls.Add(this.xtraTabControl1);
this.Name = "FrmsysRole";
this.Text = "FrmsysRole";
this.Load += new System.EventHandler(this.FrmsysRole_Load);
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtcompanyId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtcompanyIdTreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxteditorId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
this.xtraTabControl1.ResumeLayout(false);
this.tabDataList.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit();
this.tabDataDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).EndInit();
this.xtraTabControl2.ResumeLayout(false);
this.xtraTabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcompanyId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcompanyIdTreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtname.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txteditorId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txteditTime.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
this.xtraTabPage2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl3)).EndInit();
this.panelControl3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl4)).EndInit();
this.panelControl4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.treeList1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private XtraTabControl xtraTabControl1;
private XtraTabPage tabDataList;
private XtraTabPage tabDataDetail;
private DevExpress.XtraGrid.GridControl grdList;
private DevExpress.XtraGrid.Views.Grid.GridView grdListView;
private PanelControl panelControl2;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn6;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn7;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn8;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtid;
private DevExpress.XtraTreeList.TreeList txtcompanyIdTreeList;
private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtcompanyId;
private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtcompanyIdTreeList;
private DevExpress.XtraEditors.TreeListLookUpEdit txtcompanyId;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtname;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId;
private DevExpress.XtraEditors.LookUpEdit txtcreatorId;
///////////////////////////////
private DevExpress.XtraEditors.DateEdit txtcreateTime;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxteditorId;
private DevExpress.XtraEditors.LookUpEdit txteditorId;
///////////////////////////////
private DevExpress.XtraEditors.DateEdit txteditTime;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
private EmptySpaceItem emptySpaceItem1;
private XtraTabControl xtraTabControl2;
private XtraTabPage xtraTabPage1;
private LayoutControlItem layoutControlItem2;
private XtraTabPage xtraTabPage2;
private PanelControl panelControl3;
private DevExpress.XtraTreeList.TreeList treeList1;
private PanelControl panelControl4;
private SimpleButton btnRefrsh;
}
}

View File

@ -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>

View File

@ -55,13 +55,14 @@ namespace MES.Form
this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.txtdeptId = new DevExpress.XtraEditors.TreeListLookUpEdit();
this.treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList();
this.txtid = new DevExpress.XtraEditors.TextEdit();
this.txtaccount = new DevExpress.XtraEditors.TextEdit();
this.txtusername = new DevExpress.XtraEditors.TextEdit();
this.txtpassword = new DevExpress.XtraEditors.TextEdit();
this.txtemail = new DevExpress.XtraEditors.TextEdit();
this.txtmobilephone = new DevExpress.XtraEditors.TextEdit();
this.txtdeptId = new DevExpress.XtraEditors.LookUpEdit();
this.txtisEnabled = new DevExpress.XtraEditors.CheckEdit();
this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit();
this.txtcreateTime = new DevExpress.XtraEditors.DateEdit();
@ -71,7 +72,6 @@ namespace MES.Form
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
@ -81,6 +81,7 @@ namespace MES.Form
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtdeptId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxteditorId)).BeginInit();
@ -94,13 +95,14 @@ namespace MES.Form
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtdeptId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtaccount.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtusername.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtpassword.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtemail.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtmobilephone.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtdeptId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtisEnabled.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).BeginInit();
@ -112,7 +114,6 @@ namespace MES.Form
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
@ -122,6 +123,7 @@ namespace MES.Form
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
this.SuspendLayout();
//
// gridColumn1
@ -331,13 +333,13 @@ namespace MES.Form
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.txtdeptId);
this.layoutControl1.Controls.Add(this.txtid);
this.layoutControl1.Controls.Add(this.txtaccount);
this.layoutControl1.Controls.Add(this.txtusername);
this.layoutControl1.Controls.Add(this.txtpassword);
this.layoutControl1.Controls.Add(this.txtemail);
this.layoutControl1.Controls.Add(this.txtmobilephone);
this.layoutControl1.Controls.Add(this.txtdeptId);
this.layoutControl1.Controls.Add(this.txtisEnabled);
this.layoutControl1.Controls.Add(this.txtcreatorId);
this.layoutControl1.Controls.Add(this.txtcreateTime);
@ -346,11 +348,35 @@ namespace MES.Form
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(2, 2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(636, 233, 650, 400);
this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(577, 433);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
//
// txtdeptId
//
this.txtdeptId.EditValue = "";
this.txtdeptId.Location = new System.Drawing.Point(63, 84);
this.txtdeptId.Name = "txtdeptId";
this.txtdeptId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtdeptId.Properties.DisplayMember = "Name";
this.txtdeptId.Properties.TreeList = this.treeListLookUpEdit1TreeList;
this.txtdeptId.Properties.ValueMember = "ID";
this.txtdeptId.Size = new System.Drawing.Size(502, 20);
this.txtdeptId.StyleController = this.layoutControl1;
this.txtdeptId.TabIndex = 13;
//
// treeListLookUpEdit1TreeList
//
this.treeListLookUpEdit1TreeList.Location = new System.Drawing.Point(0, 0);
this.treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList";
this.treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true;
this.treeListLookUpEdit1TreeList.ParentFieldName = "PID";
this.treeListLookUpEdit1TreeList.Size = new System.Drawing.Size(400, 200);
this.treeListLookUpEdit1TreeList.TabIndex = 0;
//
// txtid
//
this.txtid.Location = new System.Drawing.Point(63, 12);
@ -400,21 +426,6 @@ namespace MES.Form
this.txtmobilephone.StyleController = this.layoutControl1;
this.txtmobilephone.TabIndex = 6;
//
// txtdeptId
//
this.txtdeptId.EditValue = "";
this.txtdeptId.Location = new System.Drawing.Point(63, 84);
this.txtdeptId.Name = "txtdeptId";
this.txtdeptId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtdeptId.Properties.DisplayMember = "Name";
this.txtdeptId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtdeptId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtdeptId.Properties.ValueMember = "ID";
this.txtdeptId.Size = new System.Drawing.Size(502, 20);
this.txtdeptId.StyleController = this.layoutControl1;
this.txtdeptId.TabIndex = 7;
//
// txtisEnabled
//
this.txtisEnabled.EditValue = null;
@ -497,7 +508,6 @@ namespace MES.Form
this.layoutControlItem1,
this.layoutControlItem3,
this.layoutControlItem5,
this.layoutControlItem7,
this.layoutControlItem8,
this.layoutControlItem9,
this.layoutControlItem11,
@ -506,8 +516,9 @@ namespace MES.Form
this.layoutControlItem6,
this.layoutControlItem10,
this.emptySpaceItem1,
this.layoutControlItem12});
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlItem12,
this.layoutControlItem13});
this.layoutControlGroup1.Name = "Root";
this.layoutControlGroup1.Size = new System.Drawing.Size(577, 433);
this.layoutControlGroup1.TextVisible = false;
//
@ -541,16 +552,6 @@ namespace MES.Form
this.layoutControlItem5.Text = "邮件";
this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem7
//
this.layoutControlItem7.Control = this.txtdeptId;
this.layoutControlItem7.CustomizationFormText = "部门";
this.layoutControlItem7.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem7.Name = "layoutControlItem7";
this.layoutControlItem7.Size = new System.Drawing.Size(557, 24);
this.layoutControlItem7.Text = "部门";
this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem8
//
this.layoutControlItem8.Control = this.txtisEnabled;
@ -640,6 +641,15 @@ namespace MES.Form
this.layoutControlItem12.Text = "编辑时间";
this.layoutControlItem12.TextSize = new System.Drawing.Size(48, 14);
//
// layoutControlItem13
//
this.layoutControlItem13.Control = this.txtdeptId;
this.layoutControlItem13.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem13.Name = "layoutControlItem13";
this.layoutControlItem13.Size = new System.Drawing.Size(557, 24);
this.layoutControlItem13.Text = "部门";
this.layoutControlItem13.TextSize = new System.Drawing.Size(48, 14);
//
// FrmsysUser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@ -663,13 +673,14 @@ namespace MES.Form
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtdeptId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtaccount.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtusername.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtpassword.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtemail.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtmobilephone.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtdeptId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtisEnabled.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).EndInit();
@ -681,7 +692,6 @@ namespace MES.Form
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
@ -691,6 +701,7 @@ namespace MES.Form
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
this.ResumeLayout(false);
}
@ -731,8 +742,6 @@ namespace MES.Form
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtmobilephone;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtdeptId;
private DevExpress.XtraEditors.LookUpEdit txtdeptId;
///////////////////////////////
private DevExpress.XtraEditors.CheckEdit txtisEnabled;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId;
@ -752,12 +761,14 @@ namespace MES.Form
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
private EmptySpaceItem emptySpaceItem1;
private TreeListLookUpEdit txtdeptId;
private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList;
private LayoutControlItem layoutControlItem13;
}
}

View File

@ -42,6 +42,7 @@ namespace WinformGeneralDeveloperFrame
this.barStaticItem3 = new DevExpress.XtraBars.BarStaticItem();
this.btnabout = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem();
this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem();
this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
this.ribbonStatusBar1 = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
@ -50,7 +51,6 @@ namespace WinformGeneralDeveloperFrame
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.bsi_UserName = new DevExpress.XtraBars.BarStaticItem();
this.barStaticItem1 = new DevExpress.XtraBars.BarStaticItem();
this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem();
((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTimeEdit1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).BeginInit();
@ -160,6 +160,13 @@ namespace WinformGeneralDeveloperFrame
this.barButtonItem1.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.mail_16x16;
this.barButtonItem1.ImageOptions.LargeImage = global::WinformGeneralDeveloperFrame.Properties.Resources.mail_32x32;
this.barButtonItem1.Name = "barButtonItem1";
this.barButtonItem1.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem1_ItemClick);
//
// barButtonItem2
//
this.barButtonItem2.Caption = "barButtonItem2";
this.barButtonItem2.Id = 10;
this.barButtonItem2.Name = "barButtonItem2";
//
// ribbonPage1
//
@ -199,6 +206,7 @@ namespace WinformGeneralDeveloperFrame
this.navBarControl1.TabIndex = 8;
this.navBarControl1.Text = "navBarControl1";
this.navBarControl1.View = new DevExpress.XtraNavBar.ViewInfo.StandardSkinNavigationPaneViewInfoRegistrator("Blue");
this.navBarControl1.Click += new System.EventHandler(this.navBarControl1_Click);
//
// timer1
//
@ -222,12 +230,6 @@ namespace WinformGeneralDeveloperFrame
this.barStaticItem1.Name = "barStaticItem1";
this.barStaticItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
//
// barButtonItem2
//
this.barButtonItem2.Caption = "barButtonItem2";
this.barButtonItem2.Id = 10;
this.barButtonItem2.Name = "barButtonItem2";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);

View File

@ -1,17 +1,12 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars.Helpers;
using DevExpress.XtraBars.Helpers;
using DevExpress.XtraNavBar;
using DevExpress.XtraSplashScreen;
using MES;
using MES.Entity;
using MES.Form;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using WinformGeneralDeveloperFrame.Commons;
namespace WinformGeneralDeveloperFrame
@ -90,6 +85,17 @@ namespace WinformGeneralDeveloperFrame
}
}
}
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
//使用QQ开放平台的发邮件界面
string mailUrl = string.Format("http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=648428741@qq.com");
Process.Start(mailUrl);
}
private void navBarControl1_Click(object sender, EventArgs e)
{
}
}
}

View File

@ -490,7 +490,7 @@ namespace ${NameSpace}.Form
#if(${info.controlType}=="LookUpEdit")
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItem${info.controlName};
#elseif(${info.controlType}=="TreeListLookUpEdit")CheckedComboBoxEdit
#elseif(${info.controlType}=="TreeListLookUpEdit")
private DevExpress.XtraTreeList.TreeList ${info.controlName}TreeList;
private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeList${info.controlName};
private DevExpress.XtraTreeList.TreeList repositoryItemTreeList${info.controlName}TreeList;

View File

@ -141,9 +141,12 @@
<Compile Include="DB\MESDB.cs" />
<Compile Include="EntityAdapter.cs" />
<Compile Include="Entity\stockInfo.cs" />
<Compile Include="Entity\sysDeptInfo.cs" />
<Compile Include="Entity\sysDictDataInfo.cs" />
<Compile Include="Entity\sysDictTypeInfo.cs" />
<Compile Include="Entity\sysFunctionInfo.cs" />
<Compile Include="Entity\sysMenuInfo.cs" />
<Compile Include="Entity\sysRoleInfo.cs" />
<Compile Include="Entity\sysUserInfo.cs" />
<Compile Include="Form\Frmstock.cs">
<SubType>Form</SubType>
@ -157,6 +160,12 @@
<Compile Include="Form\FrmStockShow.Designer.cs">
<DependentUpon>FrmStockShow.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmsysDept.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\FrmsysDept.designer.cs">
<DependentUpon>FrmsysDept.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmsysDictData.cs">
<SubType>Form</SubType>
</Compile>
@ -169,12 +178,24 @@
<Compile Include="Form\FrmsysDictType.designer.cs">
<DependentUpon>FrmsysDictType.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmsysFunction.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\FrmsysFunction.designer.cs">
<DependentUpon>FrmsysFunction.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmsysMenu.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\FrmsysMenu.designer.cs">
<DependentUpon>FrmsysMenu.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmsysRole.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\FrmsysRole.designer.cs">
<DependentUpon>FrmsysRole.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmsysUser.cs">
<SubType>Form</SubType>
</Compile>
@ -267,6 +288,9 @@
<EmbeddedResource Include="Form\FrmStockShow.resx">
<DependentUpon>FrmStockShow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmsysDept.resx">
<DependentUpon>FrmsysDept.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmsysDictData.resx">
<DependentUpon>FrmsysDictData.cs</DependentUpon>
</EmbeddedResource>
@ -276,6 +300,9 @@
<EmbeddedResource Include="Form\FrmsysMenu.resx">
<DependentUpon>FrmsysMenu.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmsysRole.resx">
<DependentUpon>FrmsysRole.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmsysUser.resx">
<DependentUpon>FrmsysUser.cs</DependentUpon>
</EmbeddedResource>