字典管理部分代码,暂时暂停

dhzzyy
luoxingjian 6 months ago
parent 34eb6c7cf5
commit ffef4bd2df
  1. 40
      PEIS/Entity/BaseDictionaryDetails.cs
  2. 33
      PEIS/Entity/BaseDictionaryType.cs
  3. 32
      PEIS/Model/Setting/DictionaryModel.cs
  4. 32
      PEIS/PEIS.csproj
  5. 28
      PEIS/Presenter/Setting/DictionaryPresenter.cs
  6. 125
      PEIS/View/MainForm.Designer.cs
  7. 4
      PEIS/View/MainForm.cs
  8. 9
      PEIS/View/MainForm.resx
  9. 313
      PEIS/View/Setting/DictionaryDEditFrom.Designer.cs
  10. 33
      PEIS/View/Setting/DictionaryDEditFrom.cs
  11. 139
      PEIS/View/Setting/DictionaryDEditFrom.resx
  12. 445
      PEIS/View/Setting/DictionaryForm.Designer.cs
  13. 115
      PEIS/View/Setting/DictionaryForm.cs
  14. 120
      PEIS/View/Setting/DictionaryForm.resx
  15. 208
      PEIS/View/Setting/DictionaryTEditFrom.Designer.cs
  16. 55
      PEIS/View/Setting/DictionaryTEditFrom.cs
  17. 139
      PEIS/View/Setting/DictionaryTEditFrom.resx
  18. 21
      PEIS/View/Setting/IDictionaryView.cs

@ -0,0 +1,40 @@
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.Entity
{
/// <summary>
/// 字典明细
/// </summary>
public class BaseDictionaryDetails : ObjectData
{
public override String TableName => "Base_Dictionary_Details";
/// <summary>
/// 字典类型ID
/// </summary>
public Int64 TID { get; set; }
/// <summary>
/// 字典编码
/// </summary>
public string DetailCode { get; set; }
/// <summary>
/// 字典名称
/// </summary>
public string DetailName { get; set; }
/// <summary>
/// 字典顺序
/// </summary>
public string DetailOrder { get; set; }
/// <summary>
/// 父级节点
/// </summary>
public Int64? ParentId { get; set; }
/// <summary>
/// 字典备注
/// </summary>
public string DetailNote { get; set; }
}
}

@ -0,0 +1,33 @@
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.Entity
{
/// <summary>
/// 字典分类
/// </summary>
public class BaseDictionaryType : ObjectData
{
public override String TableName => "Base_Dictionary_Type";
/// <summary>
/// 分类编码
/// </summary>
public string DictCode { get; set; }
/// <summary>
/// 分类名称
/// </summary>
public string DictName { get; set; }
/// <summary>
/// 分类顺序
/// </summary>
public int DictOrder { get; set; }
/// <summary>
/// 分类备注
/// </summary>
public string DictNote { get; set; }
}
}

@ -0,0 +1,32 @@
using PEIS.Entity;
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.Model.Setting
{
public class DictionaryTModel : IModel<BaseDictionaryType>
{
public List<BaseDictionaryType> GetItems()
{
var result= DAOHelp.GetDataBySQL<BaseDictionaryType>("Select * From Base_Dictionary_Type ORDER BY DictOrder");
return result == null ? new List<BaseDictionaryType>() : result;
}
}
public class DictionaryDModel : IModel<BaseDictionaryDetails>
{
public List<BaseDictionaryDetails> GetItems()
{
var result = DAOHelp.GetDataBySQL<BaseDictionaryDetails>("Select * From Base_Dictionary_Details ORDER BY DetailOrder");
return result == null ? new List<BaseDictionaryDetails>() : result;
}
public List<BaseDictionaryDetails> GetItemByTDictId(Int64 tId)
{
var result = DAOHelp.GetDataBySQL<BaseDictionaryDetails>($"Select * From Base_Dictionary_Details D WHERE D.TID={tId} ORDER BY D.DetailOrder");
return result == null ? new List<BaseDictionaryDetails>() : result;
}
}
}

@ -193,6 +193,8 @@
</Compile>
<Compile Include="Base\IViewBase.cs" />
<Compile Include="Base\Presenter.cs" />
<Compile Include="Entity\BaseDictionaryDetails.cs" />
<Compile Include="Entity\BaseDictionaryType.cs" />
<Compile Include="Entity\ExamCareerHisInq.cs" />
<Compile Include="Entity\EnrollmentReserve.cs" />
<Compile Include="Entity\ExamEmploymentHis.cs" />
@ -200,10 +202,12 @@
<Compile Include="Entity\Log.cs" />
<Compile Include="Model\Exam\CareerHisInqModel.cs" />
<Compile Include="Model\Exam\HistoryModel.cs" />
<Compile Include="Model\Setting\DictionaryModel.cs" />
<Compile Include="Presenter\CareerHisInqPresenter.cs" />
<Compile Include="Presenter\EnrollmentSearchPresenter.cs" />
<Compile Include="Presenter\NewBasePatientPresenter.cs" />
<Compile Include="Presenter\NewEnrollmentPersonPresenter.cs" />
<Compile Include="Presenter\Setting\DictionaryPresenter.cs" />
<Compile Include="Utils\ColorHelper.cs" />
<Compile Include="Utils\Common.cs" />
<Compile Include="Utils\ExcelHelper.cs" />
@ -407,6 +411,25 @@
<Compile Include="View\Exam\PartForm.Designer.cs">
<DependentUpon>PartForm.cs</DependentUpon>
</Compile>
<Compile Include="View\Setting\DictionaryDEditFrom.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Setting\DictionaryDEditFrom.Designer.cs">
<DependentUpon>DictionaryDEditFrom.cs</DependentUpon>
</Compile>
<Compile Include="View\Setting\DictionaryForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Setting\DictionaryForm.Designer.cs">
<DependentUpon>DictionaryForm.cs</DependentUpon>
</Compile>
<Compile Include="View\Setting\DictionaryTEditFrom.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Setting\DictionaryTEditFrom.Designer.cs">
<DependentUpon>DictionaryTEditFrom.cs</DependentUpon>
</Compile>
<Compile Include="View\Setting\IDictionaryView.cs" />
<Compile Include="View\Setting\IPermissionView.cs" />
<Compile Include="View\Setting\PermissionForm.cs">
<SubType>Form</SubType>
@ -598,6 +621,15 @@
<DependentUpon>PartForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="View\Setting\DictionaryDEditFrom.resx">
<DependentUpon>DictionaryDEditFrom.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Setting\DictionaryForm.resx">
<DependentUpon>DictionaryForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Setting\DictionaryTEditFrom.resx">
<DependentUpon>DictionaryTEditFrom.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Setting\PermissionForm.resx">
<DependentUpon>PermissionForm.cs</DependentUpon>
</EmbeddedResource>

