Altinet
  • Home
  • Blog
  • Contact





Telerik reporting, business entities and dependency injection (IOC).

On 22 Aug, 2012
Uncategorized
By : Bruno Samardzic
No Comments

One remark: in code snippets, please take not of the wrong formatting for "<" and ">" (it's shown as > and < signs). There are other signs too that could be different but my code snippeter is a bit moody today:) Telerik reporting is a great tool for just that, but if you feel like doing it OOP style, using your existing architecture, and doing it with some kind of IOC, then you have to do some minor adjustments. Say you want your Invoice report to use you repository, through your constructor: 1 There's another interesting bit here (that this.Field extension method) but i'll...

Read More

Handling and persisting application-wide variables

On 22 Aug, 2012
Uncategorized
By : Bruno Samardzic
No Comments

- t-do- write this:)

Read More

Json adventures: Json.Net, DataContractJsonSerializer and a gun.

On 27 Feb, 2012
Uncategorized
By : Bruno Samardzic
With 1 Comment

Well, if i had a gun near by, i'd definitely use that rather than the former 2. So here's the deal: i needed to send an object over the wire, and i decided on using Json. First pick: DataContractJsonSerializer. What i wanted to serialize is Filter definitions. 1 The way i decided on doing it is using a nice wrapper over DataContractJsonSerializer which would just take known types and do the serialization or deserialization. So basically this unit test should work 1 However, it fails miserably. It seems that DataContranctJsonSerializer has a problem with implicit conversion of types, even though the Date type is...

Read More

Turn off that XAML designer in VS2010 – you have to do this!

On 29 Jan, 2012
Uncategorized
By : Bruno Samardzic
No Comments

Ok, so i finally have a sensible working environment and it only took me one thing to achieve it - disabling that damn XAML designer! Anyway, right click XAML -> Open with -> Source Code (Text) Editor and set it as default. 80% less...

Read More

AutoCompleteBox 2-way binding to Text property

On 13 Oct, 2011
Uncategorized
By : Bruno Samardzic
With 2 Comments

Source: AutoCompleteBox with Text 2-way binding Ok, so basically you have a following problem: Say you have a PartnerName property on your Task entity, but you also have a Partner property. You want a PartnerName to be set, but if there's a Partner in your database with the same name, you also want your Partner property to be set with that particular partner through async call to database. I could bind the Text field of the out-of-box AutoCompleteControl but it acted up on me really weird, and basically it's unusable in this type of scenario. Basically the main problem was that...

Read More

Using Caliburn Conventions to bind CRUD buttons

On 13 Sep, 2011
Uncategorized
By : Bruno Samardzic
No Comments

I think it's one of the most common scenarios around, you would like to bind a button set for use of typical operations. See those 3 little buttons next to the title? It's a very common case, having 3 generic buttons for CRUD operations over data right next to datagrid for ease of use. It can be whatever and you could effectively put there a few more, but this will suffice for showing off a nice way how caliburn.micro can make your life easier. So for instance you have this control with these generic buttons, and you called it ListButtons: 1 U use...

Read More

[Format_BadDateTime] DataForm validation error, broken binding on DatePicker, all that only on Windows XP!

On 02 Aug, 2011
Uncategorized
By : Bruno Samardzic
With 1 Comment

Ok, this one was a real pain in the ass. I would get this strange [Format_BadDateTime] error when trying to type in a Date in any of the DatePickers i would try to use. And only on Windows XP. If i would use it outside the DataForm my binding would just get broken and that would basically be it! On a different project, with similair setup i would get a [Arg_TargetInvocationException]. The problem occurs only if you're using non-English localization settings on client computer (which means date formats other than MM/dd/yyyy) on Windows xp. Well, i figured it out and it's the Range...

Read More

Connecting AutoCompleteBox to a Ria Service using MVVM and Caliburn.Micro

On 19 Jul, 2011
Uncategorized
By : Bruno Samardzic
No Comments

AutoCompleteBox connected to web service is often needed solution, and there are many solutions out there that are bare bone ones, but using such powerful UI framework as Caliburn.Micro is can reap some interesting benefits. So here's my implementation. I decided to subclass AutoCompleteBox because i subclass all of the controls i use. I called it AltiAutoCompleteBox. A new event was added called PopulatingAsync and a new EventArg called PopulatingAsyncEventArgs: AltiAutoCompleteBox basically just adds another event PopulatingAsync which is called every time Populating event is called: 1 PopulatingAsyncEventArgs class is consisted of a Parameter and an action which will be called on ViewModel side when...

Read More

Note to Self: NHibernate TargetInvocationException

On 14 Jul, 2011
Uncategorized
By : Bruno Samardzic
No Comments

Ok, i get this error Index was outside the bounds of the array. and i always bang my head up the wall what to do with it. Anyway, it's the enum! I have a mapping where enums are stored in referenced table. If the table's empty, my code generator generates an empty enum. Empty enum then causes this exception. And that's basically it! Now off to change that whole enum deal into something...

Read More

A nice linq extension (works with linq to nhibernate)

On 03 Apr, 2011
Uncategorized
By : Bruno Samardzic
With 2 Comments

I needed a classic "where guid in" type of query to do (though i'm not sure if i should be thinking in that way when using linq:) so i poked around a bit, but couldn't find anything good. So here it is: 1 A classic example of usage would be something like this 1 We are basically selecting partners by partnerguid, it's very useful for paging and such. An ispiration for this type of solution came from the this blog post for catching future values. Hope this...

Read More

  • Page 3 of 5
  • 1
  • 2
  • 3
  • 4
  • 5

Recent Posts

  • Angular vs React: round 2
  • Why programming is hard
  • Orchard Workflows, undocumented gem
  • The React Redux
  • React.js invoicing CRUD application, part 2: Description

Recent Comments

  • Angshuman on Animation for starred grid rows and columns using xaml
  • Advanced Excel Training in Lucknow on Angular vs React: round 2
  • Reginald Sophomore on My example of Angularjs directive
  • Slobodan on Angular and Breeze – story so far.
  • Bruno Samardzic on Reaction to Ember-forged Durandal Angularly Knocking out my Backbone, or my JS MVC framework research conclusion.

Contact

Altinet d.o.o.

OIB: 97429091194

Čulinečka cesta 146, Zagreb

Tel: +385 (1) 2946 819

Mob: +385 (98) 210 756

IBAN: HR4323400091110406470

Latest tweets