Postopek:
(1) Langugage resource datoteke (.resx) je potrebno skopirati iz direktorija, kjer imamo instalirane DevExpress komponente. Privzeto so instalirane v direktoriju
'C:\Program Files\Developer Express .NET vX.Y\Sources\DevExpress.Web.ASPxGlobalResources\'
v direktorij:
'~/App_GlobalResources/'
kjer se nahaja naša spletna aplikacija.
Posamezne kontrole imajo svoj pripadujoč resource file.
(2) Prevedemo polja v resx datotekah komponent, ki jih želimo lokalizirat in spremenimo ime datoteke v 'DevExpress_Web_vX_Y.sl.resx', kjer je .sl "cultrue code" glede na standard, ki se nahaja na naslovu:
http://download1.parallels.com/Sitebuilder/Windows/docs/4.5/en_US/sitebuilder-4.5-win-l10n-guide/index.htm?fileName=38330.htm
primer: DevExpress_Web_ASPxGridView_v9_1.sl.resx
Skopiramo prevedene in preimenovane datoteke v '~/App_GlobalResources/' direktorij naše spletne aplikacije, poleg datotek, ki smo jih skopirali v prvem koraku.
(3) V web.config vstavimo pod <system.web> </system.web> node naslednjo vrstico
<globalization culture="sl-SI" uiculture="sl">
Pri nekaterih vrednostih za cultrue je treba upoštevat tole:
http://support.microsoft.com/kb/939949
Thursday, 23 April 2009
Tuesday, 21 April 2009
NHibernate - ANY
Podroben članek
Sometimes, well known associations just don’t cut it. We sometimes need to be able to go not to a single table, but to a collection of table. For example, let us say that an order can be paid using a credit card or a wire transfer. The data about those are stored in different tables, and even in the object model, there is no inheritance association them.
< any name="Payment" id-type="System.Int64" meta-type="System.String" cascade="all">
< meta-value value="CreditCard" class="CreditCardPayment"/>
< meta-value value="Wire" class="WirePayment"/>
< column name="PaymentType"/>
< column name="PaymentId"/>
< /any>
Monday, 20 April 2009
NHibernate - Join
Join - Podroben članek
table="tablename" (1)
schema="owner" (2)
catalog="catalog" (3)
fetch="join|select" (4)
inverse="true|false" (5)
optional="true|false"> (6)
< key ... />
< property ... />
< /join>
< joinOn the face of it, it looks like a nice way to merge tables together, but that isn’t actually the primary reason for this feature. You can use it for that, for sure, but that is mostly useful in legacy databases. In most cases, your object model should be more granular than the database model, not the other way around.
The really interesting part about this feature is that it allows us to mix & match inheritance strategies. It let us create a table per hierarchy that store all the extra fields on another table, for example. That significantly reduce the disadvantage of using a table per hierarchy or table per subclass, since we can tell very easily what is the type of the class that we are using, and act appropriately.
table="tablename" (1)
schema="owner" (2)
catalog="catalog" (3)
fetch="join|select" (4)
inverse="true|false" (5)
optional="true|false"> (6)
< key ... />
< property ... />
< /join>
Tuesday, 14 April 2009
XML Komentraji in priprava projekta za dokumentiranje
>> Članek
Osnovni in OBVEZNI elementi so
- summary
remarks
V primeru daljšega opisa je priporočena uporaba tag-a
NHibernate - Set
NHibernate - SET Mapping [članek ]
<set
name="propertyName" (1)
table="table_name" (2)
schema="schema_name" (3)
lazy="true|false" (4)
inverse="true|false" (5)
cascade="all|none|save-update|delete|all-delete-orphan" (6)
sort="unsorted|natural|comparatorClass" (7)
order-by="column_name asc|desc" (8)
where="arbitrary sql where condition" (9)
fetch="select|join|subselect" (10)
batch-size="N" (11)
access="field|property|ClassName" (12)
optimistic-lock="true|false" (13)
outer-join="auto|true|false" (14)
/>
<key .... />
<one-to-many .... />
>
Friday, 10 April 2009
NHibernate - Many-To-One
Kako implementiramo relacijo many-to-one s pomočjo NHibernate.
Podroben članek
Definicija
Podroben članek
Definicija
<many-to-one
name="PropertyName" (1)
column="column_name" (2)
class="ClassName" (3)
cascade="all|none|save-update|delete" (4)
fetch="join|select" (5)
update="true|false" (6)
insert="true|false" (7)
property-ref="PropertyNameFromAssociatedClass" (8)
access="field|property|nosetter|ClassName" (9)
unique="true|false" (10)
optimistic-lock="true|false" (11)
not-found="ignore|exception" (12)
/>