|
Hi all,
I retreive some data (Attendance data) from SQL Server and show it in dataGridView object. After that, I want for example use the data to count the number of attended days and absent days for a single person. There is time and date column, and I want to use it to calculate attended and asbsent days without sending additional query, Just use the retreived data in DataGridView for that pourpose.
Example for a single row with data :
FingerprintID | DateTime | FunctionKey | InOut
11200 7/12/2006 11:44:00 AM 1 Yes
It's important to know that I can't modify the current database structure, I have to use it as it is.
so, how can I do that?
|
|
|
|
|
If you're using a dataset to display the data you can iterate through the rows in the datatable inside the dataset that is being displayed. There you find these fields that can be used to calculate the absent days, etc.
e.g.:
foreach(DataRow row in dataSet1.Tables["SomeTable"].Rows) {<br />
<br />
}
WM.
What about weapons of mass-construction?
|
|
|
|
|
i think it is a simple question but i am not able to figure it out.
My problem is that i am using a combo box in the form and i have only two items predifined in it. I want the user to choose only one of these two items and not being allowed to change or right in the combo box. Meaning i want the combo box not to be editable.
N.B: i am using VS2005
Thanks in advance
jamil abou khalil
|
|
|
|
|
u can make the combobox select only
by changing the dropdownstyle property to dropdownlist type.
rahul
|
|
|
|
|
Thanks it worked
Jamil abou khalil
|
|
|
|
|
Hi,
here is the syntax,
MessageBox.Show (IWin32Window, String, String)
what is the actual purpose of IWin32Window interface, Can i use this close the message box if the user not reponding for certain period of time,
my requirement is when the user clicks logout button on my application. i have manually close the already displayed messagebox and have to show the login screen. Is there any option to manually(thru code, as like as user pressed cancel button on the messagebox) close the message box.
Note: Here iam not talking about timeout messagebox, i want to manually close the message box.
Thanks and Regards,
Srini
|
|
|
|
|
IWin32Window is used to display message box infrontof specific control
e.g.
you have two forms form1,form2. and if you want to disply your message in front of other form . so simple pass the object of that form in the MessageBox.Show(); function
sameer
|
|
|
|
|
Thanks!
modified 28-Sep-16 7:31am.
|
|
|
|
|
Are you looking for code or for an existing app? If the latter, you're in the wrong forum.
|
|
|
|
|
Hi
How can i get the field names of a table ( only field names not the data) in MsAccess? What will be the query???
regards
sAqIb
|
|
|
|
|
hi
try to make a select statement with impossible condition.
ex: select * from myTable where 1=2
Tamimi - Code
|
|
|
|
|
|
could you explian more !!
DataSet ds =new DataSet();
SqlDataAdapter ad = new SqlDataAdapter("select * from myTable where 1=2",connection);
ad.Fill(ds);
for(int i =0; i<ds.Tables["myTable"].Columns.Count; i++)
{
string str = ds.Tables["myTable"].Columns[i].ColumnName.ToString();
}
Tamimi - Code
|
|
|
|
|
How can I know whether the mailid provided is valid or inavlid mailid using smtp server in C#
bhanu
|
|
|
|
|
Dear programmers
i have a appilcation which have multiple forms i w want to add help file to them.
when user press F1 the help file should open and respective form topic should be open
can any one done this thing before or have any idea how i can do it how can i create help file.
i am waiting for ur responses
sikandar
|
|
|
|
|
There a Number of Help creater(HelpScribble..etc) available on the market.either you can download them from net. these'll help to create HTML Help files(Help.chm).you can access them by
Help.ShowHelp(this,path);
sameer
|
|
|
|
|
Sir,
In VB.Net The keyword Redim is used to modify the array at runtime.I have an array in C# .Now the problem is , i need to modify the array at runtime .How can i implement that?
Please help.
Thanks
|
|
|
|
|
Modify in what terms?
Increase the size or something else
If you want to increase the size u better use the Arraylist which
grows dynamically.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
ok Sir , I will use theArrayList.Can u please give an example that illustrates how to dynamically increase decrease the array size using ArrayList.
Thanks
|
|
|
|
|
You just have to go on adding items to the arraylist
e.g.
ArrayList arrList = new ArrayList();
//some code
arrList.Add(item);
the above line adds an item to the arraylist
now if you want to decrease the size u can remove the unwanted item
arrList.Remove(index);
Hope u get it right..
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
if you want to flush your values in the array use
myArray = null; // redim
if you want to just resize your array use
array.resize ( ref myArray, (int)myArrayNewSize); //redim.preserve
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Hi
i devlope an application that is using two avi files.
i put these avi in a folder and folder is placed in Application start location.
and i use control for avi files MicroSoft Animation Control 6.0(sp6).
But in some system the application runs and in some not run.
if i remove avi control then it runs on all system
Please rell me how to manage avi .
|
|
|
|
|
I am trying to get a string from a database. The code for that works fine. I next want to add those strings to an array. This is where the problem occurs. What am I doing wrong?
for (int i = 0; i < arrayLevels.Length; i++)<br />
{<br />
int iLevelOridinal = rdr.GetOrdinal("Level");<br />
string szLevel = rdr.GetString(iLevelOridinal);<br />
<br />
arrayLevels[i] = szLevel;<br />
}
The error is:
Cannot apply indexing with [] to an expression of type 'System.Array'
I understand the error but do not know how to fix it, all help would be great!
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Wht type of Array have u declared?
i guess it should be string []arrayLevels;
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Array arrayLevels = new string[2];
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|