|
The information accessible from the Google search I provided is useful to developers capable of developing the project you described. If that is not you, that's not my fault. So for trying to blame me for your shortcomings I have a great big F*** OFF A**HOLE in reply.
|
|
|
|
|
Well, other people had no problem posting a decent reply.
If you're just looking to troll, go somewhere else.
The world is full of A$$holes, don't be one yourself.
I'm done with you.
Everything makes sense in someone's mind
|
|
|
|
|
In case you missed it last time F U C K O F F A S S H O L E
|
|
|
|
|
|
Thank you!
Everything makes sense in someone's mind
|
|
|
|
|
Hello,
I'm using VS2008 (C#).
i built a desktop application that doing few type of query's and save the results to CSV file.
now, i want also to see the result in the DataGridView.
i understand the logic, and i understand that i have to use in my code something like the follow lines: (i cant see the "DataBind" Method!!)
<pre>
public void ExecuteFromBox(string ExecuteFromFile,string timeNow)
{
string conStr = String.Format(@"UID=very_Funny;PWD=hahahahaha;InitialCatalog=hahahahahahaha;Data Source=hahahahahaha");
Form1 frmain = new Form1();
SqlConnection conn = new SqlConnection(conStr);
conn.Open();
SqlCommand cmd = new SqlCommand(@ExecuteFromFile, conn);
MessageBox.Show(cmd.CommandText);
DataSet ds = new DataSet();
//SqlDataAdapter ad = new SqlDataAdapter(cmd);
SqlDataReader reader = cmd.ExecuteReader();
frmain.DTResults.DataSource = reader;
<b>frmain.DTResults.DataBind();</b> // i cant find this Method!!!
conn.Close();
}
</pre>
is there any suggestion?? how can i add the DataBind Method?
Thank you
|
|
|
|
|
Ido Shahar wrote: i want also to see the result in the DataGridView.
Ido Shahar wrote: is there any suggestion??
:yawn:[^]
|
|
|
|
|
title
thanks in advanced
modified on Monday, April 27, 2009 2:24 PM
|
|
|
|
|
Rather than an algorithm, I would use "a piece of wire".
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi,
why we need to use generic class in c#.
reply me,
thanx in advance....
|
|
|
|
|
Type safety. Most of the casts which can cause errors are noticed by the compiler, not the runtime. This means that you will find it more difficult to compile (you'll get either warnings or errors.) Because of this, you won't need to do as many casts. These mean that you spend less time casting, and have to catch fewer exceptions. So speed is also a factor.
|
|
|
|
|
Good answer - can I throw in readability? It does make the resulting code easier to understand as well (or I think so).
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I hadn't thought of that. Readability is another factor, though it doesn't directly affect execution speed
|
|
|
|
|
I am trying to convert clock time to a double, and am getting an error, can someone use another pair of eyes to assist with this. See the code below. Thanks
static void Main(string[] args)
{
string[] timeArray = new string[6]{ "08:17", "15:26", "18:32", "00:46", "10:38", "13:56" };
double[] decTimeArray = new double[6];
for (int x = 0; x < timeArray.Length; x++)
{
decTimeArray[x] = ConvertTime(timeArray[x]);
}
for (int x = 0; x < timeArray.Length; x++)
{
Console.WriteLine(timeArray[x] + " " + decTimeArray[x]);
}
Console.ReadKey();
}
}
public static double ConvertTime(string rawTime)
{
int hours;
int minutes;
double dminutes;
double decimalTime;
string delimStr = ":";
char[] delimiter = delimStr.ToCharArray();
string[] split;
split = rawTime.Split(delimiter);
hours = Convert.ToInt32(split[0]);
minutes = Convert.ToInt32(split[1]);
if (minutes < 7)
dminutes = 0.00;
else if (minutes < 22)
dminutes = 0.25;
else if (minutes < 37)
dminutes = 0.50;
else if (minutes < 53)
dminutes = 0.75;
else dminutes = 1.0;
return decimalTime = dminutes + hours;
|
|
|
|
|
Still at it?
To get a time span expressed as a floating-point number of hours but rounded to a quarter, I would try something along these lines (code not tested):
private double ToHoursButRoundedToQuarter(string s) {
TimeSpan span=TimeSpan.Parse(s);
int minutes=span.TotalMinutes+7;
int quarters=minutes/15;
return quarters*0.25;
}
|
|
|
|
|
Your code makes very little sense to me. Why not use DateTime and/or TimeSpan ?
|
|
|
|
|
This was working, but right now I am getting the following error:
Expected class, delegate,enum, interface, or struct
I am new to c#, and in a class where we are not using the timespan yet, and will not touch on that in this semester. I you could look at the code I have supplied, and maybe help me find the error, that would be great.
Thanks
|
|
|
|
|
|
that's cheating. The challenge is to locate the error (and to get someone else to that for you).
|
|
|
|
|
Lol
|
|
|
|
|
From the code you posted and the error you say you are getting, I think your brackets are off. You should have { } wrapped around your class methods (Main and ConvertTime) and also to enclose them.
|
|
|
|
|
Thanks, that's what I needed, another pair of eyes. I must have deleted a bracket accidentally. Runs fine now.
|
|
|
|
|
I am a beginner at C# and have been given an assignment that I am having trouble starting. Any help would be useful! Here is the project:
Write a program to print all combinations of hours, minutes and seconds in military time format HH:MM:SS using nested loops.
Like I said, I'm new to this, only 2 weeks in... so keep that in mind!
Thanks,
Bonnie
|
|
|
|
|
It often helps very much when trying to get help with homework assignments if you show what you have come up with so far.
Do you know what nested loops means? Have you given that a try, and if so how far did you get?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
the problem is, with all those nested loops, the app is taking all day.
|
|
|
|