ExtAspNet学习-利用AppBox框架快速创建项目(五)—完成项目含源代码
生活随笔
收集整理的這篇文章主要介紹了
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數據庫 ”
在這里下載源代碼
轉載于:https://www.cnblogs.com/rongyi/archive/2012/03/06/2382373.html
總結
以上是生活随笔為你收集整理的ExtAspNet学习-利用AppBox框架快速创建项目(五)—完成项目含源代码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NIOS生成Nios libaray
- 下一篇: 身份证明检索失败,如何解决?