• 使用EntitysCodeGenerate


    http://bbs.csdn.net/topics/360256700

    public DataSet xxx(DateTime start, DateTime end, string type)
            {
                            string[,] strArray = new string[6, 2] {{"0", "11"}, {"1", "11"}, {"2", "22"}, {"3", "11"}, {"4", "11"}, {"5", "11"}};
    
                DataSet dst = new DataSet();
                DbCore dbCore = new DbCore(DatabaseType.Oracle, BaseEntity.GetConnectionString());
                dbCore.Open();
                dst = dbCore.Select().SelectColumns(new string[]{A.s_FEECELLED, 
                                                            B.s_SSXCELLED, 
                                                            B.s_MSPHONE1, 
                                                            B.s_MSPHONE2, 
                                                            B.s_MSPHONE3, 
                                                            B.s_MSPHONE4,
                                                            A.s_ADDDATE,
                                                            A.s_ORDERFLAG,
                                                            A.s_RESPTIME})
                                .From(new string[]{A.s_TableName,
                                                    B.s_TableName})
                                .Where().ConditionAndEqual(A.s_ORDERTYPE, type)
                                        .ConditionAndBetweenAnd(A.s_ADDDATE, start.ToString(), end.ToString())
                                        .ConditionColumnAndEqual(A.s_FEECELLED, B.s_ADMINCELLING)
                                        .ConditionColumnAndEqual(A.s_USECELLED, B.s_SSXCELLED)
                                        .ConditionAndNotIn(A.s_FEECELLED, 
                                                            new string[] { "136xxxx", "135xxxx", "135xxxx", "136xxxx" }).ExecuteDataSet();
                dbCore.Close();
    
                DataTable dt = TableHelp.ReplacleTableColValue(dst.Tables[0], dst.Tables[0].Columns["ORDERFLAG"], strArray);
    //            TableHelp.SortTable(dst.Tables[0], dst.Tables[0].Columns[6]);
                TableHelp.SortTable(dt, "ADDDATE", SortDirection.Asc);//"ORDERFLAG", SortDirection.Asc);//, 
    
    //            TableHelp.SortTableAsc(dst.Tables[0], dst.Tables[0].Columns["ADDDATE"], dst.Tables[0].Columns["ORDERFLAG"]);
                           return dst;
            }
  • 相关阅读:
    Spring笔记②--各种属性注入
    Spring笔记①--helloworld
    Structs2笔记③--局部类型转换案例
    Struct2笔记②--完善登陆代码
    Structs2笔记①--structs的背景、structs2框架的意义、第一个helloworld
    软件项目的开发之svn的使用
    Java基础第一节.Java简介
    Hibernate笔记④--一级二级缓存、N+1问题、saveorupdate、实例代码
    Hibernate笔记③--集合映射、组合映射、联合主键、查询案例
    Hibernate笔记②--hibernate类生成表、id生成策略、级联设置、继承映射
  • 原文地址:https://www.cnblogs.com/zkwarrior/p/4860287.html
Copyright © 2020-2023  润新知