zoukankan      html  css  js  c++  java
  • ExtAspNet学习利用AppBox框架快速创建项目(五)—完成项目含源代码

    我们前边四个部分已经完成了框架需要的基础配置,

    现在我们来完成项目

    1、Subsonic 配置,首先在OraSurvey.DAO中添加App.config配置相关信息

    View Code
     1 <?xml version="1.0" encoding="utf-8" ?>
    2 <configuration>
    3 <configSections>
    4 <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/>
    5 </configSections>
    6 <connectionStrings>
    7 <add name="OraSurvey" connectionString="Password=test1;Persist Security Info=True;User ID=test1;Data Source=vmdb"/>
    8 </connectionStrings>
    9 <SubSonicService defaultProvider="OraSurvey" enableTrace="false" templateDirectory="">
    10 <providers>
    11 <clear/>
    12 <add name="OraSurvey" type="SubSonic.OracleDataProvider, SubSonic" connectionStringName="OraSurvey" generatedNamespace="OraSurvey.DAO" removeUnderscores="true" spClassName="SPs"/>
    13 </providers>
    14 </SubSonicService>
    15 </configuration>

    2、ExtAspNet和Subsonic配置到Web.config中

    View Code
     1 <?xml version="1.0" encoding="utf-8"?>
    2
    3 <!--
    4 有关如何配置 ASP.NET 应用程序的详细消息,请访问
    5 http://go.microsoft.com/fwlink/?LinkId=169433
    6 -->
    7
    8 <configuration>
    9 <configSections>
    10 <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/>
    11 <section name="ExtAspNet" type="ExtAspNet.ConfigSection, ExtAspNet"/>
    12 </configSections>
    13 <ExtAspNet EnableBigFont="true" DebugMode="true" />
    14
    15 <connectionStrings>
    16 <add name="OraSurvey" connectionString="Password=zhangyi;Persist Security Info=True;User ID=liurong;Data Source=vmdb"/>
    17 </connectionStrings>
    18
    19 <SubSonicService defaultProvider="OraSurvey" enableTrace="false" templateDirectory="">
    20 <providers>
    21 <clear/>
    22 <add name="OraSurvey" type="SubSonic.OracleDataProvider, SubSonic" connectionStringName="OraSurvey" generatedNamespace="OraSurvey.DAO" removeUnderscores="true" spClassName="SPs"/>
    23 </providers>
    24 </SubSonicService>
    25
    26 <system.web>
    27 <pages>
    28 <controls>
    29 <add assembly="ExtAspNet" namespace="ExtAspNet" tagPrefix="ext"/>
    30 </controls>
    31 </pages>
    32 <httpModules>
    33 <add name="ExtAspNetScriptModule" type="ExtAspNet.ScriptModule, ExtAspNet"/>
    34 </httpModules>
    35 <httpHandlers>
    36 <add verb="GET" path="res.axd" type="ExtAspNet.ResourceHandler, ExtAspNet"/>
    37 </httpHandlers>
    38 <compilation debug="true" targetFramework="4.0" />
    39 </system.web>
    40
    41 </configuration>

    3、运行配置好的Susonic工具OraSubsonic,自动生成Subsonic文件

    4、复制AppBox中Helper、Util和pagebase.cs;最后将main.aspx,复制到OraSuvey.Web中,然后根据生成,根据错误提示进行修改

    需要注意的是Sql server 中有int,但oracle中均定义的是number,因此需要把int 都替换为decimal;

    最后运行吧,可以使用了;

    这里的源代码仅是程序部分,关于数据库的创建,请参看“ExtAspNet学习-利用AppBox框架快速创建项目(二)-创建Oralce数据库

    在这里下载源代码

  • 相关阅读:
    MBR记录
    execute,executeQuery,executeUpdate的区别是什么?
    JDBC访问数据库的基本步骤是什么?
    什么是JDBC,在上面时候会用到它?
    int 和 Integer 有什么区别
    String和StringBuffer、StringBuilder的区别是什么?String为什么是不可变的
    final finally finalize区别
    Java有哪些基本数据类型
    面向过程和面向对象的区别
    JDK,JRE,JVM三者关系
  • 原文地址:https://www.cnblogs.com/rongyi/p/2382373.html
Copyright © 2011-2022 走看看