您的位置:首页 >> 编程开发 >> .NET >> C# >> 正文
RSS
 

『原创』C#中TreeView类操作全攻略:建立树,新增节点,删除节点,修改节点,拖动节点,与Oracle数据库交互…

http://www.rdxx.com 04年03月05日 09:14 互连网 我要投稿

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;


namespace com.prm.client.forms
{
 /// <summary>
 /// SM_AddNewFunction 的摘要说明。
 /// </summary>
 public class SM_AddNewFunction: System.Windows.Forms.Form
 {
  private System.Windows.Forms.Label lbl_Name;
  private System.Windows.Forms.TextBox txt_Name;
  private System.Windows.Forms.Label lbl_Tag;
  private System.Windows.Forms.TextBox txt_Tag;
  private System.Windows.Forms.CheckBox ckb_IsInterface;
  private System.Windows.Forms.Label lbl_IsInterface;
  private System.Windows.Forms.Label lbl_Type;
  private System.Windows.Forms.Label lbl_FunEntity;
  private System.Windows.Forms.ComboBox cbo_Type;
  private System.Windows.Forms.TextBox txt_FunEntity;
  private System.Windows.Forms.Label lbl_BelongTo;
  private System.Windows.Forms.TextBox txt_BelongTo;
  private System.Windows.Forms.TextBox txt_Detail;
  private System.Windows.Forms.Label lbl_Detail;
  private System.Windows.Forms.Button btn_Confirm;
  private System.Windows.Forms.Button btn_Cancel;
  private System.Windows.Forms.Button btn_Help;


  
  //用来保存数字字典功能类别的数据
  ClientDictionary[] DIC_funcType;
  //用来保存Connection属性
  private OracleConnection funcTableConn;
  //用来保存新增加的记录的主键(功能ID)
  private long newFuncID;
  //只读属性,用来读取新增加的记录的主键(功能ID)
  //public long NewFuncID {get {return newFuncID;}}
  //用来保存新增加的功能记录
  private FunctionTable newFuncItem;
  public FunctionTable NewFuncItem {get {return newFuncItem;}}


  /// <summary>
  /// 必需的设计器变量。
  /// </summary>
  private System.ComponentModel.Container components = null;
  
  /// <summary>
  /// 构造函数,通过参数dic_funcType对窗口进行初始化值,通过参数fatherID得到
  /// 新增加的功能的上级功能ID
  /// </summary>
  public SM_AddNewFunction(long fatherID,ClientDictionary[] dic_funcType)
  {
   //
   // Windows 窗体设计器支持所必需的
   //
   InitializeComponent();
   newFuncItem=new FunctionTable();
   newFuncItem.funcFatherID=fatherID;
   //初始化ID为-1,如果新增成功则将重新赋值
   newFuncItem.funcID=-1; 
   DIC_funcType=dic_funcType;
   const string VALUEMEMBER="valueMember",DISPLAYMEMBER="displayMember",NULLTEXT="";
   cbo_Type.DataSource = DIC_funcType;
   cbo_Type.ValueMember = VALUEMEMBER;

9 7 3 1 2 3 4 5 6 7 4 8 :

 
 
标签: 拖动 , 删除 , 全攻略 , 交互 , TreeView , Oracle数据库 , C# , , 操作 , IE , 数据 , Oracle , 攻略 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站