日期:2013-02-21  浏览次数:20467 次

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using com.prm.client.tools;
using System.Data.OracleClient;
using com.prm.client.common;
using com.prm.client.sysmanager.popedom;

namespace com.prm.client.forms
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class SM_FunctionMaintenance : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TreeView trv_Function;
private System.Windows.Forms.Label lbl_Detail;
private System.Windows.Forms.Label lbl_BelongTo;
private System.Windows.Forms.Label lbl_FunEntity;
private System.Windows.Forms.Label lbl_Type;
private System.Windows.Forms.Label lbl_IsInterface;
private System.Windows.Forms.Label lbl_Tag;
private System.Windows.Forms.Label lbl_Name;
private System.Windows.Forms.CheckBox ckb_IsInterface;
private System.Windows.Forms.ComboBox cbo_Type;
private System.Windows.Forms.TextBox txt_Detail;
private System.Windows.Forms.TextBox txt_BelongTo;
private System.Windows.Forms.TextBox txt_FunEntity;
private System.Windows.Forms.TextBox txt_Tag;
private System.Windows.Forms.TextBox txt_Name;
private System.Data.DataSet dataSet1;
private System.Data.DataColumn dataColumn1;
private System.Data.DataColumn dataColumn2;
private System.Data.DataColumn dataColumn3;
private System.Data.DataColumn dataColumn4;
private System.Data.DataColumn dataColumn5;
private System.Data.DataColumn dataColumn6;
private System.Data.DataColumn dataColumn7;
private System.Data.DataColumn dataColumn8;
private System.Data.DataColumn dataColumn9;
private System.Data.DataColumn dataColumn10;
private System.Data.DataColumn dataColumn11;
//用来保存功能表中所有的数据
private System.Data.DataTable funcDataTable;

//用来保存Connection属性
private OracleConnection funcTableConn;
//用来保存数字字典功能类别的数据
ClientDictionary[] DIC_funcType;
//用来保存树总的虚拟根节点的ID,默认为0
public const string ROOT_NODE_VALUE = "0";
private System.Windows.Forms.Button btn_Help;
private System.Windows.Forms.Button btn_Remove;
private System.Windows.Forms.Button btn_Modify;
private System.Windows.Forms.Button btn_AddSon;
private System.Windows.Forms.Button btn_AddRoot;
private System.Windows.Forms.Button btn_Close;



//树结点的临时信息
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public SM_FunctionMaintenance(SM_Popedom popedom)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();

//生成类DataAccessObject的实例,并保存连接属性
DataAccessObject funcTableAccessObject=new DataAccessObject();
funcTableConn=funcTableAccessObject.Connection;
//调用QueryAllFuncInfo过程来对变量funcDataTable进行赋值
QueryAllFuncInfo();
const string VALUEMEMBER="valueMember",DISPLAYMEMBER="displayMember",NULLTEXT="";
//调用QueryFuncTypeDictionary过程来对变量DIC_funcType进行赋值
QueryFuncTypeDictionary();
cbo_Type.DataSource = DIC_funcType;
cbo_Type.ValueMember = VALUEMEMBER;
cbo_Type.DisplayMember = DISPLAYMEMBER;
}

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修