@ -0,0 +1,28 @@
using PEIS.Base;
using PEIS.Model.Setting;
using PEIS.View.Setting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.Presenter.Setting
{
internal class DictionaryPresenter : Presenter<IDictionaryView>
{
public DictionaryPresenter(IDictionaryView view) : base(view)
{
}
protected override void OnViewSet()
{
View.GetBaseDictTypeData += (send, args) =>
{
View.ShowBaseDictTypeData(new DictionaryTModel().GetItems());
};
View.GetBaseDictDetailsData += (send, args) =>
{
View.ShowBaseDictDetailsData(new DictionaryDModel().GetItemByTDictId(args.Eid));
};
}
}
}

@ -51,6 +51,14 @@ namespace PEIS.View
this.lblStep = new System.Windows.Forms.Label();
this.lblHospital = new System.Windows.Forms.Label();
this.NbcMain = new DevExpress.XtraNavBar.NavBarControl();
this.NbgSetting = new DevExpress.XtraNavBar.NavBarGroup();
this.NbiFeeItem = new DevExpress.XtraNavBar.NavBarItem();
this.NbiPackage = new DevExpress.XtraNavBar.NavBarItem();
this.NbiConclusion = new DevExpress.XtraNavBar.NavBarItem();
this.navBarItem16 = new DevExpress.XtraNavBar.NavBarItem();
this.NbiDept = new DevExpress.XtraNavBar.NavBarItem();
this.NbiPermission = new DevExpress.XtraNavBar.NavBarItem();
this.NbiDictionary = new DevExpress.XtraNavBar.NavBarItem();
this.NbgReg = new DevExpress.XtraNavBar.NavBarGroup();
this.NbiEnrollmentSearch = new DevExpress.XtraNavBar.NavBarItem();
this.NbiEnrollmentPerson = new DevExpress.XtraNavBar.NavBarItem();
@ -67,13 +75,6 @@ namespace PEIS.View
this.navBarItem12 = new DevExpress.XtraNavBar.NavBarItem();
this.navBarItem13 = new DevExpress.XtraNavBar.NavBarItem();
this.navBarItem14 = new DevExpress.XtraNavBar.NavBarItem();
this.NbgSetting = new DevExpress.XtraNavBar.NavBarGroup();
this.NbiFeeItem = new DevExpress.XtraNavBar.NavBarItem();
this.NbiPackage = new DevExpress.XtraNavBar.NavBarItem();
this.NbiConclusion = new DevExpress.XtraNavBar.NavBarItem();
this.navBarItem16 = new DevExpress.XtraNavBar.NavBarItem();
this.NbiDept = new DevExpress.XtraNavBar.NavBarItem();
this.NbiPermission = new DevExpress.XtraNavBar.NavBarItem();
this.NbgNull = new DevExpress.XtraNavBar.NavBarGroup();
this.navBarItem8 = new DevExpress.XtraNavBar.NavBarItem();
this.PnlButton.SuspendLayout();
@ -401,7 +402,8 @@ namespace PEIS.View
this.NbiFeeItem,
this.NbiPackage,
this.NbiDept,
this.NbiPermission});
this.NbiPermission,
this.NbiDictionary});
this.NbcMain.Location = new System.Drawing.Point(1, 46);
this.NbcMain.Name = "NbcMain";
this.NbcMain.OptionsNavPane.ExpandedWidth = 100;
@ -410,6 +412,63 @@ namespace PEIS.View
this.NbcMain.Text = "navBarControl1";
this.NbcMain.View = new DevExpress.XtraNavBar.ViewInfo.Office3ViewInfoRegistrator();
//
// NbgSetting
//
this.NbgSetting.Caption = "系统设置";
this.NbgSetting.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiFeeItem),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiPackage),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiConclusion),
new DevExpress.XtraNavBar.NavBarItemLink(this.navBarItem16),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiDept),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiPermission),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiDictionary)});
this.NbgSetting.Name = "NbgSetting";
//
// NbiFeeItem
//
this.NbiFeeItem.Caption = "收费项目";
this.NbiFeeItem.LargeImage = global::PEIS.Properties.Resources.;
this.NbiFeeItem.Name = "NbiFeeItem";
//
// NbiPackage
//
this.NbiPackage.Caption = "体检套餐";
this.NbiPackage.LargeImage = global::PEIS.Properties.Resources.;
this.NbiPackage.Name = "NbiPackage";
//
// NbiConclusion
//
this.NbiConclusion.Caption = "结论词";
this.NbiConclusion.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiConclusion.LargeImage")));
this.NbiConclusion.Name = "NbiConclusion";
//
// navBarItem16
//
this.navBarItem16.Caption = "团体结论词";
this.navBarItem16.LargeImage = global::PEIS.Properties.Resources.;
this.navBarItem16.Name = "navBarItem16";
this.navBarItem16.Visible = false;
//
// NbiDept
//
this.NbiDept.Caption = "科室管理";
this.NbiDept.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiDept.LargeImage")));
this.NbiDept.Name = "NbiDept";
//
// NbiPermission
//
this.NbiPermission.Caption = "权限管理";
this.NbiPermission.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiPermission.LargeImage")));
this.NbiPermission.Name = "NbiPermission";
//
// NbiDictionary
//
this.NbiDictionary.Caption = "字典管理";
this.NbiDictionary.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiDictionary.LargeImage")));
this.NbiDictionary.Name = "NbiDictionary";
this.NbiDictionary.Visible = false;
//
// NbgReg
//
this.NbgReg.Caption = "检前登记";
@ -523,55 +582,6 @@ namespace PEIS.View
this.navBarItem14.LargeImage = ((System.Drawing.Image)(resources.GetObject("navBarItem14.LargeImage")));
this.navBarItem14.Name = "navBarItem14";
//
// NbgSetting
//
this.NbgSetting.Caption = "系统设置";
this.NbgSetting.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiFeeItem),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiPackage),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiConclusion),
new DevExpress.XtraNavBar.NavBarItemLink(this.navBarItem16),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiDept),
new DevExpress.XtraNavBar.NavBarItemLink(this.NbiPermission)});
this.NbgSetting.Name = "NbgSetting";
//
// NbiFeeItem
//
this.NbiFeeItem.Caption = "收费项目";
this.NbiFeeItem.LargeImage = global::PEIS.Properties.Resources.;
this.NbiFeeItem.Name = "NbiFeeItem";
//
// NbiPackage
//
this.NbiPackage.Caption = "体检套餐";
this.NbiPackage.LargeImage = global::PEIS.Properties.Resources.;
this.NbiPackage.Name = "NbiPackage";
//
// NbiConclusion
//
this.NbiConclusion.Caption = "结论词";
this.NbiConclusion.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiConclusion.LargeImage")));
this.NbiConclusion.Name = "NbiConclusion";
//
// navBarItem16
//
this.navBarItem16.Caption = "团体结论词";
this.navBarItem16.LargeImage = global::PEIS.Properties.Resources.;
this.navBarItem16.Name = "navBarItem16";
this.navBarItem16.Visible = false;
//
// NbiDept
//
this.NbiDept.Caption = "科室管理";
this.NbiDept.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiDept.LargeImage")));
this.NbiDept.Name = "NbiDept";
//
// NbiPermission
//
this.NbiPermission.Caption = "权限管理";
this.NbiPermission.LargeImage = ((System.Drawing.Image)(resources.GetObject("NbiPermission.LargeImage")));
this.NbiPermission.Name = "NbiPermission";
//
// NbgNull
//
this.NbgNull.Caption = "NbgNull";
@ -659,6 +669,7 @@ namespace PEIS.View
private System.Windows.Forms.Label lblHospital;
private System.Windows.Forms.Panel stepPanel;
private StepViewer stepViewer2;
private DevExpress.XtraNavBar.NavBarItem NbiDictionary;
}
}

