第一范文网 - 专业文章范例文档资料分享平台

Hxj.Data 数据库组件文档

来源:用户分享 时间:2025/5/16 7:58:22 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

目前支持Sql2000\\2005,MsAccess,Oracle,SQLite,MySQL,如有需要可再扩展。

数据库实体生成的代码Northwind数据库中Products表:

//------------------------------------------------------------------------------ // // 此代码由工具生成。

// 运行时版本:2.0.50727.4200 //

// 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 //

//------------------------------------------------------------------------------

using System; using System.Data;

using System.Data.Common; using Hxj.Data;

using Hxj.Data.Common;

namespace Hxj.Model {

///

/// 实体类Products 。(属性说明自动提取数据库字段的描述信息) ///

[Serializable]

public class Products : Entity {

public Products():base(\) {}

#region Model

private int _ProductID; private string _ProductName; private int? _SupplierID; private int? _CategoryID;

private string _QuantityPerUnit; private decimal? _UnitPrice; private int? _UnitsInStock; private int? _UnitsOnOrder; private int? _ReorderLevel; private bool _Discontinued; ///

///

5

///

public int ProductID {

get{ return _ProductID; } set {

this.OnPropertyValueChange(_.ProductID,_ProductID,value); this._ProductID=value; } }

///

///

///

public string ProductName {

get{ return _ProductName; } set {

this.OnPropertyValueChange(_.ProductName,_ProductName,value); this._ProductName=value; } }

///

///

///

public int? SupplierID {

get{ return _SupplierID; } set {

this.OnPropertyValueChange(_.SupplierID,_SupplierID,value); this._SupplierID=value; } }

///

///

///

public int? CategoryID {

get{ return _CategoryID; } set {

this.OnPropertyValueChange(_.CategoryID,_CategoryID,value); this._CategoryID=value;

6

} }

///

///

///

public string QuantityPerUnit {

get{ return _QuantityPerUnit; } set {

this.OnPropertyValueChange(_.QuantityPerUnit,_QuantityPerUnit,value); this._QuantityPerUnit=value; } }

///

///

///

public decimal? UnitPrice {

get{ return _UnitPrice; } set {

this.OnPropertyValueChange(_.UnitPrice,_UnitPrice,value); this._UnitPrice=value; } }

///

///

///

public int? UnitsInStock {

get{ return _UnitsInStock; } set {

this.OnPropertyValueChange(_.UnitsInStock,_UnitsInStock,value); this._UnitsInStock=value; } }

///

///

///

public int? UnitsOnOrder {

get{ return _UnitsOnOrder; }

7

set {

this.OnPropertyValueChange(_.UnitsOnOrder,_UnitsOnOrder,value); this._UnitsOnOrder=value; } }

///

///

///

public int? ReorderLevel {

get{ return _ReorderLevel; } set {

this.OnPropertyValueChange(_.ReorderLevel,_ReorderLevel,value); this._ReorderLevel=value; } }

///

///

///

public bool Discontinued {

get{ return _Discontinued; } set {

this.OnPropertyValueChange(_.Discontinued,_Discontinued,value); this._Discontinued=value; } }

#endregion

#region Method ///

/// 获取实体中的标识列 ///

public override Field GetIdentityField() {

return _.ProductID; }

///

/// 获取实体中的主键列 ///

public override Field[] GetPrimaryKeyFields()

8

搜索更多关于: Hxj.Data 数据库组件文档 的文档
Hxj.Data 数据库组件文档.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c13kcf3awwh2nsft0jg4x_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top