EEP 2006 Andy Kao NET VS 2005 NET

  • Slides: 74
Download presentation
EEP 2006 基礎教學講義 • Andy Kao

EEP 2006 基礎教學講義 • Andy Kao

. NET & VS 2005

. NET & VS 2005

. NET的架構 VS 2005 (C#, VB, J#. . ) Win. Form ASP. NET Base

. NET的架構 VS 2005 (C#, VB, J#. . ) Win. Form ASP. NET Base Class Library CLR (Common Language Runtime ) Windows

VS 2005 版本

VS 2005 版本

EEP. NET 2006

EEP. NET 2006

EEP 2006的概觀 EEP S/D Module EEP 2006 VS 2005 (C#, VB, J#. . )

EEP 2006的概觀 EEP S/D Module EEP 2006 VS 2005 (C#, VB, J#. . ) ASP. NET Win. Form Base Class Library CLR (Common Language Runtime ) Web Windows

EEP 2006 A/P Server 架構 Database Server 多資料庫管理 Pooling管理 Log管理系統 Method管理 平衡負載管理 Login管理 Bug管理

EEP 2006 A/P Server 架構 Database Server 多資料庫管理 Pooling管理 Log管理系統 Method管理 平衡負載管理 Login管理 Bug管理 EEP A/P Server 版本管理 Service. Manager Info. Command Info. Data. Source Update. Comp Transaction Auto. Num Microsoft VS 2005. NET 2. 0

Server端元件 ü ü ü ü Service. Manager Info. Connection Info. Command Info. Data. Source

Server端元件 ü ü ü ü Service. Manager Info. Connection Info. Command Info. Data. Source Update. Comp Auto. Number Info. Transaction Loginfo

Client端元件 ü ü ü ü Info. Data. Set Cache. Data. Set Info. Binding. Source

Client端元件 ü ü ü ü Info. Data. Set Cache. Data. Set Info. Binding. Source Info. Navigator Default. Validate Info. Text. Box Info. Data. Grid. View ü ü ü Info. Ref. Val Info. Data. Time. Picker Info. Combo. Box Auto. Seq Multi. Language Client. Query

第一個VS 2005程式 Solution/Project cs/Designer. cs/resx Tool. Box/Property/Event View Code Say Hello的程式 Message. Box. Show("hello

第一個VS 2005程式 Solution/Project cs/Designer. cs/resx Tool. Box/Property/Event View Code Say Hello的程式 Message. Box. Show("hello ! EEP 2006"); Open Form的程式 Form_temp = new Form 2(); Form_temp. Show();

基本指令 Using (namespace) 變數: Bool, int, long, float, double, char, string, enum, struct, []

基本指令 Using (namespace) 變數: Bool, int, long, float, double, char, string, enum, struct, [] 運算元: +, -, *, /, >, >, >=, <=, !=, == , &&, || If/else/while/for/switch Object Access

一個簡單的程式 將Text. Box 1的文字轉成ASCII碼 list. Box 1. Items. Clear(); for (int i=0; i<text. Box

一個簡單的程式 將Text. Box 1的文字轉成ASCII碼 list. Box 1. Items. Clear(); for (int i=0; i<text. Box 1. Text. Length; i++) { string x = text. Box 1. Text; list. Box 1. Items. Add(Convert. To. Int 16(x[i])); }

EEP 2006 單檔設計

EEP 2006 單檔設計

EEP 2006安裝 SETUP EEP 2006 init. EEP (Info. Remote. Module, Srvtools) OPEN Solution 1.

EEP 2006安裝 SETUP EEP 2006 init. EEP (Info. Remote. Module, Srvtools) OPEN Solution 1. sln Export Template EEPServer. EXE DB Manager Create System Table

單檔設計 DB Server A/P Server Client select Database Info. Command dump Binding Info. Binding.

單檔設計 DB Server A/P Server Client select Database Info. Command dump Binding Info. Binding. Source Get Columns Insert/Update/Delete Update. Comp Info. Data. Set Insert/Update/Delete

單檔Server端開發 Add Server Project Server: DB Module define (Info. Connection, Info. Command, Update. Comp)

單檔Server端開發 Add Server Project Server: DB Module define (Info. Connection, Info. Command, Update. Comp) Build Package Manager

單檔Client端開發 Add Client Project Client: Dataset Define (Info. Data. Set , Info. Binding. Source,

單檔Client端開發 Add Client Project Client: Dataset Define (Info. Data. Set , Info. Binding. Source, Info. Data. Grid. View, Info. Text. Box, Info. Navigator ) Build EEP Manager/Menu Item

Default. Validate控制 Default: 公司名稱/最近訂單日 Carryon: 預設上一筆. 動態Default: 取得日期. Validate: 連絡人不為空. Validate: 地址不能都空白(Code) Range: City設定範圍值.

Default. Validate控制 Default: 公司名稱/最近訂單日 Carryon: 預設上一筆. 動態Default: 取得日期. Validate: 連絡人不為空. Validate: 地址不能都空白(Code) Range: City設定範圍值. Auto. Disible. Control=True Close. Protect=True

一對多設計 DB Server A/P Server Client dump Info. Data. Set Master Info. Command Insert/Update/

一對多設計 DB Server A/P Server Client dump Info. Data. Set Master Info. Command Insert/Update/ Delete Binding Master Info. Binding. Source Relation Detail Info. Binding. Source select Database Insert/Update/ Delete Info. Data. Source Update. Comp Detail Info. Command Update. Comp Insert/Update/ Delete

一對多Server端開發 Add Server Project Server: DB Module define (Info. Connection, Info. Command, Info. Data.

一對多Server端開發 Add Server Project Server: DB Module define (Info. Connection, Info. Command, Info. Data. Source, Update. Comp) Build Package Manager

一對多Client端開發 Add Client Project Client: Info. Data. Set Define (Info. Data. Set , Maser

一對多Client端開發 Add Client Project Client: Info. Data. Set Define (Info. Data. Set , Maser Info. Binding. Source, Detail Info. Binding. Source, Info. Text. Box, Info. Data. Grid. View, Info. Navigator ) Build EEP Manager/Menu Item

運算式與加總 Info. Data. Grid. View. Columntype: Info. Data. Grid. View. Expression. Column, Expression: Unit.

運算式與加總 Info. Data. Grid. View. Columntype: Info. Data. Grid. View. Expression. Column, Expression: Unit. Price*quantity Info. Data. Grid. View. Total. Columns Info. Data. Grid. View. Total. Changed事件 if (e. Column. Name == "Amount" && (info. Navigator 1. Get. Current. State() == "Inserting" || info. Navigator 1. Get. Current. State() == "Editing") { Info. Text. Box 7. Text = e. Total. Value. To. String(); }

EEP 2006 使用Wizard

EEP 2006 使用Wizard

單檔Wizard Server Package Wizard (選擇DBAlias, Table, Columns, Key. Fields) Client Package Wizard (選擇Remote. Name與Columns)

單檔Wizard Server Package Wizard (選擇DBAlias, Table, Columns, Key. Fields) Client Package Wizard (選擇Remote. Name與Columns)

一對多Wizard Server Package Wizard (選擇DBAlias, 一對多Table, Columns, Key. Fields) Client Package Wizard (選擇Remote. Name與Columns)

一對多Wizard Server Package Wizard (選擇DBAlias, 一對多Table, Columns, Key. Fields) Client Package Wizard (選擇Remote. Name與Columns)

EEP 2006 關連設計

EEP 2006 關連設計

使用Left Join Server端: Info. Command: 使用Left Join Update. Comp: 設定Except. Join Client端: Info. Text.

使用Left Join Server端: Info. Command: 使用Left Join Update. Comp: 設定Except. Join Client端: Info. Text. Box/ Info. Data. Grid. View Read. Only=True.

使用Ref. Val 兩種連結: Data. Source/Select. Command Data. Source: 連Info. Binding. Source>Info. Data. Set->Info. Command

使用Ref. Val 兩種連結: Data. Source/Select. Command Data. Source: 連Info. Binding. Source>Info. Data. Set->Info. Command Select. Command: GLModule共用 Info. Comand (要設Select. Alias) 設定Display. Member, Value. Member 使用Info. Ref. Val. Box, 設定Ref. Val

EEP 2006 View. Data. Set設計

EEP 2006 View. Data. Set設計

View. Data. Set優化效能 DB Server A/P Server Client dump View Info. Data. Set Master

View. Data. Set優化效能 DB Server A/P Server Client dump View Info. Data. Set Master Info. Command Relations View Info. Data. Set View Info. Command Info. Data. Set select Insert/Update/ Delete Info. Data. Source Update. Comp Detail Info. Command Insert/Update/ Delete Binding Master Info. Binding. Source Relation Detail Info. Binding. Source Database Update. Comp Insert/Update/ Delete

View. Data. Set Server Module: 多貼一個 Info. Command Add Client Project Client: 貼一個View的Info. Data.

View. Data. Set Server Module: 多貼一個 Info. Command Add Client Project Client: 貼一個View的Info. Data. Set & View的Info. Binding. Source & Info. Binding. Source. Relations Info. Navigator. View. Binding. Source

自動編號設定 Server: Autonumber MYGETDATE() { string ret = System. Date. Time. Today. To. String("yy.

自動編號設定 Server: Autonumber MYGETDATE() { string ret = System. Date. Time. Today. To. String("yy. MMdd"); return ret; } System Table: Sys. Autonum Client: Auto. Seq Server. Modify: Update. Comp, Info. Data. Set Server. Modify. Columns: Update. Comp Server. Modify. Get. Max: Update. Comp

EEP 2006 Transaction設計

EEP 2006 Transaction設計

Transaction原理 DB Server Database select A/P Server Info. Command Active Insert/Delete/Update. Comp Update (inc/dec/replace)

Transaction原理 DB Server Database select A/P Server Info. Command Active Insert/Delete/Update. Comp Update (inc/dec/replace) Apply Client Info. Data. Set Append Mode: Auto. Append Except Ignore Always. Append

變更Northwind alter table products add Last. Ordered. Price money null alter table customers add

變更Northwind alter table products add Last. Ordered. Price money null alter table customers add Last. Ordered. Date datetime null alter table customers add Freight. Amount money null alter table orders add Order. No varchar(10) null create table dbo. Ordered. Log (Seq. ID int identity (1, 1) NOT NULL, Order. ID int NOT NULL, Product. ID int NOT NULL, Unit. Price money NOT NULL, Quantity smallint NOT NULL)

Transaction的實例 Orders DB Server A/P Server select Master Info. Command Client Active Insert/Delete/Update Master

Transaction的實例 Orders DB Server A/P Server select Master Info. Command Client Active Insert/Delete/Update Master Update. Comp Apply Customers Inc Ordered. Amout Replace Last. Ordered. Date Order Details select Detail Info. Command Insert/Delete/Update Inc Units. On. Order Detail Replace Update. Comp Last. Ordered. Price Master CDS Apply Detail CDS Products Log Transaction. Ordered. Log

Transaction設計 Orders Transaction : Customers Freight Inc Ordered. Amout Replace Last. Ordered. Date Order

Transaction設計 Orders Transaction : Customers Freight Inc Ordered. Amout Replace Last. Ordered. Date Order Details Transaction: Products Quantity Inc Units. On. Order Unit. Price Replace Last. Ordered. Price Always. Append: Ordered. Log

EEP 2006 Server Method設計

EEP 2006 Server Method設計

Server Method原理 DB Server A/P Server Database select Service. Manager Server Method 1 ……

Server Method原理 DB Server A/P Server Database select Service. Manager Server Method 1 …… Server Method 2 …… Client Call 同步/ 非同步 Server Method 3 …… Info. Command Server Method 4 …. . Update

Server Method設計 設計Server Method: public object Call. Test(object[] obj. Param) {string str = obj.

Server Method設計 設計Server Method: public object Call. Test(object[] obj. Param) {string str = obj. Param[0]. To. String(); string sql= "select avg(Unit. Price) as Avg. Price from [order details] Where Product. ID="; sql = sql + str; Data. Set Tmp = Execute. Sql("view", sql, true); string retval=Tmp. Tables[0]. Rows[0][‘Avg. Price’]. To. String(); Thread. Sleep(5000); object ret; ret = new object[] { 0, retval}; return ret; } 定義Service. Manager

Server Method設計 同步Client: private void button 1_Click(object sender, Event. Args e) { object[] param;

Server Method設計 同步Client: private void button 1_Click(object sender, Event. Args e) { object[] param; param=new object[] {text. Box 1. Text}; object[] back. Param = Cli. Utils. Call. Method("STEST 2", "Call. Test", param); Message. Box. Show(back. Param[1]. To. String()); } 非同步Client: public void My. Call. Back(object[] o. Ret) { Message. Box. Show((string)o. Ret[1]); } object[] back. Param = Cli. Utils. Async. Call. Method("STEST 2", "Call. Test", param, My. Call. Back);

EEP 2006 WEB設計

EEP 2006 WEB設計

Web端元件 ü ü ü ü Web. Data. Set Web. Data. Source Web. Details. View

Web端元件 ü ü ü ü Web. Data. Set Web. Data. Source Web. Details. View Web. Form. View Web. Grid. View Web. Data. List Web. Navigator Web. Default Web. Validate Web. Ref. Val Web. Drop. Down. List Web. Data. Time. Picker Web. Date. Time. Viewer Web. Image ü ü ü ü Web. Tree. View Web. List. Box. List Web. Auto. Seq Web. Status. Strip Web. Multi. Language Web. Client. Query Web. Translate Web. Ref. Button Web. Hyper. Link Web. Menu Web. Expression. Control Web. Check. Box Web. Grid. Text. Box Web. Validate. Box Web. Auto. Test

單檔設計 DB Server A/P Server IIS Server Grid. View select Database Info. Command dump

單檔設計 DB Server A/P Server IIS Server Grid. View select Database Info. Command dump Binding Web. Data. Source Get Columns Insert/Update/Delete Update. Comp Web. Data. Set Insert/Update/Delete

單檔Web端開發 Add Web Form (From WSingle) View Component Designer中: 設定 Web. Data. Set &

單檔Web端開發 Add Web Form (From WSingle) View Component Designer中: 設定 Web. Data. Set & Save. 設定Web. Data. Source的Data. Member 設定Web. Grid. View的Data. Source. ID & Refresh Schema產生欄位Build EEP Manager/Menu Item

一對多設計 IIS Server dump Web. Data. Set Master Info. Command Insert/Update/ Delete Binding DB

一對多設計 IIS Server dump Web. Data. Set Master Info. Command Insert/Update/ Delete Binding DB Server A/P Server Master Web. Data. Source Relation Detail Web. Data. Source select Database Insert/Update/ Delete Info. Data. Source Update. Comp Detail Info. Command Update. Comp Insert/Update/ Delete

一對多Web端開發 Add Web Form (From WMaster. Detail 2) View Component Designer中: 設定 Web. Data.

一對多Web端開發 Add Web Form (From WMaster. Detail 2) View Component Designer中: 設定 Web. Data. Set & Save. 分別設定Master與Detail各自Web. Data. Source 的Data. Member Master: 設定Web. Detail. View的Data. Source. ID & Refresh Schema產生欄位 Detail: 設定Web. Grid. View的Data. Source. ID & Refresh Schema產生欄位 Build / EEP Manager/Menu Item

Default. Validate控制 Default: 公司名稱 Carryon: 地址預設上一筆. 動態Default: 取得日期. Validate: 連絡人不為空. Validate: 地址不能都空白(Code) Range: City設定範圍值.

Default. Validate控制 Default: 公司名稱 Carryon: 地址預設上一筆. 動態Default: 取得日期. Validate: 連絡人不為空. Validate: 地址不能都空白(Code) Range: City設定範圍值. Duplicate. Check=True/False Duplicate. Check. Mode=Local/Where

Default. Validate控制 動態Default Code: Public object Mydefault() { return System. Date. Time. Today; }

Default. Validate控制 動態Default Code: Public object Mydefault() { return System. Date. Time. Today; } 動態Validate: public bool mycheck(object var) { if (var. To. String(). Length >= 2) { if (var. To. String(). Substring(0, 2) == "台北") return true; } return false; } Master/Detail 自增值處理

使用Web. Ref. Val 兩種連結: Web. Data. Set/Web. Datasource Web. Data. Set: 連Web. Data. Set

使用Web. Ref. Val 兩種連結: Web. Data. Set/Web. Datasource Web. Data. Set: 連Web. Data. Set ->Info. Command Select. Command: GLModule共用 Info. Comand (要設Select. Alias) Convert To Template & Binding 設定Display. Member, Value. Member Copy To Insert. Item. Template

使用Web. Date. Time. Picker Convert To Template 貼入Web. Date. Time. Picker Binding Copy To

使用Web. Date. Time. Picker Convert To Template 貼入Web. Date. Time. Picker Binding Copy To Insert. Item. Template

使用Web. Gird. View設計 在View Component Designer中: 增加Web. Data. Set並 連到View的Info. Command & Save. 增加Web.

使用Web. Gird. View設計 在View Component Designer中: 增加Web. Data. Set並 連到View的Info. Command & Save. 增加Web. Data. Source連接到Web. Data. Set與設定 Data. Member. 加入Web. Grid. View並連結到Web. Data. Source , Refresh Schema來新增欄位. 設定Web. Navigator. View. Bind. Object到Web. Grid. View. 在Web. Grid. View的Selected. Index. Changed事件中: Master. Execute. Sync(Web. Grid. View 1); Data. Bind();

WEB 自由排版 Form. View設計

WEB 自由排版 Form. View設計

使用Web. Form. View設計 Add Web Form (From WMaster. Detail 1) View Component Designer中: 設定Web.

使用Web. Form. View設計 Add Web Form (From WMaster. Detail 1) View Component Designer中: 設定Web. Data. Set & Save. 分別設定Master與Detail各自Web. Data. Source的 Data. Member Master: 設定Web. Form. View的Data. Source. ID & Refresh Schema產生欄位. 調整Web. Form. View在Item. Template與 Update. Template及Insert. Template等版面. Detail: 設定Web. Grid. View的Data. Source. ID & Refresh Schema產生欄位 Build / EEP Manager/Menu Item

WEB Grid. View連結設計

WEB Grid. View連結設計

使用Translate元件設計 Add Web Form (From WSingle 1) View Component Designer中: 設定Web. Data. Set &

使用Translate元件設計 Add Web Form (From WSingle 1) View Component Designer中: 設定Web. Data. Set & Save. 設定Master. Web與Data. Source的Data. Member Master: 設定Web. Form. View的Data. Source. ID & Refresh Schema產生欄位. 貼入Translate元件, 連結到Data. Source. ID與 Web. Form. View. 在原來Web. Gird. View中設定Edit. URL連結. 也可使用Web. Grid. View. Open. Edit. URL(Mode).

Web. Client. Query設計 Add Web Form (From WQuery) View Component Designer中: 設定Web. Data. Set

Web. Client. Query設計 Add Web Form (From WQuery) View Component Designer中: 設定Web. Data. Set & Save. 設定Web. Data. Source的Data. Member. 設定連結Web. Client. Query與 Web. Data. Source, 並設定 Columns查詢欄位. Page_Load中設計Web. Client. Query 1. Show(Panel 1); protected void Button 1_Click(object sender, Event. Args e) { Web. Client. Query 1. Excute(Panel 1); } protected void Button 2_Click(object sender, Event. Args e) { Web. Client. Query 1. Clear(Panel 1);

WEB Report設計

WEB Report設計

Web Report 設計 Add Web Form (From WReport) 在View Component Designer中: 增加Web. Data. Set並連到Report的

Web Report 設計 Add Web Form (From WReport) 在View Component Designer中: 增加Web. Data. Set並連到Report的 Info. Command & Save To Report (xml) 設定Report Web. Data. Source的Data. Member. 設定Crystal. Report. Source的Configure Report Source, New A Crystal. Report(rpt) 在Crystal. Report/Field Explorer以Database Expert/Create New Connection/ADO. Net選擇EEPNet. Report之下的xml檔案 將欄位拉入Crystal. Report的Detail中 設定Crystal. Report. Viewer連結到Crystal. Report. Source 在Crystal. Report. Source. Report. Data. Source中設定Data. Source連到 Web. Data. Source中, 並指定其內的Data. Member. Build/EEP Manager/Menu Item

E - Mail:andykao@infolight. com. tw Q&A

E - Mail:andykao@infolight. com. tw Q&A