@ -65,6 +65,7 @@ namespace PEIS.View
NbiPackage.LinkClicked += (s, e) => AddTab("NbiPackage", e.Link.Item);
NbiConclusion.LinkClicked += (s, e) => AddTab("NbiConclusion", e.Link.Item);
NbiDept.LinkClicked += (s, e) => AddTab("NbiDept", e.Link.Item);
NbiDictionary.LinkClicked+= (s, e) => AddTab("NbiDictionary", e.Link.Item);//字典管理
// 人次统计表
NbiPeopleCount.LinkClicked += (s, e) => AddTab("NbiPeopleCount", e.Link.Item);
// 权限管理
@ -278,7 +279,8 @@ namespace PEIS.View
case "NbiPermission":
return new PermissionForm();
case "NbiDictionary":
return new DictionaryForm();
default:
return null;
}

@ -478,6 +478,15 @@
JtbQrCiWk94SrKb/4pqWODIhM5HbK9CU103zpVh2MmLa3sOFoslvCOj/FY3wmf+EpqWP7kWBHf4fgliU
licez66I2smD8lRgUPk8x2+Y+5WJzaH9QpvAfX2P4yu6hQL7uDRe/tPU1f0GMOxpxjaDCnUAAAAASUVO
RK5CYII=
</value>
</data>
<data name="NbiDictionary.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAALtJREFUSEtj
oDuwjX6rZRPz2oGaGGQm1HgIcIj5qGIb+/o/LTDIbKg1DAxg24GCNrGvQtFdRTYGmgU2E8iGWoNkEbIg
hQCrmcPbItuY15IgNpiGsUnFQH0ELYLwXzaAJYAAxCYVQ/QRYRE1wAi1CMjeD5YAAhCbVAzSN7gsogYY
oRbBMh0IoGdGYjBEHwGLQJUViA2mYWxSMbQSBbFxWgQVohiMNItoXZXTrXECArCUQk0MMhNqPL0AAwMA
gVq/Q20bmn0AAAAASUVORK5CYII=
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

