|
Hi, Henry,
Thank you so much. Though I still don't think what you told me to do is the way in which I can handle my project, your talented thoughts have refreshed my brain a lot. As you said, I may really need to rethink how I could do this project. Anyway, what I expect to do is a time period selector, you know, similar to GOOGLE calendar, but not for recording daily events. I only want to make a similar WINSFORM application that users can catch a period of time and return the StartTime and EndTime, later on, maybe I would do that collection recording each period to a ListBox each time user trigger the Mouse Events. I have collected information referred to this for a long time, and there is an article here in CodeProject named DayView Calendar, but that is quite different, and since I am not so good at GDI, it's also difficult for me to understand how it was modeled.
But, really, thank you for your kind help. Hope we will always keep in touch.
Br!
Sincerely Liang
|
|
|
|
|
string connection2=ConfigurationManager .AppSettings ["conn"];
OleDbConnection con2 = new OleDbConnection(connection2);
OleDbDataAdapter da_detail = new OleDbDataAdapter();
DataSet ds_detail = new DataSet();
con2.Open();
string query = "select * from DOCTORFORM where NAME = '" + DropDownList1.SelectedItem.Value + "' ";
OleDbCommand pay_cmd2 = new OleDbCommand(query,con2);
da_detail.SelectCommand = pay_cmd2;
da_detail.Fill(ds_detail ,"details");
DataTable detail_dt=ds_detail .Tables ["details"];
GridView1.DataSource = detail_dt;
GridView1.DataBind();
this is how am getting the values into gridview.is there any other way without doing databind.
|
|
|
|
|
Why do you think your approach is not good ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
it works fine for one time binding.but if i want to append to datas to the exinting ones.like adding more rows of data every a button is clicked.it doesnt work.can u give some tips on that
|
|
|
|
|
If you want to be able to add new Records on the Gridview it can be Done this Way
http://www.dotnetfunda.com/articles/article18.aspx[^]
in Windows we do it like this
Coding an N-Tier Application in C# Without Any Wizard: Part II[^]
Hope this will help you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
want to add new values to datatable rows on each button_click event..i want it in such a way that the new data gets added to the next row,instead of overwriting the first...Below is the code which i wrote
Button_Click event()
{OleDbDataAdapter da_pay = new OleDbDataAdapter();
DataSet ds_pay = new DataSet();
con2.Open();
da_pay.SelectCommand = pay_cmd2;
da_pay.Fill(ds_pay ,"details");
pay_dt=ds_pay .Tables ["details"];
pay_dt.Rows.Add();
con2.Close();}
But for every button click event the first row hets overwritten
|
|
|
|
|
|
could you explain more what is happening there??? where is the new data comming from is it a new row from the data base that the old table had gotten its values???what do you expect from pay_dt.Rows.Add(); to do??
try to create data columns same fields as the datatable then a datarow assign the values of the new row you want to add to the created datarow , then add the new datarow to the old dataTable or try the function DataTable.Merger(x) where it merges two dataTables.
|
|
|
|
|
I think i am missing out the basic concepts of data table..I selected values from the data source and stored it in a data set in the table details..A datatable was created in the same dataset and when it was connected to the gridview the values where displaying(eventhough i dint specified the column).I thought then if i give pay_dt(which is my data table).rows.add() then new rows eill get added to the datatable and values will also gets added.values are getting added..But it is overwriting the first
modified on Thursday, August 27, 2009 6:16 AM
|
|
|
|
|
Well first the values appeared becuase in the grid there is a prop name autogenerateColumns.
try to fill the new dataTable with the new data and then databind.
Tell me if this worked?? or there is something you need to be explained more
|
|
|
|
|
I have this application that in very brief, shows up an image from time to time...
Now, you know that if you press PrintScreen whilst a video is running, the image derived does not show the screen (if Hardware Acceleration is turned on).
I was wondering if I could achieve this in C# (without going into great lengths) - to make the image non-apparent on PrintScreen...
Or if I should use a completely different method? I had in mind of tracking the Clipboard but that would take me to great lengths and can be easily circumvented.
|
|
|
|
|
what do you want to capture ?
I just tried Google Earth with DirectX9 Mode, and using PrintScreen..-> it's working, no problem.
|
|
|
|
|
What I want is NOT to capture.. I want to make the system so that the image will not be captured when a screenshot is taken... However implementing a lock upon the PrintScreen key is not the ideal way... What I had in mind, is implementing it similar to how it works when a video is played on a PC with Hardware Acceleration on - the image is 'translucent' or something, so that it does not show up on the screenshot...
|
|
|
|
|
HI,
I have managed code. I have namespace and set the COMVisibleAttribute to TRUE. But still I am not able to access the namespace of C# projects in a ATL projects. Any suggestion.?
|
|
|
|
|
Hi
This is from Chandrakanth.
Actually myproblem is....
I want to display images in the body of the Email. It is possible ?
if it is possible means please give me some Tips on that.
If any reference....please send me that
Thanks and Regards
Chandrakanth
|
|
|
|
|
|
See here.
Life is a stage and we are all actors!
|
|
|
|
|
please tell me what is better to learn language .Net or java
|
|
|
|
|
|
yashwant vaishnav wrote: please tell me what is better to learn language .Net or java
One is not better over the other (although I'd recommend .NET). They exist for different purposes and cater to different consumers. Read up on both, find out what are the differences, similarities, benefits, odds, etc., of each and figure out what would suit you best.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Ask the same in the Java forum and you will get a different answer...
|
|
|
|
|
I am in dotnet but i recommend java because it is cheaper then dotnet and it is open source based
|
|
|
|
|
Cheaper? Didn't know that you have to pay for the framework...
|
|
|
|
|
Gaurav Dudeja India wrote: java because it is cheaper then dotnet and it is open source based
Are you joking?
Indeed ,could you prove that?Java is not rich as .NET and very sluggish and unstable for some OS.For example MathWorks team warns their customers with something like that "because of the problems with JVM,some functions might not work correctly on some OS".If the development framework is not stable enough,then the product will be full of bugs too.
If it's not rich ,to much custom code is required ,which means much more expensive product.
Life is a stage and we are all actors!
|
|
|
|
|
Java is not cheaper than .net.
Both frameworks are free. You can pay different amounts for the IDE you use, for example SharpDevelop is free and has many good features. There are free (and restricted) versions of Visual Studio as well the versions of visual studio you pay for (it is these that can be expensive). I *think* the free eclipse IDE will also allow you to use .net, it definately supports Mono.
|
|
|
|