[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB.NET - Application to record time

Posted on 2009-05-04
6
Medium Priority
?
347 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: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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

872 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