@ -0,0 +1,313 @@
namespace PEIS.View.Setting
{
partial class DictionaryDEditFrom
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DictionaryDEditFrom));
this.panel1 = new System.Windows.Forms.Panel();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.treeListLookUpEdit1 = new DevExpress.XtraEditors.TreeListLookUpEdit();
this.treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList();
this.panel2 = new System.Windows.Forms.Panel();
this.CancelBtn = new System.Windows.Forms.Button();
this.ConfirmBtn = new System.Windows.Forms.Button();
this.DetailName = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.ID = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.TID = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.DetailOrder = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.DetailNote = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).BeginInit();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.textBox3);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.numericUpDown1);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.treeListLookUpEdit1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(371, 283);
this.panel1.TabIndex = 0;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(119, 152);
this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(164, 112);
this.textBox3.TabIndex = 9;
//
// label5
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(35, 149);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(78, 23);
this.label5.TabIndex = 8;
this.label5.Text = "备注:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// numericUpDown1
//
this.numericUpDown1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numericUpDown1.Location = new System.Drawing.Point(120, 117);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(163, 23);
this.numericUpDown1.TabIndex = 7;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(36, 117);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(78, 23);
this.label4.TabIndex = 6;
this.label4.Text = "顺序:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(35, 27);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(78, 23);
this.label3.TabIndex = 5;
this.label3.Text = "父节点:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(119, 89);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(164, 21);
this.textBox2.TabIndex = 4;
//
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(35, 86);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 23);
this.label2.TabIndex = 3;
this.label2.Text = "编码:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(119, 59);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(164, 21);
this.textBox1.TabIndex = 2;
//
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(35, 56);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(78, 23);
this.label1.TabIndex = 1;
this.label1.Text = "名称:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// treeListLookUpEdit1
//
this.treeListLookUpEdit1.EditValue = "";
this.treeListLookUpEdit1.Location = new System.Drawing.Point(119, 30);
this.treeListLookUpEdit1.Name = "treeListLookUpEdit1";
this.treeListLookUpEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.treeListLookUpEdit1.Properties.DisplayMember = "DetailName";
this.treeListLookUpEdit1.Properties.KeyMember = "ID";
this.treeListLookUpEdit1.Properties.NullText = "";
this.treeListLookUpEdit1.Properties.TreeList = this.treeListLookUpEdit1TreeList;
this.treeListLookUpEdit1.Properties.ValueMember = "ID";
this.treeListLookUpEdit1.Size = new System.Drawing.Size(164, 20);
this.treeListLookUpEdit1.TabIndex = 0;
//
// treeListLookUpEdit1TreeList
//
this.treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] {
this.ID,
this.TID,
this.DetailName,
this.treeListColumn1,
this.DetailOrder,
this.DetailNote});
this.treeListLookUpEdit1TreeList.Location = new System.Drawing.Point(0, 0);
this.treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList";
this.treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true;
this.treeListLookUpEdit1TreeList.ParentFieldName = "ParentId";
this.treeListLookUpEdit1TreeList.Size = new System.Drawing.Size(400, 200);
this.treeListLookUpEdit1TreeList.TabIndex = 0;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.CancelBtn);
this.panel2.Controls.Add(this.ConfirmBtn);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 283);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(371, 38);
this.panel2.TabIndex = 10;
//
// CancelBtn
//
this.CancelBtn.Image = ((System.Drawing.Image)(resources.GetObject("CancelBtn.Image")));
this.CancelBtn.Location = new System.Drawing.Point(229, 0);
this.CancelBtn.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(91, 38);
this.CancelBtn.TabIndex = 20;
this.CancelBtn.Text = "取消";
this.CancelBtn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.CancelBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.CancelBtn.UseVisualStyleBackColor = true;
//
// ConfirmBtn
//
this.ConfirmBtn.Image = ((System.Drawing.Image)(resources.GetObject("ConfirmBtn.Image")));
this.ConfirmBtn.Location = new System.Drawing.Point(68, 0);
this.ConfirmBtn.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
this.ConfirmBtn.Name = "ConfirmBtn";
this.ConfirmBtn.Size = new System.Drawing.Size(90, 38);
this.ConfirmBtn.TabIndex = 19;
this.ConfirmBtn.Text = "确认";
this.ConfirmBtn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.ConfirmBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.ConfirmBtn.UseVisualStyleBackColor = true;
//
// DetailName
//
this.DetailName.Caption = "名字";
this.DetailName.FieldName = "DetailName";
this.DetailName.Name = "DetailName";
this.DetailName.Visible = true;
this.DetailName.VisibleIndex = 0;
//
// ID
//
this.ID.Caption = "主键";
this.ID.FieldName = "ID";
this.ID.Name = "ID";
//
// TID
//
this.TID.Caption = "分类ID";
this.TID.FieldName = "TID";
this.TID.Name = "TID";
//
// treeListColumn1
//
this.treeListColumn1.Caption = "编码";
this.treeListColumn1.FieldName = "DetailCode";
this.treeListColumn1.Name = "treeListColumn1";
this.treeListColumn1.Visible = true;
this.treeListColumn1.VisibleIndex = 1;
//
// DetailOrder
//
this.DetailOrder.Caption = "顺序";
this.DetailOrder.FieldName = "DetailOrder";
this.DetailOrder.Name = "DetailOrder";
//
// DetailNote
//
this.DetailNote.Caption = "备注";
this.DetailNote.FieldName = "DetailNote";
this.DetailNote.Name = "DetailNote";
//
// DictionaryDEditFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(371, 321);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "DictionaryDEditFrom";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "字典明细";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).EndInit();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Button ConfirmBtn;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private DevExpress.XtraEditors.TreeListLookUpEdit treeListLookUpEdit1;
private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label4;
private DevExpress.XtraTreeList.Columns.TreeListColumn ID;
private DevExpress.XtraTreeList.Columns.TreeListColumn TID;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailName;
private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailOrder;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailNote;
}
}

@ -0,0 +1,33 @@
using PEIS.Entity;
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;
namespace PEIS.View.Setting
{
public partial class DictionaryDEditFrom : Form
{
public DictionaryDEditFrom()
{
InitializeComponent();
Shown += DictionaryDEditFrom_Shown;
}
private void DictionaryDEditFrom_Shown(object sender, EventArgs e)
{
List<BaseDictionaryDetails> dictionaryDetails = new List<BaseDictionaryDetails>()
{
new BaseDictionaryDetails(){ID=0,DetailName="无",DetailCode="00"},
new BaseDictionaryDetails(){ID=1,DetailName="明细01",DetailCode="01"},
new BaseDictionaryDetails(){ID=2,DetailName="明细02",DetailCode="02-2"},
new BaseDictionaryDetails(){ID=3,DetailName="明细01-1",DetailCode="01-1",ParentId=1},
};
treeListLookUpEdit1TreeList.DataSource= dictionaryDetails.ConvertAll(p => (object)p);
}
}
}

