[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue-contrib] r240 - address
From: |
johannes |
Subject: |
[gnue-contrib] r240 - address |
Date: |
Wed, 15 Mar 2006 10:48:58 -0600 (CST) |
Author: johannes
Date: 2006-03-15 10:48:57 -0600 (Wed, 15 Mar 2006)
New Revision: 240
Modified:
address/address.gfd
address/schema.gsd
Log:
Various improvements
Modified: address/address.gfd
===================================================================
--- address/address.gfd 2006-03-13 13:51:35 UTC (rev 239)
+++ address/address.gfd 2006-03-15 16:48:57 UTC (rev 240)
@@ -8,10 +8,8 @@
</options>
<datasource name="dtsCompany" connection="address" table="company" />
- <datasource name="dtsCpMemo" connection="address" table="cpmemo" />
<datasource name="dtsContact" connection="address" table="contact"
master="dtsCompany" masterlink="id" detaillink="company" />
- <datasource name="dtsCtMemo" connection="address" table="ctmemo" />
<datasource name="dtsCategory" connection="address" table="category"
prequery="Y" />
<datasource name="dtsSalutation" connection="address" table="salutation"
@@ -19,6 +17,7 @@
<logic>
<block name="blkCompany" datasource="dtsCompany">
+ <field name="search" case="upper" />
<field name="eMatchcode" field="matchcode" maxLength="20" case="upper"/>
<field name="eName1" field="name1" maxLength="64" />
<field name="eName2" field="name2" maxLength="64" />
@@ -70,11 +69,11 @@
]]>
</trigger>
</block>
-
</logic>
<layout xmlns:c="GNUe:Layout:Char" c:height="17" c:width="105" tabbed="none">
<page name="pgContact" caption="Contacts">
+ <label c:x="0" c:y="0" c:width="8" text="Suche:" alignment="right" />
<label c:x="0" c:y="1" c:width="8" text="Match:" alignment="right"/>
<label c:x="0" c:y="2" c:width="8" text="Firma 1:" alignment="right"/>
<label c:x="0" c:y="3" c:width="8" text="Firma 2:" alignment="right"/>
@@ -85,6 +84,30 @@
<label c:x="20" c:y="6" c:width="6" text="UID:" alignment="right"/>
<label c:x="20" c:y="7" c:width="6" text="FNr:" alignment="right"/>
+ <entry c:x="9" c:y="0" c:width="28" block="blkCompany" field="search" />
+
+ <button c:x="39" c:y="0" c:width="10" label="Suche">
+ <trigger type="ON-ACTION"><![CDATA[
+ val = blkCompany.search.get ().lower ()
+ pattern = "%%%s%%" % val
+
+ cond = ['or',
+ ['like', ['lower', ['field', 'matchcode']], ['const', pattern]], \
+ ['like', ['lower', ['field', 'name1']], ['const', pattern]], \
+ ['like', ['lower', ['field', 'name2']], ['const', pattern]], \
+ ['exist', 'contact', 'id', 'company', \
+ ['or',
+ ['like', ['lower', ['field', 'firstname']],
+ ['const', pattern]],
+ ['like', ['lower', ['field', 'surname']],
+ ['const', pattern]]]]]
+
+ r = dtsCompany.createResultSet (cond, query = True)
+
+ ]]>
+ </trigger>
+ </button>
+
<entry c:x="9" c:y="1" c:width="40" block="blkCompany"
field="eMatchcode"/>
<entry c:x="9" c:y="2" c:width="40" block="blkCompany"
@@ -113,7 +136,9 @@
params = {'memo': blkCompany.eMemo.get ()}
activateDialog ('editMemo', params, True)
if params.get ('mres'):
- blkCompany.eMemo.set (params.get ('memo'))
+ value = params.get ('memo')
+ blkCompany.eMemo.set (value)
+ blkCompany.eMemoAvailable.set (bool (value))
]]>
</trigger>
</button>
@@ -222,7 +247,8 @@
<button c:x="18" c:y="9" c:width="10" c:height="1" label="Ok" >
<trigger type="ON-ACTION"><![CDATA[
- setParameter ('memo', blk.memo.get ())
+ val = blk.memo.get ()
+ setParameter ('memo', val)
setParameter ('mres', True)
close ()
]]>
Modified: address/schema.gsd
===================================================================
--- address/schema.gsd 2006-03-13 13:51:35 UTC (rev 239)
+++ address/schema.gsd 2006-03-15 16:48:57 UTC (rev 240)
@@ -4,7 +4,8 @@
<tables>
<table name="company">
<fields>
- <field name="id" type="number" length="8" nullable="False" />
+ <field name="id" type="number" length="8" nullable="False"
+ defaultwith="serial" />
<field name="matchcode" type="string" length="20" />
<field name="name1" type="string" length="64" />
@@ -41,7 +42,8 @@
<table name="contact">
<fields>
- <field name="id" type="number" length="8" nullable="False" />
+ <field name="id" type="number" length="8" nullable="False"
+ defaultwith="serial" />
<field name="company" type="string" length="8" nullable="False" />
<field name="salutation" type="number" length="8" />
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue-contrib] r240 - address,
johannes <=