Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clicking mmNew
Message
From
31/01/2011 08:58:34
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Clicking mmNew
Miscellaneous
Thread ID:
01497952
Message ID:
01497952
Views:
80
I have 1 mm win form project and 1 mm business project. I have 1 form with the following code:

Imports System.Data
Imports System.ComponentModel

Imports OakLeaf.MM.Main
Imports OakLeaf.MM.Main.Windows.Forms
Imports Telecommunications.TelecommunicationsBusiness

Public Class BuildingMaintenanceForm
Inherits mmBusinessForm
Private _building As New Building

Public Sub New()
Cursor = Cursors.WaitCursor

Me._building = CType(Me.RegisterPrimaryBizObj(New Building), Building)

' This call is required by the Windows Form Designer.
InitializeComponent()

Me.DefaultMode()
Me.NavControl = Me.grdBuildings
Me.grdBuildings.AutoGenerateColumns = False
Me._building.GetAllData()

Cursor = Cursors.Default
End Sub

'Enable/disable buttons
Private Sub DefaultMode()
Me.btnSave.Enabled = False
Me.btnCancel.Enabled = False
Me.btnNew.Enabled = True
End Sub

'Enable/disable buttons
Private Sub EditMode()
Me.btnSave.Enabled = True
Me.btnCancel.Enabled = True
Me.btnNew.Enabled = False
End Sub

'Enable/disable buttons
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Me.DefaultMode()
End Sub

'Enable/disable buttons
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.DefaultMode()
End Sub

'Enable/disable buttons
Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
Me.EditMode()
End Sub
End Class

When I click mmNew the pointer stays on the first record so If I enter my "New" data is overwrites the current record. Isn't the framework supposed to take care of this and go to the new record? Any help with this new issue?

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform