首页 > 代码库 > ORM Study 2 - Entity
ORM Study 2 - Entity
using System;using System.IO;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager{ [Serializable] [Table(Name = "OA_T_OrderForm")] public class OrderForm { private string _attachmentName = null; private string _attachmentUrl = null; private DateTime _completeTime = DateTime.Now; private string _correlationCompany = null; private DateTime _createFormDate = DateTime.Now; private string _createUserID = null; private string _joinUserXML = null; private string _orderContent = null; private DateTime _orderFormDate = DateTime.Now; private string _orderFormID = null; private string _orderFormNo = null; private int _orderFormOrder = 0; private string _projectID = null; private int _urgencyDegree = 0; [Column] public string AttachmentName { get { return this._attachmentName; } set { this._attachmentName = value; } } public string AttachmentURL { get { return this._attachmentUrl; } set { this._attachmentUrl = value; this.AttachmentName = Path.GetFileName(this._attachmentUrl); } } [Column] public DateTime CompleteTime { get { return this._completeTime; } set { this._completeTime = value; } } [Column] public string CorrelationCompany { get { return this._correlationCompany; } set { this._correlationCompany = value; } } [Column] public DateTime CreateFormDate { get { return this._createFormDate; } set { this._createFormDate = value; } } [Column] public string CreateUserID { get { return this._createUserID; } set { this._createUserID = value; } } public string FormTypeID { get { return "21"; } } [Column] public string JoinUserXML { get { return this._joinUserXML; } set { this._joinUserXML = value; } } [Column] public string OrderContent { get { return this._orderContent; } set { this._orderContent = value; } } [Column] public DateTime OrderFormDate { get { return this._orderFormDate; } set { this._orderFormDate = value; } } [Id] public string OrderFormID { get { return this._orderFormID; } set { this._orderFormID = value; } } [Column] public string OrderFormNo { get { return this._orderFormNo; } set { this._orderFormNo = value; } } [Column] public int OrderFormOrder { get { return this._orderFormOrder; } set { this._orderFormOrder = value; } } [Column] public string ProjectID { get { return this._projectID; } set { this._projectID = value; } } [Column] public int UrgencyDegree { get { return this._urgencyDegree; } set { this._urgencyDegree = value; } } }}
using System;using System.IO;using Entity.FormManager;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager{ [Serializable] [Table(Name = "OA_T_WorkManeuveForm")] public class WorkManeuveForm { private string _attachmentName = null; private string _attachmentUrl = null; private DateTime _completeTime = DateTime.Now; private string _correlationCompany = null; private DateTime _createFormDate = DateTime.Now; private string _createUserID = null; private string _joinUserXML = null; private string _maneuveContent = null; private DateTime _maneuveFormDate = DateTime.Now; private string _maneuveFormID = null; private string _maneuveFormNo = null; private int _maneuveFormOrder = 0; private string _projectID = null; private int _urgencyDegree = 0; [Column] public string AttachmentName { get { return this._attachmentName; } set { this._attachmentName = value; } } public string AttachmentURL { get { return this._attachmentUrl; } set { this._attachmentUrl = value; this.AttachmentName = Path.GetFileName(this._attachmentUrl); } } [Column] public DateTime CompleteTime { get { return this._completeTime; } set { this._completeTime = value; } } [Column] public string CorrelationCompany { get { return this._correlationCompany; } set { this._correlationCompany = value; } } [Column] public DateTime CreateFormDate { get { return this._createFormDate; } set { this._createFormDate = value; } } [Column] public string CreateUserID { get { return this._createUserID; } set { this._createUserID = value; } } public string FormTypeID { get { return "22"; } } [Column] public string JoinUserXML { get { return this._joinUserXML; } set { this._joinUserXML = value; } } [Column] public string ManeuveContent { get { return this._maneuveContent; } set { this._maneuveContent = value; } } [Column] public DateTime ManeuveFormDate { get { return this._maneuveFormDate; } set { this._maneuveFormDate = value; } } [Id(Name = "ManeuveFormID")] public string ManeuveFormID { get { return this._maneuveFormID; } set { this._maneuveFormID = value; } } [Column] public string ManeuveFormNo { get { return this._maneuveFormNo; } set { this._maneuveFormNo = value; } } [Column] public int ManeuveFormOrder { get { return this._maneuveFormOrder; } set { this._maneuveFormOrder = value; } } [Column] public string ProjectID { get { return this._projectID; } set { this._projectID = value; } } [Column] public int UrgencyDegree { get { return this._urgencyDegree; } set { this._urgencyDegree = value; } } }}
using System;using System.IO;using System.Collections;using Global.Utils.ORM.CustomAttributes;namespace Entity.TimeCardManager{ [Serializable] [Table(Name = "OA_T_BeLateMonthRPT")] public class LateInfo { private string _bLMonthRPTID = null; private IList _detailList = null; private string _rPTAuditDate = null; private string _rPTAuditUser = null; private string _rPTCreateDate = null; private string _rPTCreateUser = null; private string _rPTMonth = null; private LateStatStatus _rPTStatus = LateStatStatus.NotAudit; private string _rPTYear = null; [Id] public string BLMonthRPTID { get { return this._bLMonthRPTID; } set { this._bLMonthRPTID = value; } } public IList DetailList { get { return this._detailList; } set { this._detailList = value; } } [Column] public string RPTAuditDate { get { return this._rPTAuditDate; } set { this._rPTAuditDate = value; } } [Column] public string RPTAuditUser { get { return this._rPTAuditUser; } set { this._rPTAuditUser = value; } } [Column] public string RPTCreateDate { get { return this._rPTCreateDate; } set { this._rPTCreateDate = value; } } [Column] public string RPTCreateUser { get { return this._rPTCreateUser; } set { this._rPTCreateUser = value; } } [Column] public string RPTMonth { get { return this._rPTMonth; } set { this._rPTMonth = value; } } [Column] public LateStatStatus RPTStatus { get { return this._rPTStatus; } set { this._rPTStatus = value; } } [Column] public string RPTYear { get { return this._rPTYear; } set { this._rPTYear = value; } } }}
using System;using System.IO;using System.Collections;using Global.Utils.ORM.CustomAttributes;namespace Entity.TimeCardManager{ [Serializable] [Table(Name = "OA_T_BeLateMonthRPT")] public class LateInfoDetail { private string _bLMonthRPTID = null; private double _bLNumberONFifteen = 0.0; private double _bLNumberOutFifteen = 0.0; private double _bLNumberTotal = 0.0; private double _bLTimeONFifteen = 0.0; private double _bLTimeOutFifteen = 0.0; private double _bLTimeTotal = 0.0; private string _detailID = null; private short _isSendWarning = 0; private short _sendWarningStatus = 0; private string _unitName = null; private string _userID = null; private string _userName = null; private double _workDays = 0.0; [Column] public string BLMonthRPTID { get { return this._bLMonthRPTID; } set { this._bLMonthRPTID = value; } } [Column] public double BLNumberONFifteen { get { return this._bLNumberONFifteen; } set { this._bLNumberONFifteen = value; } } [Column] public double BLNumberOutFifteen { get { return this._bLNumberOutFifteen; } set { this._bLNumberOutFifteen = value; } } [Column] public double BLNumberTotal { get { return this._bLNumberTotal; } set { this._bLNumberTotal = value; } } [Column] public double BLTimeONFifteen { get { return this._bLTimeONFifteen; } set { this._bLTimeONFifteen = value; } } [Column] public double BLTimeOutFifteen { get { return this._bLTimeOutFifteen; } set { this._bLTimeOutFifteen = value; } } [Column] public double BLTimeTotal { get { return this._bLTimeTotal; } set { this._bLTimeTotal = value; } } [Id] public string DetailID { get { return this._detailID; } set { this._detailID = value; } } [Column] public short isSendWarning { get { return this._isSendWarning; } set { this._isSendWarning = value; } } [Column] public short SendWarningStatus { get { return this._sendWarningStatus; } set { this._sendWarningStatus = value; } } [Column] public string UnitName { get { return this._unitName; } set { this._unitName = value; } } [Column] public string UserID { get { return this._userID; } set { this._userID = value; } } [Column] public string UserName { get { return this._userName; } set { this._userName = value; } } [Column] public double WorkDays { get { return this._workDays; } set { this._workDays = value; } } }}
using System;using System.IO;using System.Collections;using Global.Utils.ORM.CustomAttributes;namespace Entity.TimeCardManager{ [Serializable] [Table(Name = "OA_T_OvertimeMonthRPT")] public class OverTimeInfo { private IList _detailList = null; private string _oTMonthRPTID = null; private string _rPTAuditDate = null; private string _rPTAuditUser = null; private string _rPTCreateDate = null; private string _rPTCreateUser = null; private string _rPTEndDate = null; private string _rPTMonth = null; private OverTimeStatStatus _rPTStatus = OverTimeStatStatus.NotAudit; private string _rPTYear = null; public IList DetailList { get { return this._detailList; } set { this._detailList = value; } } [Id] public string OTMonthRPTID { get { return this._oTMonthRPTID; } set { this._oTMonthRPTID = value; } } [Column] public string RPTAuditDate { get { return this._rPTAuditDate; } set { this._rPTAuditDate = value; } } [Column] public string RPTAuditUser { get { return this._rPTAuditUser; } set { this._rPTAuditUser = value; } } [Column] public string RPTCreateDate { get { return this._rPTCreateDate; } set { this._rPTCreateDate = value; } } [Column] public string RPTCreateUser { get { return this._rPTCreateUser; } set { this._rPTCreateUser = value; } } [Column] public string RPTEndDate { get { return this._rPTEndDate; } set { this._rPTEndDate = value; } } [Column] public string RPTMonth { get { return this._rPTMonth; } set { this._rPTMonth = value; } } [Column] public OverTimeStatStatus RPTStatus { get { return this._rPTStatus; } set { this._rPTStatus = value; } } [Column] public string RPTYear { get { return this._rPTYear; } set { this._rPTYear = value; } } }}
using System;using System.IO;using System.Collections;using Global.Utils.ORM.CustomAttributes;namespace Entity.TimeCardManager{ [Serializable] [Table(Name = "OA_T_OvertimeMonthRPTDetail")] public class OverTimeInfoDetail { private string _detailID = null; private double _furloughTimeTotal = 0.0; private double _lastOTTime = 0.0; private double _leaveOTTime = 0.0; private string _oTMonthRPTID = null; private double _oTTimeTotal = 0.0; private double _returnMoneyTime = 0.0; private string _unitName = null; private string _userID = null; private string _userName = null; [Id] public string DetailID { get { return this._detailID; } set { this._detailID = value; } } [Column] public double FurloughTimeTotal { get { return this._furloughTimeTotal; } set { this._furloughTimeTotal = value; } } [Column] public double LastOTTime { get { return this._lastOTTime; } set { this._lastOTTime = value; } } [Column] public double LeaveOTTime { get { return this._leaveOTTime; } set { this._leaveOTTime = value; } } [Column] public string OTMonthRPTID { get { return this._oTMonthRPTID; } set { this._oTMonthRPTID = value; } } [Column] public double OTTimeTotal { get { return this._oTTimeTotal; } set { this._oTTimeTotal = value; } } [Column] public double ReturnMoneyTime { get { return this._returnMoneyTime; } set { this._returnMoneyTime = value; } } [Column] public string UnitName { get { return this._unitName; } set { this._unitName = value; } } [Column] public string UserID { get { return this._userID; } set { this._userID = value; } } [Column] public string UserName { get { return this._userName; } set { this._userName = value; } } }}
using System;using System.IO;using Global.Utils.ORM.CustomAttributes;namespace Entity.TimeCardManager{ [Serializable] [Table(Name = "OA_YearFurlough")] public class YearFurlough { private string _pFEndDate = string.Empty; private string _pFMount = string.Empty; private string _pFStartDate = string.Empty; private string _surplusMount = string.Empty; private string _tFEndDate = string.Empty; private string _tFMount = string.Empty; private string _tFStartDate = string.Empty; private string _unitName = string.Empty; private string _userID = string.Empty; private string _userName = string.Empty; private string _yearWord = string.Empty; private DateTime _yFEditDate = DateTime.Now; private string _yFEditUserID = string.Empty; private string _yFID = string.Empty; [Column] public string PFEndDate { get { return this._pFEndDate; } set { this._pFEndDate = value; } } [Column] public string PFMount { get { return this._pFMount; } set { this._pFMount = value; } } [Column] public string PFStartDate { get { return this._pFStartDate; } set { this._pFStartDate = value; } } [Column] public string SurplusMount { get { return this._surplusMount; } set { this._surplusMount = value; } } [Column] public string TFEndDate { get { return this._tFEndDate; } set { this._tFEndDate = value; } } [Column] public string TFMount { get { return this._tFMount; } set { this._tFMount = value; } } [Column] public string TFStartDate { get { return this._tFStartDate; } set { this._tFStartDate = value; } } [Column] public string UnitName { get { return this._unitName; } set { this._unitName = value; } } [Column] public string UserID { get { return this._userID; } set { this._userID = value; } } [Column] public string UserName { get { return this._userName; } set { this._userName = value; } } [Column] public string YearWord { get { return this._yearWord; } set { this._yearWord = value; } } [Column] public DateTime YFEditDate { get { return this._yFEditDate; } set { this._yFEditDate = value; } } [Column] public string YFEditUserID { get { return this._yFEditUserID; } set { this._yFEditUserID = value; } } [Id] public string YFID { get { return this._yFID; } set { this._yFID = value; } } }}
using System;using Global.Utils.ORM.CustomAttributes;namespace Entity{ [Serializable] [Table(Name = "OA_F_HistroyAccounts")] public class HistoryAccounts { private DateTime _endDate = DateTime.Now; private decimal _finnalIncome = 0M; private decimal _finnalOutput = 0M; private int _historyAccountsID = 0; private decimal _initialIncome = 0M; private decimal _initialOutput = 0M; private DateTime _startDate = DateTime.Now; [Column] public DateTime EndDate { get { return this._endDate; } set { this._endDate = value; } } [Column] public decimal FinnalIncome { get { return this._finnalIncome; } set { this._finnalIncome = value; } } [Column] public decimal FinnalOutput { get { return this._finnalOutput; } set { this._finnalOutput = value; } } [Id(Strategy = GenerationType.INDENTITY)] public int HistoryAccountsID { get { return this._historyAccountsID; } set { this._historyAccountsID = value; } } [Column] public decimal InitialIncome { get { return this._initialIncome; } set { this._initialIncome = value; } } [Column] public decimal InitialOutput { get { return this._initialOutput; } set { this._initialOutput = value; } } [Column] public DateTime StartDate { get { return this._startDate; } set { this._startDate = value; } } }}
using System;using Global.Utils.ORM.CustomAttributes;namespace Entity{ [Serializable] [Table(Name = "OA_Project_ChargeUp")] public class ChargeUpInfo { private string _account = null; private DateTime _chargeUpDate = DateTime.Now; private int _chargeUpID = 0; private string _company = null; private string _currency = null; private string _description = null; private string _endUpDate; private string _formNo = null; private string _formType = null; private string _fund = null; private decimal _income = 0M; private decimal _outputMoney = 0M; private string _startDate; private string _userID = null; [Column] public string Account { get { return this._account; } set { this._account = value; } } [Column] public DateTime ChargeUpDate { get { return this._chargeUpDate; } set { this._chargeUpDate = value; } } [Id(Strategy = GenerationType.INDENTITY)] public int ChargeUpID { get { return this._chargeUpID; } set { this._chargeUpID = value; } } [Column] public string Company { get { return this._company; } set { this._company = value; } } [Column] public string Currency { get { return this._currency; } set { this._currency = value; } } [Column] public string Description { get { return this._description; } set { this._description = value; } } [Column] public string EndDate { get { return this._endUpDate; } set { this._endUpDate = value; } } [Column] public string FormNo { get { return this._formNo; } set { this._formNo = value; } } [Column] public string FormType { get { return this._formType; } set { this._formType = value; } } [Column] public string Fund { get { return this._fund; } set { this._fund = value; } } [Column] public decimal Income { get { return this._income; } set { this._income = value; } } [Column] public decimal OutputMoney { get { return this._outputMoney; } set { this._outputMoney = value; } } [Column] public string StartDate { get { return this._startDate; } set { this._startDate = value; } } [Column] public string UserID { get { return this._userID; } set { this._userID = value; } } }}
Attributes in Visual Designer
Add .NET or custom attributes to any persistent property or persistent class in your Domain Model so it becomes a part of the regular code generation. You’ll never again have to add code manually.
Use either a convenient Visual Designer dialog for a single attribute placement or a powerful Model Operation to generate attributes for multiple classes or properties at the same time.
Bulk Select Based on a List of Keys
The new GetObjectsByKeys method will enable you to select multiple objects of the same type with a single batch, using the identity of the type as a key. This compares to callingGetObjectByKeys numerous times. It can yield significantly better performance, depending on the number of retrieved objects.
Oracle Managed Driver Support
Responding to your many requests in our Ideas & Feedback Portal, Telerik Data Access is now compatible and tested with the ODP.NET Managed Driver, and you can choose to use it in your Oracle-based data layers. It offers a simplified deployment scenario with just one assembly, side by side with other versions of ODP.NET.