Solved

VB.NET - Application to record time

Posted on 2009-05-04
6
334 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: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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VS 2017 18 108
Why use this lambda? 12 65
vb.net deleting excel sheet in workbook 11 36
Create simple VB.net Add-in for Excel in Office 365 2 27
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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