Solved

VB.NET - Application to record time

Posted on 2009-05-04
6
326 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Syntax Error 2 48
ASP.NET 5 Templates 2 68
Vb. Net application freezes 9 31
.NET tools for adding thread safety to a web app? 3 19
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

20 Experts available now in Live!

Get 1:1 Help Now