@ -0,0 +1,139 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="CancelBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAH1JREFUSEvt
lEEKgDAMBPNJf5GX+T+9aiM5REhDVlPx0AGhbXan4KE0+R8787Ixr7pNIx3p6raPBNt3IJfAHaSAZG9k
iplMSCSIZhCeyDt7hRXatY5rMOJ6uTD0AiOv/0We0Dt7RCSKZikygkzGBSki2Qu40IA6w5/ryccQnexo
4OWtCNeHAAAAAElFTkSuQmCC
</value>
</data>
<data name="ConfirmBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAPJJREFUSEtj
GAWjgCRgP/9/KJRJfWA/73+kw7z//4GWmEKFqAeAhsaCDAfiy3az/2tChakDgC5PhBp+3m7+f1WoMHUA
0OWpUMPP2Mz7rwQVpg4AujwTavgJl4X/5aDChIHD3P8NUCZOAHR5Ltjwuf+POE3/Lw0VJgyAmtKhGnFa
AnR5IdTlB5xn/xeHChMPgBpX4bIE6PJSqNwe54X/haHCpAO4JfP/10OFQC6vBIvN+78DKC4AFSYfwC0B
+gTo8looe4vDqv88UCWUA7glELzBsu8/J1SKegBsyfz/a4xn/meFCtEANPxngrJGwShABwwMAJBYlx6C
WXdWAAAAAElFTkSuQmCC
</value>
</data>
</root>

