|
Sir,
I have a question bank in the excel format or in the word format so by using this as a database to the c#.net(windowsbased application)i need these question want to be rise in randomly when each time login. i tried in many ways but its not working, there are only for the column wise data are in excel so its not apat for my project, can u please do me a favor.please try in windows based application not by using sql or mysql.
|
|
|
|
|
|
Hi,
I am developing HRMS .NET WinForm application using C# and DevExpress.
I want to know what's the best way practice to include reports in my application?
Should I use the RDLC, Crystal Reports or the XtraReports from DevExpress?
I want the reports to be physical files (in \Reports) and not embded within my application then I will browse it using a database table so it will be easy to add new reports whenever its required.
Thanks
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: Should I use the RDLC, Crystal Reports or the XtraReports from DevExpress? The respective producers of each reporting tool say it is a best practice to use their suite.
Jassim Rahma wrote: I want the reports to be physical files (in \Reports) and not embded within my
application then I will browse it using a database table so it will be easy to
add new reports whenever its required. All three would support that scenario AFAIK.
I'd recommend a fourth option; exporting to HTML based on a template, since that is the simplest option that meets the requirements.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have the code to insert data from one stock feed to a sql table.
but according to the curves, sometimes i have 3 columns and some others i got 5 columns. my problem is that i only get the 5 column data in the table.
how can i get the 3 column data in the same table?
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
So please, edit your question and provide better information.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Alexmarvel wrote: how can i get the 3 column data in the same table? By leaving 2 of the columns empty.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi, I started converting the program last night up to 2AM (5PM here as of writing this).
I feel like I'm consuming much time in thinking and Trial and Error, I really need some help.
I bet this is easy for those who has experience in C#.
Take a look at this sample project (this project is a C# console, socket programming (telnet) ).
http://www.codeproject.com/Articles/19071/Quick-tool-A-minimalistic-Telnet-library
and then, what I need to do are the following:
1. Remove the user and password submission, since I'm going to telnet my microcontroller and
that microcontroller doesn't have such security. In the sample program above, if the ip
you are going to telnet doesn't have user and password requirement, it will return an exception.
(Actually, I have already done this, I modified the C# console sample
program, and magically it works. look at my code below)
static void Main(string[] args)
{
TelnetConnection tc = new TelnetConnection("news.thundernews.com", 23);
String prompt = "";
while (tc.IsConnected && prompt.Trim() != "exit" )
{
Console.Write(tc.Read());
2. In my windows form, I have there BUTTON1, and whenever you click that, it will CONNECT the program to the
desired ip address via TELNET. My problem is, I will consume much much time in thinking of this. I don't even
know yet how does my edited code posted above work.
3. I have too a BUTTON2, if you click this, the C# program will send a string from any controls, like textbox.
(I think, no need for this to answer. tc.WriteLine(prompt); <-- that code will send byte to the server)
4. finally, as soon as the BUTTON1 connect is clicked, the C# program will auto receive any incoming byte from the server,
and the program will put the received bytes into some controls, say.... RICH TEXT BOX.
I have tried my best to convert this C# program (which works 100%, but I really need a winform sample) to winform.
I just need a very example and I will take care of the rest of my project.
One of the things that make me go crazy is where should I put the WHILE LOOP part from C# console to C# winform?
That's all. Thank you so much in advance!
G
|
|
|
|
|
Member 10321059 wrote: where should I put the WHILE LOOP part from C# console to C# winform?
You don't.
Instead, Winforms apps rely on events to "decide to do something" instead of just "waiting for it to happen". It's a totally different execution model, and you can;t just "pick up" console based code and expect it to work as a winforms based application: the basic processing stuff my be the same (or at least similar) but the way the whole program is "hooked together" is very, very different.
For example, in a console app, you are likely to print a prompt, and wait for a user to enter a filename - and nothing else will happen until the user presses ENTER to indicate he is finished. That doesn't happen with WinForms apps: the user can type, edit, go do something else; a timer might "chip in" to make the code do something at a specific time; your Socket might signal "I got data!" and your code process it.
You can't just "convert a console app to WinForms" - you will have to think about how your console app is working, and what it is doing, and then consider how that fits into the Winforms execution model.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'm coding for Windows Forms. The teacher has only gone over arrays so far, but likes arraylists better. Using arraylists b/c can mix types.
Out of range error from this line:
subtotal = (decimal)subList1[2] + (decimal)subList2[2] + ... (decimal)subList5[2]);
(What gets added previously is a decimal.)
If my menu item 'AddtoCart' has not filled all arraylists (i.e. 5 times) I get the error. Thinking the ones not "given" a value = -1. I don't care to use List<>, etc. as this teacher can get vy prissy.
I just want to change the values that I think are -1 to 0 so addition works. I can't pre-load anything due to how arraylists get 'loaded', obviously. I could Replace the last element: [2].
But I don't know how to loop b/c I can't use a variable such as i in the name of the arraylist itself. Been high and low online for a solution...
Thank you,
Mac
|
|
|
|
|
The out of range exception indicates that there is no element at 2 in one of your lists. Put a breakpoint on that line by pressing F9 and debug your application. Take a look at the size of each one of your lists.
|
|
|
|
|
Your teacher is an idiot. Arraylists are seriously out of date, simply because you can mix types, which means they give runtime errors instead of compile time. That means that it is more likely that a problem will get through to production than using a List<T> which insists on strong typing and doesn't need you to cast the variables.
But in this case, I'd use an array of decimal values instead of a List or ArrayList: unless you are adding items dynamically (at run time) and don't know the number of items in advance.
The error is probably because you are using "magic numbers" - the hard-coded "2" in your code - instead of using a loop to get the values.
Go back a step, and think how you would use a loop to access an array - I'm sure that your teacher has covered that - and then look at the whole of your code (not just the one line you show) and try using that method on your list.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Mac20nine wrote: But I don't know how to loop b/c I can't use a variable such as i in the name of the arraylist itself. Been high and low online for a solution...
I'm not sure what you mean with this sentence ?
if you need to check the values of each item in each list, I fail to see any reason why not using a loop.
|
|
|
|
|
What are the advantages and disadvantages of Entity Framework 4.0. What are best scenarios and cases where we should use EF 4.0. Many Experts including Martin Fowler hates ORM , what's your say on this ?
Do you prefer using Microsoft Enterprise Data Block over EF 4.0 ? There is lot of ambiguity while design your application and decide what to use while writing your DAL (data Access layer).
|
|
|
|
|
Not sure why you got downvoted so I countered it with an upvote.
I haven't used EF yet. I had some code that was partial EF and partial plain ADO.Net and I removed the EF and replaced with out sql helpers classes.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
In my experience, if your application is using OOD then I would prefer EF.
|
|
|
|
|
I'm old school so I refuse to work with EF, every time I see it used by other developers I see situations where they simply state that they cannot do something because of the way EF is wired up.
Using multiple databases in one app tends to be a bit of a nightmare as well.
I use a class that was created in the 90s and has had a number of minor modifications (not including change of language 3 times) since. It is lighter weight, more flexible and I know PRECISELY what is happening so I control my data interface.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
shiv Mohan wrote: Many Experts including Martin Fowler hates ORM , what's your say on this ? I think you should ask "why does Martin hate ORM". Hate is a too strong emotion that kills objectivity. ORM's can add value sometimes, for a price. We got some members that passionately hate triggers - but they will not say that they should be avoided at all costs!
As for the DAL, this is very often a layer that functions merely a a door, without adding any value. SQL is already an abstraction layer; you work with an abstraction of records and relations, not with flat files on the system.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: We got some members that passionately hate triggers Guilty
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I successful converted my project from VB to C# than I deleted an Equipment form from my C# project but when I run my C# project the form appeared in debug mode, How to solve this problem?
|
|
|
|
|
Probably, you didn't compile it after removing the form, or the compilation failed.
Did it say something along the lines of "do you want to run the last successful build instead?" and you said "yes"?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
It says "do you want to run the last successful build instead?";
then I press "Yes";
|
|
|
|
|
So...you try to compile it, it can't do it completely because of errors, then you run the "last successful" build and expect it to have your latest changes in it?
Tell me, if you go the the supermarket and don't have any money on you when you try to pay, does the checkout person say "would you like the previous customer to pay for you?" - because that is what you are trying to get the system to do.
When you compile a program, any errors prevent the system from producing a new executable file - so the exe that is run is the last version of your code that had no errors, not the latest version with your changes. In order to run your code with your changes included, you have to look at and fix the errors that the compiler found and told you about.
So what errors did you get?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
WOW Thanks ORIGINALGRIFF;
It's sorted now thanks hey....
|
|
|
|
|
You're welcome!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|