Solved

VB.NET - Application to record time

Posted on 2009-05-04
6
323 Views
Last Modified: 2013-11-26
I need some help with a VB.NET application that keeps track of time/hours worked.  I had some basic VB.NET programming background, but not sure how to go about accomplishing what I need to get this working.  I can write a program to pull data from a SQL database into a datagrid, but that's about it.  What I want to do is allow user to pull data into this datagrid, enter data if none exists, and update if they make any changes in this datagrid, or insert data.  I would also like for this data grid to display a detail datagrid if they click on a line and allow same update/insert/delete functionality.  Can someone provide me example of a datagrid where it will populate base off employee ID with Start/Ending date.  If nothing, user should be able to fill in the value and insert?  If data exists user should be able to click and update.  Also in the detail view of each line item that is highlighted, allow insert/update/delete?

Please see the screenshot.


Time-Clock.jpg
0
Comment
Question by:holemania
  • 4
  • 2
6 Comments
 
LVL 10

Expert Comment

by:cdebel
ID: 24300348
I won't show you a sample doing all what you want.  You will have some reading to do:
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/detailsview.aspx

This site can give you samples in both languages (C# & VB.NET) for everything you asked for.
0
 

Author Comment

by:holemania
ID: 24304605
Thanks for the information.  Is there an example of a VB.NET?  The site is listed in ASP.NET and webform.  I am looking at creating a small windows form application for simple data entry, but would like to have it in Master-Detail view like the example I provided.  
0
 
LVL 10

Expert Comment

by:cdebel
ID: 24304834
On the web site i gave you, there's a pull-down where it says: I WANT MY SAMPLES IN ... (VB or C#).  VB is of course VB.NET, not VB6.

So please, click RUN IT under the section named "VB DetailsView Editing". Test it...
  • choose a state, then you should see a GridView.  
  • click SELECT beside a row, then you should see the DetailView for this row
  • in the DetailView, you got an "EDIT" button.  Click it...  modify the record and update it.
So, this sample seems to do what a part of what you want?  Then on the web site address i gave you, read the short description for this sample, then click VIEW SOURCE and analyse it to see how he achieved that.
There is another sample named "VB Master-Details Insert" to do what you want.
Don't expect me to write you a full sample because it take some time to code.
And as the site name is "ExpertS Exchange", i expect that you understand the solution since the full source and description is given on the web site i posted here.  Once you took 10 minutes to read the sample i just mentionned, get to your keyboard and start coding...
P.S: Keep in mind that people don`t have your database.  They have to code blindly and post the file here.  If they want to test the solution that they give you, they must create an identical sample of your database.  Its very time consuming.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 10

Expert Comment

by:cdebel
ID: 24304905
If you check the sample "VB Master-Details Insert", take a look at the SQLDataSources.

You will notice the SelectCommand, UpdateCommand, InsertCommand.  Then you should see bellow every parameters for each of theses queries.  If you know SQL & ASP.NET, you should figure out how to adapt this to Your database.

In the Code Behind, you should also notice that there's not much code, and it show you how to update your grid (DataBind), and how to change mode from Edit/Insert/Readonly/etc.

Once you have coded something, come back with your questions and i'll help you with the little missing points that you might misunderstood in the samples site.
0
 

Accepted Solution

by:
holemania earned 0 total points
ID: 24315273
Thanks for the help.  I was looking for an example in hoping to find something similar using Windows Application (windows form) and not example with ASP webpages with vb code behind examples.

I was able to google and got something that is similar to what I intended to do and had created the master-detail with what I found off google.  The following website is what has helped me.  Thanks again for posting.

http://msdn.microsoft.com/en-us/library/y8c0cxey.aspx

0
 
LVL 10

Expert Comment

by:cdebel
ID: 24315355
oh gosh, sorry for the asp.net.  It's my mistake.  I monitor few threads (excel, asp.net and vb.net) and i didn't noticed that you asked for VB.NET only.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now