@ -0,0 +1,445 @@
namespace PEIS.View.Setting
{
partial class DictionaryForm
{
/// <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.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.ID = new DevExpress.XtraGrid.Columns.GridColumn();
this.DictName = new DevExpress.XtraGrid.Columns.GridColumn();
this.DictCode = new DevExpress.XtraGrid.Columns.GridColumn();
this.DictOrder = new DevExpress.XtraGrid.Columns.GridColumn();
this.DictNote = new DevExpress.XtraGrid.Columns.GridColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.BtnTypeDelete = new System.Windows.Forms.Button();
this.BtnTypeAddUser = new System.Windows.Forms.Button();
this.BtnTypeRefresh = new System.Windows.Forms.Button();
this.treeList1 = new DevExpress.XtraTreeList.TreeList();
this.id1 = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.TID = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.DetailName = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.DetailCode = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.DetailOrder = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.ParentId = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.DetailNote = new DevExpress.XtraTreeList.Columns.TreeListColumn();
this.panel2 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.TxtCode = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.BtnDictDAdd = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.AutoScroll = true;
this.splitContainer1.Panel1.Controls.Add(this.gridControl1);
this.splitContainer1.Panel1.Controls.Add(this.panel1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.AutoScroll = true;
this.splitContainer1.Panel2.Controls.Add(this.treeList1);
this.splitContainer1.Panel2.Controls.Add(this.panel2);
this.splitContainer1.Size = new System.Drawing.Size(1187, 671);
this.splitContainer1.SplitterDistance = 251;
this.splitContainer1.TabIndex = 0;
//
// gridControl1
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.Location = new System.Drawing.Point(0, 42);
this.gridControl1.MainView = this.gridView1;
this.gridControl1.Name = "gridControl1";
this.gridControl1.Size = new System.Drawing.Size(251, 629);
this.gridControl1.TabIndex = 1;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
//
// gridView1
//
this.gridView1.Appearance.ViewCaption.Options.UseTextOptions = true;
this.gridView1.Appearance.ViewCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.ID,
this.DictName,
this.DictCode,
this.DictOrder,
this.DictNote});
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never;
this.gridView1.OptionsView.ShowGroupPanel = false;
this.gridView1.OptionsView.ShowVerticalLines = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsView.ShowViewCaption = true;
this.gridView1.ViewCaption = "字典分类";
//
// ID
//
this.ID.Caption = "ID";
this.ID.FieldName = "ID";
this.ID.Name = "ID";
this.ID.OptionsFilter.AllowAutoFilter = false;
this.ID.OptionsFilter.AllowFilter = false;
//
// DictName
//
this.DictName.Caption = "名称";
this.DictName.FieldName = "DictName";
this.DictName.Name = "DictName";
this.DictName.OptionsColumn.AllowEdit = false;
this.DictName.OptionsColumn.AllowFocus = false;
this.DictName.OptionsFilter.AllowAutoFilter = false;
this.DictName.OptionsFilter.AllowFilter = false;
this.DictName.Visible = true;
this.DictName.VisibleIndex = 0;
//
// DictCode
//
this.DictCode.Caption = "编码";
this.DictCode.FieldName = "DictCode";
this.DictCode.Name = "DictCode";
this.DictCode.OptionsColumn.AllowEdit = false;
this.DictCode.OptionsColumn.AllowFocus = false;
this.DictCode.OptionsFilter.AllowAutoFilter = false;
this.DictCode.OptionsFilter.AllowFilter = false;
this.DictCode.Visible = true;
this.DictCode.VisibleIndex = 1;
//
// DictOrder
//
this.DictOrder.Caption = "分类顺序";
this.DictOrder.FieldName = "DictOrder";
this.DictOrder.Name = "DictOrder";
this.DictOrder.OptionsColumn.AllowEdit = false;
this.DictOrder.OptionsColumn.AllowFocus = false;
this.DictOrder.OptionsFilter.AllowAutoFilter = false;
this.DictOrder.OptionsFilter.AllowFilter = false;
//
// DictNote
//
this.DictNote.Caption = "备注";
this.DictNote.Name = "DictNote";
this.DictNote.OptionsColumn.AllowEdit = false;
this.DictNote.OptionsColumn.AllowFocus = false;
this.DictNote.OptionsFilter.AllowAutoFilter = false;
this.DictNote.OptionsFilter.AllowFilter = false;
//
// panel1
//
this.panel1.Controls.Add(this.BtnTypeDelete);
this.panel1.Controls.Add(this.BtnTypeAddUser);
this.panel1.Controls.Add(this.BtnTypeRefresh);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(251, 42);
this.panel1.TabIndex = 0;
//
// BtnTypeDelete
//
this.BtnTypeDelete.ForeColor = System.Drawing.Color.Black;
this.BtnTypeDelete.Image = global::PEIS.Properties.Resources.;
this.BtnTypeDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.BtnTypeDelete.Location = new System.Drawing.Point(169, 8);
this.BtnTypeDelete.Margin = new System.Windows.Forms.Padding(0);
this.BtnTypeDelete.Name = "BtnTypeDelete";
this.BtnTypeDelete.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.BtnTypeDelete.Size = new System.Drawing.Size(70, 30);
this.BtnTypeDelete.TabIndex = 12;
this.BtnTypeDelete.Text = "删除";
this.BtnTypeDelete.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.BtnTypeDelete.UseVisualStyleBackColor = true;
//
// BtnTypeAddUser
//
this.BtnTypeAddUser.Image = global::PEIS.Properties.Resources.;
this.BtnTypeAddUser.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.BtnTypeAddUser.Location = new System.Drawing.Point(89, 9);
this.BtnTypeAddUser.Margin = new System.Windows.Forms.Padding(0);
this.BtnTypeAddUser.Name = "BtnTypeAddUser";
this.BtnTypeAddUser.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.BtnTypeAddUser.Size = new System.Drawing.Size(70, 30);
this.BtnTypeAddUser.TabIndex = 11;
this.BtnTypeAddUser.Text = "添加";
this.BtnTypeAddUser.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.BtnTypeAddUser.UseVisualStyleBackColor = true;
//
// BtnTypeRefresh
//
this.BtnTypeRefresh.Image = global::PEIS.Properties.Resources.;
this.BtnTypeRefresh.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.BtnTypeRefresh.Location = new System.Drawing.Point(9, 9);
this.BtnTypeRefresh.Margin = new System.Windows.Forms.Padding(0);
this.BtnTypeRefresh.Name = "BtnTypeRefresh";
this.BtnTypeRefresh.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.BtnTypeRefresh.Size = new System.Drawing.Size(70, 30);
this.BtnTypeRefresh.TabIndex = 10;
this.BtnTypeRefresh.Text = "刷新";
this.BtnTypeRefresh.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.BtnTypeRefresh.UseVisualStyleBackColor = true;
//
// treeList1
//
this.treeList1.Appearance.Caption.Options.UseTextOptions = true;
this.treeList1.Appearance.Caption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.treeList1.Caption = "字典明细";
this.treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] {
this.id1,
this.TID,
this.DetailName,
this.DetailCode,
this.DetailOrder,
this.ParentId,
this.DetailNote});
this.treeList1.Cursor = System.Windows.Forms.Cursors.Default;
this.treeList1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeList1.Location = new System.Drawing.Point(0, 42);
this.treeList1.Name = "treeList1";
this.treeList1.OptionsView.ShowCaption = true;
this.treeList1.OptionsView.ShowHorzLines = false;
this.treeList1.OptionsView.ShowIndicator = false;
this.treeList1.OptionsView.ShowVertLines = false;
this.treeList1.Size = new System.Drawing.Size(932, 629);
this.treeList1.TabIndex = 0;
//
// id1
//
this.id1.Caption = "ID";
this.id1.FieldName = "ID";
this.id1.Name = "id1";
this.id1.OptionsFilter.AllowAutoFilter = false;
this.id1.OptionsFilter.AllowFilter = false;
//
// TID
//
this.TID.Caption = "字典类型ID";
this.TID.FieldName = "TID";
this.TID.Name = "TID";
this.TID.OptionsColumn.AllowEdit = false;
this.TID.OptionsColumn.AllowSort = false;
this.TID.OptionsFilter.AllowAutoFilter = false;
this.TID.OptionsFilter.AllowFilter = false;
//
// DetailName
//
this.DetailName.Caption = "字典名称";
this.DetailName.FieldName = "DetailName";
this.DetailName.Name = "DetailName";
this.DetailName.OptionsColumn.AllowEdit = false;
this.DetailName.OptionsColumn.AllowSort = false;
this.DetailName.OptionsFilter.AllowAutoFilter = false;
this.DetailName.OptionsFilter.AllowFilter = false;
this.DetailName.Visible = true;
this.DetailName.VisibleIndex = 0;
//
// DetailCode
//
this.DetailCode.Caption = "字典编码";
this.DetailCode.FieldName = "DetailCode";
this.DetailCode.Name = "DetailCode";
this.DetailCode.OptionsColumn.AllowEdit = false;
this.DetailCode.OptionsColumn.AllowSort = false;
this.DetailCode.OptionsFilter.AllowAutoFilter = false;
this.DetailCode.OptionsFilter.AllowFilter = false;
this.DetailCode.Visible = true;
this.DetailCode.VisibleIndex = 1;
//
// DetailOrder
//
this.DetailOrder.Caption = "字典顺序";
this.DetailOrder.FieldName = "字典顺序";
this.DetailOrder.Name = "DetailOrder";
this.DetailOrder.OptionsColumn.AllowEdit = false;
this.DetailOrder.OptionsColumn.AllowSort = false;
this.DetailOrder.OptionsFilter.AllowAutoFilter = false;
this.DetailOrder.OptionsFilter.AllowFilter = false;
this.DetailOrder.Visible = true;
this.DetailOrder.VisibleIndex = 2;
//
// ParentId
//
this.ParentId.Caption = "父级节点";
this.ParentId.FieldName = "父级节点";
this.ParentId.Name = "ParentId";
this.ParentId.OptionsColumn.AllowEdit = false;
this.ParentId.OptionsColumn.AllowSort = false;
this.ParentId.OptionsFilter.AllowAutoFilter = false;
this.ParentId.OptionsFilter.AllowFilter = false;
//
// DetailNote
//
this.DetailNote.Caption = "字典备注";
this.DetailNote.FieldName = "字典备注";
this.DetailNote.Name = "DetailNote";
this.DetailNote.OptionsColumn.AllowEdit = false;
this.DetailNote.OptionsColumn.AllowSort = false;
this.DetailNote.OptionsFilter.AllowAutoFilter = false;
this.DetailNote.OptionsFilter.AllowFilter = false;
//
// panel2
//
this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.TxtCode);
this.panel2.Controls.Add(this.button1);
this.panel2.Controls.Add(this.BtnDictDAdd);
this.panel2.Controls.Add(this.button3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(932, 42);
this.panel2.TabIndex = 1;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(2, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.TabIndex = 14;
this.label3.Text = "明细编码:";
//
// TxtCode
//
this.TxtCode.Location = new System.Drawing.Point(76, 12);
this.TxtCode.Name = "TxtCode";
this.TxtCode.Size = new System.Drawing.Size(120, 23);
this.TxtCode.TabIndex = 13;
//
// button1
//
this.button1.ForeColor = System.Drawing.Color.Black;
this.button1.Image = global::PEIS.Properties.Resources.;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.Location = new System.Drawing.Point(398, 8);
this.button1.Margin = new System.Windows.Forms.Padding(0);
this.button1.Name = "button1";
this.button1.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.button1.Size = new System.Drawing.Size(70, 30);
this.button1.TabIndex = 12;
this.button1.Text = "删除";
this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.button1.UseVisualStyleBackColor = true;
//
// BtnDictDAdd
//
this.BtnDictDAdd.Image = global::PEIS.Properties.Resources.;
this.BtnDictDAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.BtnDictDAdd.Location = new System.Drawing.Point(317, 8);
this.BtnDictDAdd.Margin = new System.Windows.Forms.Padding(0);
this.BtnDictDAdd.Name = "BtnDictDAdd";
this.BtnDictDAdd.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.BtnDictDAdd.Size = new System.Drawing.Size(70, 30);
this.BtnDictDAdd.TabIndex = 11;
this.BtnDictDAdd.Text = "添加";
this.BtnDictDAdd.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.BtnDictDAdd.UseVisualStyleBackColor = true;
//
// button3
//
this.button3.Image = global::PEIS.Properties.Resources.;
this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button3.Location = new System.Drawing.Point(235, 8);
this.button3.Margin = new System.Windows.Forms.Padding(0);
this.button3.Name = "button3";
this.button3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.button3.Size = new System.Drawing.Size(70, 30);
this.button3.TabIndex = 10;
this.button3.Text = "刷新";
this.button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.button3.UseVisualStyleBackColor = true;
//
// DictionaryForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1187, 671);
this.Controls.Add(this.splitContainer1);
this.Name = "DictionaryForm";
this.Text = "DictionaryForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.treeList1)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button BtnTypeRefresh;
private System.Windows.Forms.Button BtnTypeAddUser;
private DevExpress.XtraGrid.GridControl gridControl1;
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
private System.Windows.Forms.Button BtnTypeDelete;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button BtnDictDAdd;
private System.Windows.Forms.Button button3;
private DevExpress.XtraTreeList.TreeList treeList1;
private System.Windows.Forms.TextBox TxtCode;
private System.Windows.Forms.Label label3;
private DevExpress.XtraGrid.Columns.GridColumn ID;
private DevExpress.XtraGrid.Columns.GridColumn DictName;
private DevExpress.XtraGrid.Columns.GridColumn DictCode;
private DevExpress.XtraGrid.Columns.GridColumn DictOrder;
private DevExpress.XtraGrid.Columns.GridColumn DictNote;
private DevExpress.XtraTreeList.Columns.TreeListColumn id1;
private DevExpress.XtraTreeList.Columns.TreeListColumn TID;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailName;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailCode;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailOrder;
private DevExpress.XtraTreeList.Columns.TreeListColumn ParentId;
private DevExpress.XtraTreeList.Columns.TreeListColumn DetailNote;
}
}

