Results 1 to 7 of 7

Thread: Business Object

  1. #1

    Thread Starter
    Addicted Member soluga's Avatar
    Join Date
    Dec 2005
    Location
    Manchester (Uk)
    Posts
    211

    Business Object

    My boss has asked me to put functionality into an already populated datagrid, so that when a formula code is typed into the first cell of a row, and then the tab key is pressed, the remaining cells in the row then get automatically populated with the relevant data.
    what would be the best way to go about this task?
    He says I need to build a business/custom object!!! might as well ask me to build a space shuttle.
    Would be grateful for any advice.
    Thanks

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Business Object

    I don't know much about data grids since I never use them but if it allows inpu t you should be able to simply check for when the Tab key is pressed and then run your code across the row. Should be fairly straight forward.

    I am puzzled by one of your responses though.
    He says I need to build a business/custom object!!! might as well ask me to build a space shuttle.
    If it's like building a space shuttle, why are you programming for a living (and how)?
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3

    Thread Starter
    Addicted Member soluga's Avatar
    Join Date
    Dec 2005
    Location
    Manchester (Uk)
    Posts
    211

    Re: Business Object

    In other words I know nothing of building business objects or space shuttles.

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Business Object

    Quote Originally Posted by soluga
    In other words I know nothing of building business objects or space shuttles.
    Why are you employed to do so?
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  5. #5
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Business Object

    Building business objects can be overwhelming at first. In theory, they should provide you with a business analyst that can explain what each object needs to hold and what functionality is necessary. Most likely, that won't be the case (it hardly ever is). What you need to do is design for reuse. Lay everything out and then start finding similiarities between the programs that will be associated with the business process. Those similarities are a great place to start.

  6. #6
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Business Object

    Back to your question ( I totally missed the target ), there's a couple of ways to do this, but it depends on how you're currently populating your datagrid. What are you using for a datasrouce?

  7. #7

    Thread Starter
    Addicted Member soluga's Avatar
    Join Date
    Dec 2005
    Location
    Manchester (Uk)
    Posts
    211

    Re: Business Object

    I was employed on my ASP skills, but have been asked to move into VB.Net.
    Have been doing some digging, and the confusion was just a play on words, I have been using classes all along, creating functions and subs etc to be used in the forms, I just presumed business/custom objects were something different.

    As regards my original question, I am using a Janus datagrid, with a dataset as the datasource (from my class of course). But think I may have cracked it, kasracer was right, as now have a function which tell my what cell I am in on my row, so when the tab key is pressed I can re-query the database to see if the code exists, if it does I can then populate the row with the data.

    VB Code:
    1. Private Sub GridExFormula_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles GridExFormula.KeyDown
    2.         Try
    3.             If e.KeyCode = Keys.Tab Then
    4.                 Dim currentRow As GridEXRow
    5.                 'Get current row
    6.                 currentRow = GridExFormula.GetRow()
    7.  
    8.                 Dim CellText As String
    9.                 CellText = currentRow.Cells(0).Text
    10.  
    11.                 IsInLastColumn(GridExFormula)
    12.  
    13.             End If
    14.  
    15.         Catch ex As Exception
    16.             MsgBox(ex.ToString)
    17.         End Try
    18.     End Sub
    Last edited by soluga; Feb 17th, 2006 at 06:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width