⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 views.smark.cs

📁 smark.data是基于C#开发的轻量级数据访问组件。 提供以下功能封: 1)提供了跨数据库类型操作能力 2)基于程线存储的数据访问上下文对象
💻 CS
📖 第 1 页 / 共 2 页
字号:
                this.EmployeeID = ((int)(this.Convert(typeof(int), reader["_EmployeeID"])));
            }
            if ((reader["_EmployeeName"] != System.DBNull.Value)) {
                this.EmployeeName = ((string)(this.Convert(typeof(string), reader["_EmployeeName"])));
            }
        }
    }
    
    /// <summary>
    /// Smark.Data.VSGenerator Copyright 泥水佬
    /// Email:henryfan@msn.com
    /// MappingTable: orders o inner join customers c on o.customerid=c.customerid
    /// 
    /// </summary>
    [Serializable()]
    public partial class OrderByCustomer : EntityBase {
        
        private int mOrders;
        
        public static FieldInfo orders = new FieldInfo(" orders o inner join customers c on o.customerid=c.customerid", "*");
        
        private string mCustomerID;
        
        public static FieldInfo customerID = new FieldInfo(" orders o inner join customers c on o.customerid=c.customerid", "c.Customerid");
        
        private string mCompanyName;
        
        public static FieldInfo companyName = new FieldInfo(" orders o inner join customers c on o.customerid=c.customerid", "CompanyName");
        
        static string mSelectString = "Select (Count(*)) as _Orders,(c.Customerid) as _CustomerID,(CompanyName) as _Comp" +
            "anyName from  orders o inner join customers c on o.customerid=c.customerid";
        
        static string mGroupString = "(c.Customerid),(CompanyName)";
        
        /// <summary>
        /// 
        /// </summary>
        public virtual int Orders {
            get {
                return this.mOrders;
            }
            set {
                this.mOrders = value;
                this.EntityState.FieldChange("*");
            }
        }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual string CustomerID {
            get {
                return this.mCustomerID;
            }
            set {
                this.mCustomerID = value;
                this.EntityState.FieldChange("c.Customerid");
            }
        }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual string CompanyName {
            get {
                return this.mCompanyName;
            }
            set {
                this.mCompanyName = value;
                this.EntityState.FieldChange("CompanyName");
            }
        }
        
        public static string Table {
            get {
                return "  orders o inner join customers c on o.customerid=c.customerid ";
            }
        }
        
        public static System.Collections.Generic.IList<OrderByCustomer> List(IConnectinContext context, Expression expression, Region region, string OrderBy) {
            return EntityBase.OnList<OrderByCustomer>(context, OrderByCustomer.mSelectString, expression, region, OrderBy, OrderByCustomer.mGroupString);
        }
        
        public static System.Collections.Generic.IList<OrderByCustomer> List(IConnectinContext context, Expression expression) {
            return OrderByCustomer.List(context, expression, null, null);
        }
        
        public static System.Collections.Generic.IList<OrderByCustomer> List(Expression expression, Region region, string OrderBy) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.List(_context, expression, region, OrderBy);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static System.Collections.Generic.IList<OrderByCustomer> List(Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.List(_context, expression, null, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static OrderByCustomer ListFirst(IConnectinContext context, Expression expression, string OrderBy) {
            return EntityBase.OnListFirst<OrderByCustomer>(context, OrderByCustomer.mSelectString, expression, OrderBy, OrderByCustomer.mGroupString);
        }
        
        public static OrderByCustomer ListFirst(IConnectinContext context, Expression expression) {
            return OrderByCustomer.ListFirst(context, expression);
        }
        
        public static OrderByCustomer ListFirst(Expression expression, string OrderBy) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.ListFirst(_context, expression, OrderBy);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static OrderByCustomer ListFirst(Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.ListFirst(_context, expression, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static int Count(IConnectinContext context, Expression expression) {
            return EntityBase.OnCount(context, " orders o inner join customers c on o.customerid=c.customerid", expression, OrderByCustomer.mGroupString);
        }
        
        public static int Count(Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.Count(_context, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object AVG(IConnectinContext context, string field, bool DISTINCT, Expression expression) {
            return EntityBase.OnAggregation(context, " orders o inner join customers c on o.customerid=c.customerid", "AVG", field, DISTINCT, expression, OrderByCustomer.mGroupString);
        }
        
        public static object AVG(IConnectinContext context, string field, Expression expression) {
            return OrderByCustomer.AVG(context, field, false, expression);
        }
        
        public static object AVG(IConnectinContext context, string field) {
            return OrderByCustomer.AVG(context, field, false, null);
        }
        
        public static object AVG(IConnectinContext context, string field, bool DISTINCT) {
            return OrderByCustomer.AVG(context, field, DISTINCT, null);
        }
        
        public static object AVG(string field, bool DISTINCT, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.AVG(_context, field, DISTINCT, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object AVG(string field, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.AVG(_context, field, false, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object AVG(string field) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.AVG(_context, field, false, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object AVG(string field, bool DISTINCT) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.AVG(_context, field, DISTINCT, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object SUM(IConnectinContext context, string field, bool DISTINCT, Expression expression) {
            return EntityBase.OnAggregation(context, " orders o inner join customers c on o.customerid=c.customerid", "SUM", field, DISTINCT, expression, OrderByCustomer.mGroupString);
        }
        
        public static object SUM(IConnectinContext context, string field, Expression expression) {
            return OrderByCustomer.SUM(context, field, false, expression);
        }
        
        public static object SUM(IConnectinContext context, string field) {
            return OrderByCustomer.SUM(context, field, false, null);
        }
        
        public static object SUM(IConnectinContext context, string field, bool DISTINCT) {
            return OrderByCustomer.SUM(context, field, DISTINCT, null);
        }
        
        public static object SUM(string field, bool DISTINCT, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.SUM(_context, field, DISTINCT, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object SUM(string field, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.SUM(_context, field, false, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object SUM(string field) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.SUM(_context, field, false, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object SUM(string field, bool DISTINCT) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.SUM(_context, field, DISTINCT, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object MAX(IConnectinContext context, string field, Expression expression) {
            return EntityBase.OnAggregation(context, " orders o inner join customers c on o.customerid=c.customerid", "MAX", field, false, expression, OrderByCustomer.mGroupString);
        }
        
        public static object MAX(IConnectinContext context, string field) {
            return OrderByCustomer.MAX(context, field, null);
        }
        
        public static object MAX(string field, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.MAX(_context, field, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object MAX(string field) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.MAX(_context, field, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object MIN(IConnectinContext context, string field, Expression expression) {
            return EntityBase.OnAggregation(context, " orders o inner join customers c on o.customerid=c.customerid", "MIN", field, false, expression, OrderByCustomer.mGroupString);
        }
        
        public static object MIN(IConnectinContext context, string field) {
            return OrderByCustomer.MIN(context, field, null);
        }
        
        public static object MIN(string field, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.MIN(_context, field, expression);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static object MIN(string field) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrderByCustomer.MIN(_context, field, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        protected override void OnLoadData(System.Data.IDataReader reader) {
            if ((reader["_Orders"] != System.DBNull.Value)) {
                this.Orders = ((int)(this.Convert(typeof(int), reader["_Orders"])));
            }
            if ((reader["_CustomerID"] != System.DBNull.Value)) {
                this.CustomerID = ((string)(this.Convert(typeof(string), reader["_CustomerID"])));
            }
            if ((reader["_CompanyName"] != System.DBNull.Value)) {
                this.CompanyName = ((string)(this.Convert(typeof(string), reader["_CompanyName"])));
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -