?
Solved

VB.NET - Application to record time

Posted on 2009-05-04
6
Medium Priority
?
341 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Christian de Bellefeuille
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:Christian de Bellefeuille
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
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 
LVL 10

Expert Comment

by:Christian de Bellefeuille
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:Christian de Bellefeuille
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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

765 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