@ -0,0 +1,115 @@
using PEIS.Base;
using PEIS.Entity;
using PEIS.Event;
using PEIS.Presenter.Setting;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace PEIS.View.Setting
{
public partial class DictionaryForm : ViewBase,IDictionaryView
{
private Int64 tID;
public DictionaryForm()
{
InitializeComponent();
BtnTypeRefresh.Click += BtnTypeRefresh_Click;
BtnTypeAddUser.Click += BtnTypeAddUser_Click;
BtnTypeDelete.Click += BtnTypeDelete_Click;
gridView1.FocusedRowChanged += GridView1_FocusedRowChanged;
BtnDictDAdd.Click += BtnDictDAdd_Click;
Shown += DictionaryForm_Shown;
}
/// <summary>
/// 明细添加
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BtnDictDAdd_Click(object sender, EventArgs e)
{
DictionaryDEditFrom dictionaryDEdit = new DictionaryDEditFrom();
var dialogResult=dictionaryDEdit.ShowDialog();
if (dialogResult== DialogResult.OK)
{
}
}
private void GridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
if (e != null)
{
var curreHandle = e.FocusedRowHandle;
tID = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[curreHandle], "ID"));
LoadDictDetailsList();
}
else {
tID = 0;
}
LoadDictDetailsList();
}
private void DictionaryForm_Shown(object sender, EventArgs e)
{
ThreadPool.QueueUserWorkItem(state =>
{
LoadDictTypeList();
});
}
private void BtnTypeDelete_Click(object sender, EventArgs e)
{
}
private void BtnTypeAddUser_Click(object sender, EventArgs e)
{
DictionaryTEditFrom dictionaryType = new DictionaryTEditFrom();
var dialogRsult=dictionaryType.ShowDialog();
if (dialogRsult== DialogResult.OK)
{
LoadDictTypeList();
}
}
private void BtnTypeRefresh_Click(object sender, EventArgs e)
{
LoadDictTypeList();
//LoadDictDetailsList();
}
//字典分类
public event EventHandler<Args<BaseDictionaryType>> GetBaseDictTypeData;
public void ShowBaseDictTypeData(List<BaseDictionaryType> dictionaryTypes)
{
Invoke(new Action(() => gridControl1.DataSource = null));
Invoke(new Action(() => gridControl1.DataSource = dictionaryTypes));
}
public void LoadDictTypeList()
{
GetBaseDictTypeData?.Invoke(this, new Args<BaseDictionaryType>());
}
//字典明细
public event EventHandler<Args<BaseDictionaryDetails>> GetBaseDictDetailsData;
public void ShowBaseDictDetailsData(List<BaseDictionaryDetails> DictDetails)
{
Invoke(new Action(() => treeList1.DataSource = null));
Invoke(new Action(() => treeList1.DataSource = DictDetails));
}
public void LoadDictDetailsList()
{
GetBaseDictDetailsData?.Invoke(this, new Args<BaseDictionaryDetails>() { Eid = tID });
}
protected override object CreatePresenter()
{
return new DictionaryPresenter(this);
}
}
}

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

