|
|
Thanks, that might be just what I was looking for.
F.O.R.
|
|
|
|
|
I am planning a new project and got some great ideas on how to do things.
Since it is version 2.0 of the project and the whole application needs a rewrite (the first version is approx. 3 years old now and was done without a decent design) I might as well try something new.
I want to build the application using the 3-tier design: GUI, Business Logic and Data-Access. I want to make it possible to both use a database and a webservice for the data-access. Also I want to add offline-capabilities to the application so that if the webservice fails the users can continue their work as normal.
So far my testing with hand written proxy classes for the webservices and the classes for the database is going great. It really seams to work, you can switch between them without much hassle.
But my big question is, should I use datasets or should I write my own custom business logic classes. I like the dataset because it's a lot easier and it works great. Hand-made business classes are not really my favorite since I don't exactly know how to pick that up.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I think you shouldn't think of the bussiness logic as a matter of chosing the right one between DataSet and biz logic classes.
Think about the key concepts such as transactions, security (authorization and authentication), work flow, retriving paged data, user sessions, etc..
By considering all these you are able to find a good, scalable, maintainable solution. However finding the right solution is a lot difficult.
Bulent Keskin
www.bulentkeskin.net
Software Developer
|
|
|
|
|
I already have a good solution for security, the main problem is really the data. DataSets offer huge advantages when it comes to working speed. I don't need to write all the classes for my application instead I use a DataSet to retrieve and update data.
Do you know any examples of paged data access and using transactions combined with the use of datasets?
WM.
What about weapons of mass-construction?
|
|
|
|
|
After reviewing the enterprise library I am pretty convinced that it would be quite useless to make something like that myself. The first tests look good and the framework is easy to work with (aside from the configuration wich is rather confusing sometimes)
Thanks for the help
WM.
What about weapons of mass-construction?
|
|
|
|
|
I want to make a simple program...and if i can someone listen for this action and get a target programs handle i can close this freekin annoying popups "You have exceeded your profile storage space..." that occur when i login to this schools console. zz it's making me nutz :P
|
|
|
|
|
Hi everybody,
I read that vb.net supports custoom events. But c# does not. Is any equivalent for custom events in c#? I tried a lot. but couldn't find one. Please help me.
Regards,
Rathish P S
|
|
|
|
|
|
Hi.
For obtain index of the first visible ListViewItem of a ListView I can use the the TopItem Properties. I would obtain index of the last visible ListViewItem.
How i can do?
Thank's.
Gianpiero from Italy
|
|
|
|
|
Hi!
One way to do this is to use ListView.GetItemRect() to get the height of a single item and divide the ListView's Height by this value.
Then you have the number of visible items in your ListView and can calculate the index of the last visible Item.
Regards,
mav
|
|
|
|
|
I already tried your solution. but it isn't the right solution.
This because the value that I obtain from ListView.Heigth/ListView.GetItemRect().Heigth is a number that not correspond to real a visible object. This values is number of displaied object + tot; where tot is variable and its value change when I try to resize the control.
Tank so much.
|
|
|
|
|
The solution _is_ correct, how else would the ListView draw its items?
I just didn't give you ready-to-use code but thought you could work it out from there, but obviously I was wrong.
So here's the full code - I explicitely tried it and it does work.
int first = listView1.TopItem.Index;
int h_tot = listView1.ClientRectangle.Height - 1;
int h_hdr = listView1.GetItemRect(first).Y;
int h_item = listView1.GetItemRect(0).Height;
int cntVis = (h_tot-h_hdr) / h_item;
int last = Math.Min(listView1.Items.Count-1, first+cntVis);
mav
|
|
|
|
|
Ok its right!!! I tried again and I resolved mi problem. Thank yuo very much.
Gianpiero.
|
|
|
|
|
Hi, is there a simple way to convert formats like BMP GIF and so on to the JPEG format? How do I do this?
|
|
|
|
|
Yup, this should do it
Bitmap image( @"C:\mypic.bmp" );<br />
image.save( @"C:\mypic.jpg", ImageFormat.Jpeg );
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
I want to create a tabel with 3 columns and multiple row which can be filetered and sorted. The data is not located in a database.
Is the datagrid the correct coice of control to use? If not which should I use. I am concerned as all the examples I have seen seem to be link to a database. Does anyone have an example of non-database use?
Thanks,
Liam
|
|
|
|
|
Well, what's the table's filename extension then Liam? What kind of a table is it?
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
The data is not an external file so does not have an extension. The table will be constructed from a number of variables in the code. The first column will be a description (this will not change after initialisation), the second column will be updated periodically and the third colum will be the time of update.
Hope this clarifies things a bit.
Thanks,
Liam
|
|
|
|
|
LiamD wrote:
Is the datagrid the correct coice of control to use?
Take a look at this article.[^] I believe it gives you an alternative to the DataGrid by allowing you to attach a data source to a ListView, something that .NET's implementation doesn't do. You should then be able to change the filter and sortby of the DataView.
The only reason you see examples linked to a database is that it's an easy way of populating the DataTable. You can certainly create the Columns, do a NewRow, set the fields, and do an AddRow yourself.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Depends on what exactly you want.
If you want an easy and straight way and your data isnt too big (lets say less then 100000 rows) then you can just pack your whole data into a DataTable and display it in the grid. This way you will have sorting and filtering capabilities right from the start. That the data isnt bound to any database isnt relevant.
For some extended filter functionality in DataGrid have a look at this article.
|
|
|
|
|
Hi,
I've wrote a .Net Remoting client-server application. I'm using a config file to connect the components and use the Ingo Rammer RemotingHelper class
http://www.thinktecture.com/Resources/RemotingFAQ/USEINTERFACESWITHCONFIGFILES.html[^]" rel="nofollow">
The problem is : I can't disconnect client from server (only when I exit the exe).
I disconnect client from server using
RemotingServices.Disconnect(ObjetMarshal);
but I have an error : "Cannot call disconnect on a proxy"
Thanks !
|
|
|
|
|
Hi Soke,
You can call the RemotingServices.Disconnect method on remoting proxies.
Guess the following link will help you.
http://blogs.msdn.com/manishg/
Thanks and Regards
SGS
|
|
|
|
|
Thanks for your answer !
But there is something I don't understand. In fact Disconnect method doesn't really disconnect client Ok for that but how than disconnect ?
I don't find the answer on the mentionned blog :s
In fact, I would like to unregister the channel on which i was connected (to have all my ressources free)
Thanks !
Sok
ps: i'm working with framework 1.1
|
|
|
|
|
Hi Sok,
The blog which i mentioned talk about RemotingServices.Disconnect method.
To unregister a channel you can use ChannelServices.UnregisterChannel method.
ChannelServices.UnregisterChannel(channelobj);
Thanks and Regards
SGS
|
|
|
|