AutoLayouterLib第一版基本完成
經過幾個月的業余時間,終于把autolayouterlib的基本功能實現了,基本實現了單表及簡單視圖的操作,權且歸為0.01版吧,這跟其它的框架不同的一點是,只要根據一個xml配置文件 就可以實現crud.非常的省時省力。在winform上跑的非常給力,web的項目正在實現中,等到合適的時機,我會把代碼發布出來,大家共勉勵。在此簡單的描述下此框架的思路:
1,配置好xml文件,示例如下:
<?xml version="1.0" encoding="utf-8" ?>
<form name="TestForm" caption="測試窗口" tbOrViewName="tableDemo" primaryKey="id" primaryKeyType="int_type" identify="manual" ?connStr="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=e:\\layoutDemo.accdb">
<panel name="pnel1" width="600" height="500">
<field name="txtCaption" caption="caption標題" ctrlType="extextbox" fieldName="caption"?
? ? ? ? ? ?fieldType="string_type" left="30" top="20" sourceSql=""></field>
? ? <field name="txtContent" caption="測試字段1" ctrlType="extextbox" fieldName="content"?
? ? ? ? ? ?fieldType="string_type" left="290" top="90" sourceSql=""></field>
? ??
<field name="txtClassify" caption="類別" ctrlType="excombobox" fieldName="classify"?
? ? ? ? ? ?fieldType="int_type" left="30" top="80" sourceSql="select classname,[id] from classifytable"></field>
? ? <field name="dtArriveTime" caption="日期" ctrlType="exdatetimepicker" fieldName="arrivetime"
? ? ? ?fieldType="datetime_type" left="290" top="40" sourceSql=""></field>
? ??
? ? <field name="txtIntDemo" caption="intDemo標題" ctrlType="exnumericupdown" fieldName="intDemo"
? ? ? ? ?fieldType="int_type" left="30" top="200" sourceSql=""></field>
? ? <field name="memoDemo" caption="memodemo" ctrlType="exmemo" fieldName="memodemo"
? ? ? ? fieldType="string_type" left="30" top="250" width="300" height="50" sourceSql=""></field>
? </panel>
? <!--以下為字段常用類型
? string_type,
? int_type,
? long_type,
? bool_type,
? numeric_type,
? datetime_type,
? text_type,
? object_type,
? ref_type,
? enum_type-->
?
? <!--Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\Transaction_Record.accdb
? Provider=SQLOLEDB.1;Password=123456;Persist Security Info=true;User ID=sa;Initial Catalog=ErpCore;Data Source=DC-PC\SQLINSTANCE;
? -->
</form>
總結
以上是生活随笔為你收集整理的AutoLayouterLib第一版基本完成的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SqlServer常用函数
- 下一篇: Application对象 简单的聊天室