@ -0,0 +1,208 @@
namespace PEIS.View.Setting
{
partial class DictionaryTEditFrom
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DictionaryTEditFrom));
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.textBox3 = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.CancelBtn = new System.Windows.Forms.Button();
this.ConfirmBtn = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(44, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 23);
this.label1.TabIndex = 0;
this.label1.Text = "名称:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(44, 77);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(67, 23);
this.label3.TabIndex = 2;
this.label3.Text = "序号:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(44, 101);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(67, 23);
this.label4.TabIndex = 3;
this.label4.Text = "备注:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(117, 23);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(174, 21);
this.textBox1.TabIndex = 4;
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(117, 77);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(174, 21);
this.numericUpDown1.TabIndex = 6;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(117, 104);
this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(174, 83);
this.textBox3.TabIndex = 7;
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.textBox4);
this.panel1.Controls.Add(this.textBox3);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.numericUpDown1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.label3);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(361, 211);
this.panel1.TabIndex = 8;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(117, 50);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(174, 21);
this.textBox4.TabIndex = 6;
//
// label5
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(44, 50);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(67, 23);
this.label5.TabIndex = 5;
this.label5.Text = "编码:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.CancelBtn);
this.panel2.Controls.Add(this.ConfirmBtn);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 211);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(361, 38);
this.panel2.TabIndex = 9;
//
// CancelBtn
//
this.CancelBtn.Image = ((System.Drawing.Image)(resources.GetObject("CancelBtn.Image")));
this.CancelBtn.Location = new System.Drawing.Point(229, 0);
this.CancelBtn.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(91, 38);
this.CancelBtn.TabIndex = 20;
this.CancelBtn.Text = "取消";
this.CancelBtn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.CancelBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.CancelBtn.UseVisualStyleBackColor = true;
//
// ConfirmBtn
//
this.ConfirmBtn.Image = ((System.Drawing.Image)(resources.GetObject("ConfirmBtn.Image")));
this.ConfirmBtn.Location = new System.Drawing.Point(68, 0);
this.ConfirmBtn.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
this.ConfirmBtn.Name = "ConfirmBtn";
this.ConfirmBtn.Size = new System.Drawing.Size(90, 38);
this.ConfirmBtn.TabIndex = 19;
this.ConfirmBtn.Text = "确认";
this.ConfirmBtn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.ConfirmBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.ConfirmBtn.UseVisualStyleBackColor = true;
//
// DictionaryType
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(361, 249);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "DictionaryType";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "字典分类";
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Button ConfirmBtn;
}
}

@ -0,0 +1,55 @@
using PEIS.Entity;
using PEIS.Utils;
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;
namespace PEIS.View.Setting
{
public partial class DictionaryTEditFrom : Form
{
public DictionaryTEditFrom()
{
InitializeComponent();
ConfirmBtn.Click += ConfirmBtn_Click;
CancelBtn.Click += CancelBtn_Click;
}
private void ConfirmBtn_Click(object sender, EventArgs e)
{
BaseDictionaryType baseDictionary = new BaseDictionaryType();
if (string.IsNullOrEmpty(textBox1.Text.Trim()))
{
Global.Msg("info", "请填写工分类名称");
textBox1.Focus();
return;
}
if (string.IsNullOrEmpty(textBox4.Text.Trim()))
{
Global.Msg("info", "请填写工分类编码");
textBox4.Focus();
return;
}
baseDictionary.DictName=textBox1.Text.Trim();
baseDictionary.DictCode=textBox4.Text.Trim();
baseDictionary.DictOrder = int.Parse(numericUpDown1.Value.ToString());
baseDictionary.DictNote = textBox3.Text.Trim();
var result=baseDictionary.Save();
if (result)
{
DialogResult = DialogResult.OK;
Close();
}
}
private void CancelBtn_Click(object sender, EventArgs e)
{
Close();
}
}
}

@ -0,0 +1,139 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="CancelBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAH1JREFUSEvt
lEEKgDAMBPNJf5GX+T+9aiM5REhDVlPx0AGhbXan4KE0+R8787Ixr7pNIx3p6raPBNt3IJfAHaSAZG9k
iplMSCSIZhCeyDt7hRXatY5rMOJ6uTD0AiOv/0We0Dt7RCSKZikygkzGBSki2Qu40IA6w5/ryccQnexo
4OWtCNeHAAAAAElFTkSuQmCC
</value>
</data>
<data name="ConfirmBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAPJJREFUSEtj
GAWjgCRgP/9/KJRJfWA/73+kw7z//4GWmEKFqAeAhsaCDAfiy3az/2tChakDgC5PhBp+3m7+f1WoMHUA
0OWpUMPP2Mz7rwQVpg4AujwTavgJl4X/5aDChIHD3P8NUCZOAHR5Ltjwuf+POE3/Lw0VJgyAmtKhGnFa
AnR5IdTlB5xn/xeHChMPgBpX4bIE6PJSqNwe54X/haHCpAO4JfP/10OFQC6vBIvN+78DKC4AFSYfwC0B
+gTo8looe4vDqv88UCWUA7glELzBsu8/J1SKegBsyfz/a4xn/meFCtEANPxngrJGwShABwwMAJBYlx6C
WXdWAAAAAElFTkSuQmCC
</value>
</data>
</root>

@ -0,0 +1,21 @@
using PEIS.Base;
using PEIS.Entity;
using PEIS.Event;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.View.Setting
{
internal interface IDictionaryView : IViewBase
{
//字典分类
event EventHandler<Args<BaseDictionaryType>> GetBaseDictTypeData;
void ShowBaseDictTypeData(List<BaseDictionaryType> dictionaryTypes);
//字典明细
event EventHandler<Args<BaseDictionaryDetails>> GetBaseDictDetailsData;
void ShowBaseDictDetailsData(List<BaseDictionaryDetails> dictionaryTypes);
}
}
Loading…
Cancel
Save