|
mark_w_ wrote: but they need to reference each other which you cant do.
This sounds like it's slightly wrong. If you think about it, your business objects should not need to reference your data access layer. Why would your business objects need to know anything about how/where they are saved?
What I've got is an assembly called DataObjects, which is the basic business objects the app uses. They are pretty much dumb classes and don't really do anything beyond serving as storage structures. This assembly references nothing else apart from the basic .net stuff.
I have a DataAccess assembly which contains the classes that do things like load/save the DataObjects, this references the DataObjects assembly.
Then I've got a BusinessLogic assembly. This references both of the others and provides things like validation checks etc.
From the GUI level, the app doesn't reference the DataAccess assembly directly. Instead it references the BusinessLogic assembly and any saves/loads are performed through that.
Simon
|
|
|
|
|
Define an interface assembly to contain your contracts. This library will access no other solution assemblies but will be accessed by most if not all of them.
|
|
|
|
|
Hi,
Using an article from Code Project I have "globalized" my application however I think I have "over done it".
The user can select from English OR Spanish and then I run the following code...
CultureInfo objCI = new CultureInfo(MainForm.culture);<br />
Thread.CurrentThread.CurrentUICulture = objCI;<br />
<br />
this.xrLabelHeader.Text = MainForm.RM.GetString("0312");<br />
this.xrLabelAmtReceived.Text = MainForm.RM.GetString("0194");<br />
this.xrLabelSNumber.Text = MainForm.RM.GetString("0314");
This works fine but now I think I've stuffed it up for users that don't use Spanish or English (in this case en-US) because I haven't returned the culture back to the computers system after setting the text labels etc.
Presumably I should have read the users culture first, changed it whilst setting the text files etc, and then returned the culture back to the computers so that other formatting rules apply (currency symbol etc).
Can someone confirm the above please or point me in the right direction.
Thanks,
Glen Harvy
|
|
|
|
|
I'm not sure why you'd want to change the thread's CultureInfo back after you set it up. In this case you may want to write a ResourceManager wrapper to set various things without changing the thread's CultureInfo.
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
I think I may be confusing myself with the UI Culture and the computers culture.
In my application I don't touch the computers culture and therefor I didn't think there would be a problem.
For example. the application's user can chose to set the UI culture to English or Spanish ie the labels/text in the program can be displayed in either English or Spanish. If they are using the program on a German computer then the dates etc will still be in German. As you said, I could have ignored the culture altogether and just used the ResourceManager as a wrapper.
I'm trying to test all this on a VM but it's a bigger task than I imagined because the .Net version is in English so 'OK' is 'OK', not whatever is German for 'OK'.
What triggered my 'panic' was that I have a Kuwaiti prospective customer who wants to get rid of the '$' and presumably use 'KD'. I paniced because I would have expected it to use 'KD' or whatever currecy symbol is appropriate for the users region. Apparently there is no region specific culture for Kuwait so I think my application is performing as it should anyhow.
Thanks for your input - it seems I only needed to talk it through.
Glen Harvy
|
|
|
|
|
In C#.Net2.0, I created one control. I want to use that control in my other application. How to customize the user control in .Net 2.0. Thanks in advance.
|
|
|
|
|
copy the code across, or just put it in a dll and reuse it from there.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It may be simple question. When I build/Rebuild the solution, I found only .exe and .pdb files in bin/Debug folder. I didn't find .dll file.
|
|
|
|
|
That's b/c there isn't one. I said you have to make one. This means making a whole new class libary project and moving the code into it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I used _paint event in my class, which is not possible to create the same in class library project.
Is there any other way to include the custom control in my application. Please guide me.
|
|
|
|
|
Hi All,
I am developing an application for some network utility. Right now looking for a .Net library function to compress files before I send them via network. I tried to work with “System.IO.Compression” namespace. But it supports only gzip, which cannot be opened directly with Winzip. Also I am looking at supporting multiple compression formats such as zip, tar etc. I even tried of using #ZipLib. But for some reason I don’t want to use any 3rd party library. Can anybody suggest me how can I achieve this just using .Net libraries.
Thanks in advance,
Krishnaraj
|
|
|
|
|
I think J# has a library you can reuse. Apart from that, if you don't want to use ZipLib, you'll have to rewrite it yourself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
The Compression namespace only does the actual compression. To turn it into a .zip archive, you basically just add a header before the data. If you only ever put a single file in the archive, most of the header looks the same all the time, so that would be pretty easy to write yourself.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
We generally use #ZipLib[^]. There's an exception which allows it to be used freely in commercial, closed-source products.
If you're insistent on doing it only with the supplied libraries, and don't want to go the J# route, System.IO.Compression provides an implementation of the Deflate algorithm in the DeflateStream class. You will need to Deflate each file and write headers as noted in the ZIP Application Note[^], the specification for Zip files.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Hi,
Can anybody help me how to attach & detach child windows from a parent window such that when they are attached they should move along with the parent window whenever we drag either the child windows or parent windows on the desktop.
Thanks
|
|
|
|
|
youwould nee move the window yourself in code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have used timers to do this but there are bit slow when i am moving them even i set the interval to 1 milli second.I want to move them as if they were all connected windows. If u want further info on how they look like to be pls see this soft phone application
http://www.asteriskguru.com/tutorials/xlite_softphone.html[^]
thanks
|
|
|
|
|
I'd use a delegate and move the window at the same time, firing from the moved event.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi, I am sending mail from SMTP Server, I am using Visual Studio 2005 with SQL Server 2000 at backend. when i send the mail first itt moves to Queue and then to bad mail folder with delivery failure notification. the Error code was 0xC00402C7. i have applied the Relay settings at system , my o/s is Win XP Professional i m sure my code is fine but the problem is with certain iis settings
Please Help , Suggestions and solutions are needed
|
|
|
|
|
First, what does SS2000 have to do with anything ? Second, we can't fix your code if you don't post it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Have you enabled logging for the Smtp in the IIS Management console?
If you did, look at the log, there should be an error message with the reason.
Please post this message, than we may can resolve the problem.
The message should also be in the failure notification. (near the error code i think)
cheers
Der Staat mit der niedrigsten Geburtenrate ist nicht die Bundesrepublik, sondern der Vatikan.
|
|
|
|
|
It seems that the reply mail receiver
(Unable+to+relay+for+shumaila.****@***.com) could not be reached. Please try to send an email to the reply receiver directly, it should fail. If it does, try to remove the reply option.
Please remove the logfile and the code example you submitted. I hope that the details in it are no real infos.
Hope this helps.
Der Staat mit der niedrigsten Geburtenrate ist nicht die Bundesrepublik, sondern der Vatikan.
|
|
|
|
|
Sorry i cant understand wht did u say "Please try to send an email to the reply receiver directly" can u plz explain i m greatly thankful to u
|
|
|
|
|
Write a little testprogram, where you send an mail to the receiver "shumaila.***@***.com" and check what log messages are created. You can email the logfiles to me.
Der Staat mit der niedrigsten Geburtenrate ist nicht die Bundesrepublik, sondern der Vatikan.
|
|
|
|