📄 peizhiweihuform.cs
字号:
//===========================================================================
// Smarclient FPMS Demo Project a sample project for SmartClient technology.
// Smarclient FPMS Demo is designed and implemented bases Microsoft Application Block tech.
// Author: SFPMS Team, Date 2004-11
// Vision 1.0
// Revison History
//=============================================================================
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using JSW.Tool;
using JSW.FPMS.Tool;
using JSW.FPMS.Xian.KongZhi;
namespace JSW.FPMS.Xian.ShiTu
{
/// <summary>
/// PeiZhiWeiHuForm 的摘要说明。
/// </summary>
public class PeiZhiWeiHuForm : System.Windows.Forms.Form
{
#region 私有变量区域
private System.Windows.Forms.GroupBox GB_XinXi;
private System.Windows.Forms.Label LB_ShuJuZu;
private System.Windows.Forms.Label LB_ShuJuXiangMing;
private System.Windows.Forms.TextBox TB_ShuJuXiangMing;
private System.Windows.Forms.Label LB_ShuJuXiangBieMing;
private System.Windows.Forms.TextBox TB_ShuJuXiangBieMing;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label LB_KongJianLeiXing;
private System.Windows.Forms.Label LB_ZuiDaShuRuChangDu;
private System.Windows.Forms.TextBox TB_ZuiDaShuRuChangDu;
private System.Windows.Forms.CheckBox CB_ZhiDu;
private System.Windows.Forms.Label LB_XianShiShunXu;
private System.Windows.Forms.TextBox TB_XianShiShunXu;
private System.Windows.Forms.Label LB_MoRenZhi;
private System.Windows.Forms.Button BT_QuXiao;
private System.Windows.Forms.Button BT_QueDing;
private System.Windows.Forms.Button BT_ShanChu;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private String jibenShuJuJian = clsChangLiang.SHUJU_PEIZHIXINXI;
private String tianjiaMoShi = "数据结构维护/添加数据项";
private String xiugaiMoShi = "数据结构维护/修改数据项";
private int id = 0;
private String idZFC = "id";
private String shujuzuKJMZFC = "ShuJuZuKJM";
private String shujuzuKJLXZFC = "ShuJuZuKJLX";
private String shujuxiangmingZFC = "ShuJuXiangMing";
private String shujuxiangKJMZFC = "ShuJuXiangKJM";
private String shujuxiangKJLXZFC = "ShuJuXiangKJLX";
private String zuidashuruchangduZFC = "ZuiDaShuRuChangDu";
private String zhiduZFC = "ZhiDu";
private String morenzhiZFC = "MoRenZhi";
private String xianshishunxuZFC = "XianShiShunXu";
private String xitongshujuZFC = "XiTongShuJu";
private System.Windows.Forms.TextBox TB_ShuJuZuLeiXing;
private System.Windows.Forms.ComboBox CB_KongJianLeiXing;
private System.Windows.Forms.TextBox TB_ShuJuZuMing;
private System.Windows.Forms.TextBox TB_MoRenZhi;
private clsXianKongZhi kongZhi = null;
#endregion
#region 保护方法区域
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region 私有方法区域
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.GB_XinXi = new System.Windows.Forms.GroupBox();
this.TB_ShuJuZuMing = new System.Windows.Forms.TextBox();
this.TB_MoRenZhi = new System.Windows.Forms.TextBox();
this.LB_MoRenZhi = new System.Windows.Forms.Label();
this.TB_XianShiShunXu = new System.Windows.Forms.TextBox();
this.LB_XianShiShunXu = new System.Windows.Forms.Label();
this.CB_ZhiDu = new System.Windows.Forms.CheckBox();
this.TB_ZuiDaShuRuChangDu = new System.Windows.Forms.TextBox();
this.LB_ZuiDaShuRuChangDu = new System.Windows.Forms.Label();
this.CB_KongJianLeiXing = new System.Windows.Forms.ComboBox();
this.LB_KongJianLeiXing = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.TB_ShuJuXiangBieMing = new System.Windows.Forms.TextBox();
this.LB_ShuJuXiangBieMing = new System.Windows.Forms.Label();
this.TB_ShuJuXiangMing = new System.Windows.Forms.TextBox();
this.LB_ShuJuXiangMing = new System.Windows.Forms.Label();
this.LB_ShuJuZu = new System.Windows.Forms.Label();
this.BT_QuXiao = new System.Windows.Forms.Button();
this.BT_QueDing = new System.Windows.Forms.Button();
this.BT_ShanChu = new System.Windows.Forms.Button();
this.TB_ShuJuZuLeiXing = new System.Windows.Forms.TextBox();
this.GB_XinXi.SuspendLayout();
this.SuspendLayout();
//
// GB_XinXi
//
this.GB_XinXi.Controls.Add(this.TB_ShuJuZuMing);
this.GB_XinXi.Controls.Add(this.TB_MoRenZhi);
this.GB_XinXi.Controls.Add(this.LB_MoRenZhi);
this.GB_XinXi.Controls.Add(this.TB_XianShiShunXu);
this.GB_XinXi.Controls.Add(this.LB_XianShiShunXu);
this.GB_XinXi.Controls.Add(this.CB_ZhiDu);
this.GB_XinXi.Controls.Add(this.TB_ZuiDaShuRuChangDu);
this.GB_XinXi.Controls.Add(this.LB_ZuiDaShuRuChangDu);
this.GB_XinXi.Controls.Add(this.CB_KongJianLeiXing);
this.GB_XinXi.Controls.Add(this.LB_KongJianLeiXing);
this.GB_XinXi.Controls.Add(this.groupBox1);
this.GB_XinXi.Controls.Add(this.TB_ShuJuXiangBieMing);
this.GB_XinXi.Controls.Add(this.LB_ShuJuXiangBieMing);
this.GB_XinXi.Controls.Add(this.TB_ShuJuXiangMing);
this.GB_XinXi.Controls.Add(this.LB_ShuJuXiangMing);
this.GB_XinXi.Controls.Add(this.LB_ShuJuZu);
this.GB_XinXi.Location = new System.Drawing.Point(8, 8);
this.GB_XinXi.Name = "GB_XinXi";
this.GB_XinXi.Size = new System.Drawing.Size(456, 184);
this.GB_XinXi.TabIndex = 0;
this.GB_XinXi.TabStop = false;
//
// TB_ShuJuZuMing
//
this.TB_ShuJuZuMing.Enabled = false;
this.TB_ShuJuZuMing.Location = new System.Drawing.Point(72, 16);
this.TB_ShuJuZuMing.MaxLength = 20;
this.TB_ShuJuZuMing.Name = "TB_ShuJuZuMing";
this.TB_ShuJuZuMing.Size = new System.Drawing.Size(136, 21);
this.TB_ShuJuZuMing.TabIndex = 17;
this.TB_ShuJuZuMing.Text = "";
//
// TB_MoRenZhi
//
this.TB_MoRenZhi.Location = new System.Drawing.Point(304, 120);
this.TB_MoRenZhi.MaxLength = 20;
this.TB_MoRenZhi.Name = "TB_MoRenZhi";
this.TB_MoRenZhi.Size = new System.Drawing.Size(136, 21);
this.TB_MoRenZhi.TabIndex = 16;
this.TB_MoRenZhi.Text = "";
//
// LB_MoRenZhi
//
this.LB_MoRenZhi.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_MoRenZhi.Location = new System.Drawing.Point(216, 120);
this.LB_MoRenZhi.Name = "LB_MoRenZhi";
this.LB_MoRenZhi.Size = new System.Drawing.Size(88, 21);
this.LB_MoRenZhi.TabIndex = 15;
this.LB_MoRenZhi.Text = "默认值";
this.LB_MoRenZhi.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// TB_XianShiShunXu
//
this.TB_XianShiShunXu.Location = new System.Drawing.Point(72, 120);
this.TB_XianShiShunXu.MaxLength = 20;
this.TB_XianShiShunXu.Name = "TB_XianShiShunXu";
this.TB_XianShiShunXu.Size = new System.Drawing.Size(136, 21);
this.TB_XianShiShunXu.TabIndex = 14;
this.TB_XianShiShunXu.Text = "";
//
// LB_XianShiShunXu
//
this.LB_XianShiShunXu.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_XianShiShunXu.Location = new System.Drawing.Point(8, 120);
this.LB_XianShiShunXu.Name = "LB_XianShiShunXu";
this.LB_XianShiShunXu.Size = new System.Drawing.Size(64, 21);
this.LB_XianShiShunXu.TabIndex = 13;
this.LB_XianShiShunXu.Text = "显示顺序";
this.LB_XianShiShunXu.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CB_ZhiDu
//
this.CB_ZhiDu.Location = new System.Drawing.Point(16, 152);
this.CB_ZhiDu.Name = "CB_ZhiDu";
this.CB_ZhiDu.TabIndex = 12;
this.CB_ZhiDu.Text = "是否只读";
//
// TB_ZuiDaShuRuChangDu
//
this.TB_ZuiDaShuRuChangDu.Location = new System.Drawing.Point(304, 88);
this.TB_ZuiDaShuRuChangDu.MaxLength = 20;
this.TB_ZuiDaShuRuChangDu.Name = "TB_ZuiDaShuRuChangDu";
this.TB_ZuiDaShuRuChangDu.Size = new System.Drawing.Size(136, 21);
this.TB_ZuiDaShuRuChangDu.TabIndex = 11;
this.TB_ZuiDaShuRuChangDu.Text = "";
//
// LB_ZuiDaShuRuChangDu
//
this.LB_ZuiDaShuRuChangDu.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_ZuiDaShuRuChangDu.Location = new System.Drawing.Point(216, 88);
this.LB_ZuiDaShuRuChangDu.Name = "LB_ZuiDaShuRuChangDu";
this.LB_ZuiDaShuRuChangDu.Size = new System.Drawing.Size(88, 21);
this.LB_ZuiDaShuRuChangDu.TabIndex = 10;
this.LB_ZuiDaShuRuChangDu.Text = "最大输入长度";
this.LB_ZuiDaShuRuChangDu.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CB_KongJianLeiXing
//
this.CB_KongJianLeiXing.ItemHeight = 12;
this.CB_KongJianLeiXing.Items.AddRange(new object[] {
"字符数据类型",
"日期数据类型",
"浮点数据类型",
"整形数据类型"});
this.CB_KongJianLeiXing.Location = new System.Drawing.Point(72, 88);
this.CB_KongJianLeiXing.Name = "CB_KongJianLeiXing";
this.CB_KongJianLeiXing.Size = new System.Drawing.Size(136, 20);
this.CB_KongJianLeiXing.TabIndex = 9;
this.CB_KongJianLeiXing.SelectedValueChanged += new System.EventHandler(this.CB_KongJianLeiXing_SelectedValueChanged);
//
// LB_KongJianLeiXing
//
this.LB_KongJianLeiXing.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_KongJianLeiXing.Location = new System.Drawing.Point(8, 88);
this.LB_KongJianLeiXing.Name = "LB_KongJianLeiXing";
this.LB_KongJianLeiXing.Size = new System.Drawing.Size(64, 21);
this.LB_KongJianLeiXing.TabIndex = 8;
this.LB_KongJianLeiXing.Text = "控件类型";
this.LB_KongJianLeiXing.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// groupBox1
//
this.groupBox1.Location = new System.Drawing.Point(8, 40);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(440, 8);
this.groupBox1.TabIndex = 7;
this.groupBox1.TabStop = false;
//
// TB_ShuJuXiangBieMing
//
this.TB_ShuJuXiangBieMing.Location = new System.Drawing.Point(304, 56);
this.TB_ShuJuXiangBieMing.MaxLength = 20;
this.TB_ShuJuXiangBieMing.Name = "TB_ShuJuXiangBieMing";
this.TB_ShuJuXiangBieMing.Size = new System.Drawing.Size(136, 21);
this.TB_ShuJuXiangBieMing.TabIndex = 6;
this.TB_ShuJuXiangBieMing.Text = "";
//
// LB_ShuJuXiangBieMing
//
this.LB_ShuJuXiangBieMing.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_ShuJuXiangBieMing.Location = new System.Drawing.Point(216, 56);
this.LB_ShuJuXiangBieMing.Name = "LB_ShuJuXiangBieMing";
this.LB_ShuJuXiangBieMing.Size = new System.Drawing.Size(88, 21);
this.LB_ShuJuXiangBieMing.TabIndex = 5;
this.LB_ShuJuXiangBieMing.Text = "数据项别名";
this.LB_ShuJuXiangBieMing.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// TB_ShuJuXiangMing
//
this.TB_ShuJuXiangMing.Location = new System.Drawing.Point(72, 56);
this.TB_ShuJuXiangMing.MaxLength = 20;
this.TB_ShuJuXiangMing.Name = "TB_ShuJuXiangMing";
this.TB_ShuJuXiangMing.Size = new System.Drawing.Size(136, 21);
this.TB_ShuJuXiangMing.TabIndex = 4;
this.TB_ShuJuXiangMing.Text = "";
//
// LB_ShuJuXiangMing
//
this.LB_ShuJuXiangMing.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_ShuJuXiangMing.Location = new System.Drawing.Point(8, 56);
this.LB_ShuJuXiangMing.Name = "LB_ShuJuXiangMing";
this.LB_ShuJuXiangMing.Size = new System.Drawing.Size(64, 21);
this.LB_ShuJuXiangMing.TabIndex = 3;
this.LB_ShuJuXiangMing.Text = "数据项名";
this.LB_ShuJuXiangMing.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// LB_ShuJuZu
//
this.LB_ShuJuZu.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.LB_ShuJuZu.Location = new System.Drawing.Point(8, 16);
this.LB_ShuJuZu.Name = "LB_ShuJuZu";
this.LB_ShuJuZu.Size = new System.Drawing.Size(64, 21);
this.LB_ShuJuZu.TabIndex = 1;
this.LB_ShuJuZu.Text = "数据组";
this.LB_ShuJuZu.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// BT_QuXiao
//
this.BT_QuXiao.Location = new System.Drawing.Point(376, 200);
this.BT_QuXiao.Name = "BT_QuXiao";
this.BT_QuXiao.TabIndex = 10;
this.BT_QuXiao.Text = "取消";
this.BT_QuXiao.Click += new System.EventHandler(this.BT_QuXiao_Click);
//
// BT_QueDing
//
this.BT_QueDing.Location = new System.Drawing.Point(216, 200);
this.BT_QueDing.Name = "BT_QueDing";
this.BT_QueDing.Size = new System.Drawing.Size(72, 23);
this.BT_QueDing.TabIndex = 9;
this.BT_QueDing.Text = "确定";
this.BT_QueDing.Click += new System.EventHandler(this.BT_QueDing_Click);
//
// BT_ShanChu
//
this.BT_ShanChu.Location = new System.Drawing.Point(296, 200);
this.BT_ShanChu.Name = "BT_ShanChu";
this.BT_ShanChu.TabIndex = 8;
this.BT_ShanChu.Text = "删除";
this.BT_ShanChu.Click += new System.EventHandler(this.BT_ShanChu_Click);
//
// TB_ShuJuZuLeiXing
//
this.TB_ShuJuZuLeiXing.Location = new System.Drawing.Point(72, 88);
this.TB_ShuJuZuLeiXing.MaxLength = 20;
this.TB_ShuJuZuLeiXing.Name = "TB_ShuJuZuLeiXing";
this.TB_ShuJuZuLeiXing.Size = new System.Drawing.Size(136, 21);
this.TB_ShuJuZuLeiXing.TabIndex = 17;
this.TB_ShuJuZuLeiXing.Text = "";
//
// PeiZhiWeiHuForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(472, 229);
this.Controls.Add(this.BT_QuXiao);
this.Controls.Add(this.BT_QueDing);
this.Controls.Add(this.BT_ShanChu);
this.Controls.Add(this.GB_XinXi);
this.Location = new System.Drawing.Point(450, 400);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(480, 256);
this.MinimumSize = new System.Drawing.Size(480, 256);
this.Name = "PeiZhiWeiHuForm";
this.GB_XinXi.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 获得相应的数据
/// </summary>
/// <param name="ShuJuJian">数据种类键值</param>
/// <returns>数据</returns>
private String HuoDeShuJu(Hashtable ShuJu,string ShuJuJian)
{
//是否有该键值
if(!ShuJu.ContainsKey(ShuJuJian))
{
return null;
}
//获得相应的值
IDictionaryEnumerator jiHe = ShuJu.GetEnumerator();
while ( jiHe.MoveNext() )
{
if(jiHe.Key.Equals(ShuJuJian) )
{
break;
}
}
//返回数据
return (jiHe.Value.ToString() );
}
/// <summary>
/// 数据合法性检测
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -